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
70a6ddc8
Commit
70a6ddc8
authored
Sep 27, 2016
by
xiaokong1937@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #27
parent
49f00760
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
19 deletions
+35
-19
jumpserver.css
apps/static/css/jumpserver.css
+21
-0
_head_css_js.html
apps/templates/_head_css_js.html
+0
-8
user_list.html
apps/users/templates/users/user_list.html
+14
-11
No files found.
apps/static/css/jumpserver.css
View file @
70a6ddc8
...
...
@@ -78,4 +78,25 @@ th a {
border-top
:
none
!important
;
}
table
.dataTable
tbody
>
tr
.selected
,
table
.dataTable
tbody
>
tr
>
.selected
{
background-color
:
#1ab394
;
}
table
.dataTable
tbody
tr
.selected
a
,
table
.dataTable
tbody
th
.selected
a
,
table
.dataTable
tbody
td
.selected
a
,
table
.dataTable
tbody
tr
.selected
td
i
.text-navy
,
table
.dataTable
tbody
th
.selected
td
i
.text-navy
,
table
.dataTable
tbody
td
.selected
td
i
.text-navy
{
color
:
white
;
}
div
.dataTables_wrapper
div
.dataTables_filter
,
.dataTables_length
{
float
:
right
!important
;
}
div
.dataTables_wrapper
div
.dataTables_filter
{
margin-left
:
15px
;
}
apps/templates/_head_css_js.html
View file @
70a6ddc8
...
...
@@ -7,17 +7,9 @@
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
style
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
vaildator
/
jquery
.
validator
.
css
"
%}"
rel=
"stylesheet"
>
<!-- scripts -->
<script
src=
"{% static 'js/jquery-2.1.1.js' %}"
></script>
<!-- Sweet alert -->
<script
src=
"{% static 'js/plugins/sweetalert/sweetalert.min.js' %}"
></script>
<script
src=
"{% static 'js/bootstrap.min.js' %}"
></script>
apps/users/templates/users/user_list.html
View file @
70a6ddc8
...
...
@@ -2,16 +2,14 @@
{% load i18n static %}
{% get_current_language as LANGUAGE_CODE %}
{% load common_tags %}
{% block content_left_head %}
<a
href=
"{% url 'users:user-create' %}"
class=
"btn btn-sm btn-primary "
>
{% trans "Create user" %}
</a>
{% endblock %}
{% block table_search %}{% endblock %}
{% block table_container %}
<div
class=
"uc pull-left"
><a
href=
"{% url "
users:user-create
"
%}"
class=
"btn btn-sm btn-primary"
>
{% trans "Create user" %}
</a></div>
<table
class=
"table table-striped table-bordered table-hover "
id=
"user_list_table"
>
<thead>
<tr>
<th
class=
"text-center"
>
<div
class=
"checkbox checkbox-
success
"
><input
id=
""
type=
"checkbox"
class=
"ipt_check_all"
><label></label></div>
<div
class=
"checkbox checkbox-
default
"
><input
id=
""
type=
"checkbox"
class=
"ipt_check_all"
><label></label></div>
</th>
<th
class=
"text-center"
>
{% trans 'Name' %}
</a></th>
<th
class=
"text-center"
>
{% trans 'Username' %}
</a></th>
...
...
@@ -25,9 +23,7 @@
<tbody>
</tbody>
</table>
{% include "users/_user_bulk_update_modal.html" %}
{% endblock %}
{% block content_bottom_left %}
<div
id=
"actions"
class=
"hide"
>
<div
class=
"input-group"
>
<select
class=
"form-control m-b"
style=
"width: auto"
id=
"slct_bulk_update"
>
<option
value=
"delete"
>
{% trans 'Delete selected' %}
</option>
...
...
@@ -40,13 +36,18 @@
</button>
</div>
</div>
</div>
{% include "users/_user_bulk_update_modal.html" %}
{% endblock %}
{% block content_bottom_left %}
{% endblock %}
{% block custom_foot_js %}
<script>
jumpserver
.
checked
=
false
;
$
(
document
).
ready
(
function
(){
var
table
=
$
(
'#user_list_table'
).
DataTable
({
dom
:
'<"html5buttons"B>lftip'
,
pageLength
:
25
,
dom
:
'<"uc pull-left"><"html5buttons"B>flti<"row m-t"<"#sth.col-md-6"><"col-md-6"p>>'
,
language
:
{
url
:
"{% static 'js/plugins/dataTables/i18n/language_code.json' %}"
.
replace
(
'language_code'
,
'{{ LANGUAGE_CODE }}'
)
},
...
...
@@ -79,7 +80,7 @@ $(document).ready(function(){
columnDefs
:
[
{
targets
:
0
,
orderable
:
false
,
createdCell
:
function
(
td
)
{
$
(
td
).
html
(
'<div class="checkbox checkbox-
success
"><input type="checkbox" class="ipt_check"><label></label></div>'
);
$
(
td
).
html
(
'<div class="checkbox checkbox-
default
"><input type="checkbox" class="ipt_check"><label></label></div>'
);
}
},
{
className
:
'text-center'
,
targets
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
]},
...
...
@@ -103,7 +104,7 @@ $(document).ready(function(){
}
}
},
{
targets
:
2
,
{
targets
:
1
,
createdCell
:
function
(
td
,
cellData
,
rowData
)
{
var
detail_btn
=
'<a href="{% url "users:user-detail" pk=99991937 %}">'
+
cellData
+
'</a>'
;
$
(
td
).
html
(
detail_btn
.
replace
(
'99991937'
,
rowData
.
id
));
...
...
@@ -117,8 +118,8 @@ $(document).ready(function(){
},
columns
:
[
{
data
:
function
(){
return
""
}
},
{
data
:
"name"
},
{
data
:
"username"
},
{
data
:
"name"
},
{
data
:
"get_role_display"
},
{
data
:
"group_display"
},
{
data
:
function
(){
return
999
}
},
...
...
@@ -132,6 +133,8 @@ $(document).ready(function(){
}).
on
(
'deselect'
,
function
(
e
,
dt
,
type
,
indexes
)
{
var
$node
=
table
[
type
](
indexes
).
nodes
().
to$
();
$node
.
find
(
'input.ipt_check'
).
prop
(
'checked'
,
false
);
}).
on
(
'draw'
,
function
(){
$
(
'#sth'
).
html
(
$
(
'#actions'
).
html
());
});
}).
on
(
'click'
,
'#btn_bulk_update'
,
function
(){
var
action
=
$
(
'#slct_bulk_update'
).
val
();
...
...
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