Commit 0c30e8fd authored by guanghongwei's avatar guanghongwei

ѡ

parent 662c48ed
...@@ -63,3 +63,5 @@ def user_add(request): ...@@ -63,3 +63,5 @@ def user_add(request):
...@@ -144,6 +144,24 @@ function WinMove() { ...@@ -144,6 +144,24 @@ function WinMove() {
opacity: 0.8, opacity: 0.8,
}) })
.disableSelection(); .disableSelection();
}; }
// Checkbox select all
function selectAll(){
var checklist = document.getElementsByName ("selected");
if(document.getElementById("select_all").checked)
{
for(var i=0;i<checklist.length;i++)
{
checklist[i].checked = 1;
}
}else
{
for(var j=0;j<checklist.length;j++)
{
checklist[j].checked = 0;
}
}
}
...@@ -27,34 +27,42 @@ ...@@ -27,34 +27,42 @@
</div> </div>
</div> </div>
<div class="ibox-content" style="display: block;"> <div class="ibox-content" style="display: block;">
<table class="table table-hover"> <form method="post" action="">
<thead> <table class="table table-hover">
<tr> <thead>
<th> <tr>
<div class="radio i-checks"> <th>
<input type="checkbox" value="1" name="j_is_active" checked> <div class="checkbox i-checks">
</div> <input onclick="selectAll()" type="checkbox" name="select_all" style="select_all" id="select_all">
</th> </div>
<th>ID</th> </th>
<th>组名</th> <th>ID</th>
<th>备注</th> <th>组名</th>
</tr> <th>备注</th>
</thead> </tr>
<tbody> </thead>
{% for group in groups %} <tbody>
<tr> {% for group in groups %}
<td> <tr>
<div class="radio i-checks"> <td>
<input type="checkbox" value="1" name="j_is_active" checked> <div class="checkbox i-checks">
</div> <input type="checkbox" value="{{ group.id }}" name="selected">
</td> </div>
<td>{{ group.id }}</td> </td>
<td>{{ group.name }}</td> <td>{{ group.id }}</td>
<td>{{ group.comment }}</td> <td>{{ group.name }}</td>
</tr> <td>{{ group.comment }}</td>
{% endfor %} </tr>
</tbody> {% endfor %}
</table> </tbody>
</table>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<button class="btn btn-white" type="submit">取消</button>
<button id="submit_button" class="btn btn-primary" type="submit">确认删除</button>
</div>
</div>
</form>
</div> </div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment