Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
0c30e8fd
Commit
0c30e8fd
authored
Jan 10, 2015
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ѡ
parent
662c48ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
29 deletions
+57
-29
views.py
juser/views.py
+2
-0
inspinia.js
static/js/inspinia.js
+19
-1
group_list.html
templates/juser/group_list.html
+36
-28
No files found.
juser/views.py
View file @
0c30e8fd
...
...
@@ -63,3 +63,5 @@ def user_add(request):
static/js/inspinia.js
View file @
0c30e8fd
...
...
@@ -144,6 +144,24 @@ function WinMove() {
opacity
:
0.8
,
})
.
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
;
}
}
}
templates/juser/group_list.html
View file @
0c30e8fd
...
...
@@ -27,34 +27,42 @@
</div>
</div>
<div
class=
"ibox-content"
style=
"display: block;"
>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th>
<div
class=
"radio i-checks"
>
<input
type=
"checkbox"
value=
"1"
name=
"j_is_active"
checked
>
</div>
</th>
<th>
ID
</th>
<th>
组名
</th>
<th>
备注
</th>
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr>
<td>
<div
class=
"radio i-checks"
>
<input
type=
"checkbox"
value=
"1"
name=
"j_is_active"
checked
>
</div>
</td>
<td>
{{ group.id }}
</td>
<td>
{{ group.name }}
</td>
<td>
{{ group.comment }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<form
method=
"post"
action=
""
>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th>
<div
class=
"checkbox i-checks"
>
<input
onclick=
"selectAll()"
type=
"checkbox"
name=
"select_all"
style=
"select_all"
id=
"select_all"
>
</div>
</th>
<th>
ID
</th>
<th>
组名
</th>
<th>
备注
</th>
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr>
<td>
<div
class=
"checkbox i-checks"
>
<input
type=
"checkbox"
value=
"{{ group.id }}"
name=
"selected"
>
</div>
</td>
<td>
{{ group.id }}
</td>
<td>
{{ group.name }}
</td>
<td>
{{ group.comment }}
</td>
</tr>
{% endfor %}
</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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment