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
c4196e7d
Commit
c4196e7d
authored
Jan 26, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改组方面授权
parent
ca3d4de8
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
748 additions
and
145 deletions
+748
-145
models.py
jperm/models.py
+15
-5
urls.py
jperm/urls.py
+4
-1
views.py
jperm/views.py
+27
-9
custom.css
static/css/plugins/iCheck/custom.css
+260
-60
icheck.min.js
static/js/plugins/iCheck/icheck.min.js
+9
-9
css_js.html
templates/css_js.html
+0
-34
perm_group_edit.html
templates/jperm/perm_group_edit.html
+152
-0
perm_host.html
templates/jperm/perm_host.html
+4
-4
perm_user_detail.html
templates/jperm/perm_user_detail.html
+48
-0
perm_user_edit.html
templates/jperm/perm_user_edit.html
+0
-0
user_add.html
templates/juser/user_add.html
+60
-1
user_list.html
templates/juser/user_list.html
+7
-4
user_list1.html
templates/juser/user_list1.html
+131
-0
link_css.html
templates/link_css.html
+1
-4
script.html
templates/script.html
+30
-14
No files found.
jperm/models.py
View file @
c4196e7d
from
django.db
import
models
from
django.db
import
models
from
juser.models
import
User
from
juser.models
import
User
,
UserGroup
from
jasset.models
import
Asset
from
jasset.models
import
Asset
,
BisGroup
class
Perm
(
models
.
Model
):
class
Perm
User
(
models
.
Model
):
user
=
models
.
ForeignKey
(
User
)
user
=
models
.
ForeignKey
(
User
)
asset
=
models
.
ForeignKey
(
Asset
)
asset
=
models
.
ForeignKey
(
Asset
)
asset_group
=
models
.
ForeignKey
(
BisGroup
)
def
__unicode__
(
self
):
def
__unicode__
(
self
):
return
'
%
s_
%
s'
%
(
self
.
user
.
username
,
self
.
asset
.
ip
)
return
'
%
s_
%
s'
%
(
self
.
user
.
username
,
self
.
asset
.
ip
)
\ No newline at end of file
class
PermUserGroup
(
models
.
Model
):
group
=
models
.
ForeignKey
(
UserGroup
)
asset
=
models
.
ForeignKey
(
Asset
)
asset_group
=
models
.
ForeignKey
(
BisGroup
)
def
__unicode__
(
self
):
return
'
%
s_
%
s'
%
(
self
.
group
.
name
,
self
.
asset
.
ip
)
\ No newline at end of file
jperm/urls.py
View file @
c4196e7d
...
@@ -10,5 +10,8 @@ urlpatterns = patterns('jperm.views',
...
@@ -10,5 +10,8 @@ urlpatterns = patterns('jperm.views',
(
r'^perm_add/$'
,
'perm_add'
),
(
r'^perm_add/$'
,
'perm_add'
),
(
r'^perm_user_show/$'
,
'perm_user_show'
),
(
r'^perm_user_show/$'
,
'perm_user_show'
),
(
r'^perm_host/$'
,
'perm_list'
),
(
r'^perm_host/$'
,
'perm_list'
),
(
r'^perm_edit/$'
,
'perm_edit'
),
(
r'^perm_user_edit/$'
,
'perm_user_edit'
),
(
r'^perm_user_detail/$'
,
'perm_user_detail'
),
(
r'^perm_group_edit/$'
,
'perm_group_edit'
),
(
r'^perm_group_detail/$'
,
'perm_group_detail'
),
)
)
jperm/views.py
View file @
c4196e7d
...
@@ -28,14 +28,15 @@ def perm_host(request):
...
@@ -28,14 +28,15 @@ def perm_host(request):
return
render_to_response
(
'jperm/perm_host.html'
,
locals
())
return
render_to_response
(
'jperm/perm_host.html'
,
locals
())
def
perm_user_host
(
username
,
ip
):
def
perm_user_host
(
username
,
ip
s
):
user
=
User
.
objects
.
get
(
username
=
username
)
user
=
User
.
objects
.
get
(
username
=
username
)
asset
=
Asset
.
objects
.
get
(
ip
=
ip
)
user
.
perm_set
.
all
()
.
delete
()
if
not
Perm
.
objects
.
filter
(
user
=
user
,
asset
=
asset
):
for
ip
in
ips
:
asset
=
Asset
.
objects
.
get
(
ip
=
ip
)
Perm
.
objects
.
create
(
user
=
user
,
asset
=
asset
)
Perm
.
objects
.
create
(
user
=
user
,
asset
=
asset
)
def
perm_edit
(
request
):
def
perm_
user_
edit
(
request
):
header_title
,
path1
,
path2
=
u'授权编辑 | Perm Edit.'
,
u'jperm'
,
u'perm_edit'
header_title
,
path1
,
path2
=
u'授权编辑 | Perm Edit.'
,
u'jperm'
,
u'perm_edit'
if
request
.
method
==
'GET'
:
if
request
.
method
==
'GET'
:
if
request
.
GET
.
get
(
'id'
,
None
):
if
request
.
GET
.
get
(
'id'
,
None
):
...
@@ -46,16 +47,33 @@ def perm_edit(request):
...
@@ -46,16 +47,33 @@ def perm_edit(request):
for
perm
in
user
.
perm_set
.
all
():
for
perm
in
user
.
perm_set
.
all
():
assets_permed
.
append
(
perm
.
asset
)
assets_permed
.
append
(
perm
.
asset
)
assets_unperm
=
list
(
set
(
assets
)
-
set
(
assets_permed
))
assets_unperm
=
list
(
set
(
assets
)
-
set
(
assets_permed
))
return
render_to_response
(
'jperm/perm_edit.html'
,
locals
())
return
render_to_response
(
'jperm/perm_
user_
edit.html'
,
locals
())
else
:
else
:
host_ips
=
request
.
POST
.
getlist
(
'host_permed'
,
''
)
host_ips
=
request
.
POST
.
getlist
(
'host_permed'
,
''
)
username
=
request
.
POST
.
get
(
'username'
)
username
=
request
.
POST
.
get
(
'username'
)
for
ip
in
host_ips
:
perm_user_host
(
username
,
host_ips
)
perm_user_host
(
username
,
ip
)
return
HttpResponseRedirect
(
'/jperm/perm_host/'
)
return
HttpResponseRedirect
(
'/jperm/perm_host/'
)
def
perm_user_detail
(
request
):
user_id
=
request
.
GET
.
get
(
'id'
,
''
)
user
=
User
.
objects
.
get
(
id
=
user_id
)
host_permed
=
[]
for
perm
in
user
.
perm_set
.
all
():
host_permed
.
append
(
perm
.
asset
)
return
render_to_response
(
'jperm/perm_user_detail.html'
,
locals
())
def
perm_group_edit
(
request
):
if
request
.
method
==
'GET'
:
group_id
=
request
.
GET
.
get
(
'id'
,
''
)
group
=
UserGroup
.
objects
.
get
(
id
=
group_id
)
return
render_to_response
(
'jperm/perm_group_edit.html'
)
def
perm_add
(
request
):
def
perm_add
(
request
):
header_title
,
path1
,
path2
=
u'添加授权 | Add User perm.'
,
u'授权管理'
,
u'添加授权'
header_title
,
path1
,
path2
=
u'添加授权 | Add User perm.'
,
u'授权管理'
,
u'添加授权'
if
request
.
method
==
'GET'
:
if
request
.
method
==
'GET'
:
...
@@ -76,8 +94,8 @@ def perm_add(request):
...
@@ -76,8 +94,8 @@ def perm_add(request):
host_ids
=
request
.
POST
.
getlist
(
'host_ids'
,
None
)
host_ids
=
request
.
POST
.
getlist
(
'host_ids'
,
None
)
user
=
User
.
objects
.
get
(
username
=
username
)
user
=
User
.
objects
.
get
(
username
=
username
)
for
id
in
host_ids
:
for
host_
id
in
host_ids
:
asset
=
Asset
.
objects
.
get
(
id
=
id
)
asset
=
Asset
.
objects
.
get
(
id
=
host_
id
)
perm
=
Perm
(
user
=
user
,
asset
=
asset
)
perm
=
Perm
(
user
=
user
,
asset
=
asset
)
perm
.
save
()
perm
.
save
()
msg
=
u'添加成功'
msg
=
u'添加成功'
...
...
static/css/plugins/iCheck/custom.css
View file @
c4196e7d
/* iCheck plugin Square skin, green
@import
url("normalize.css")
;
----------------------------------- */
@font-face
{
font-family
:
'MontserratRegular'
;
src
:
url("./montserrat-regular.eot")
;
src
:
url("./montserrat-regular.eot?#iefix")
format
(
'embedded-opentype'
),
url("./montserrat-regular.woff")
format
(
'woff'
),
url("./montserrat-regular.ttf")
format
(
'truetype'
),
url("./montserrat-regular.svg#MontserratRegular")
format
(
'svg'
);
font-style
:
normal
;
font-weight
:
normal
}
.icheckbox_square-green
,
@font-face
{
font-family
:
'MontserratBold'
;
src
:
url("./montserrat-bold.eot")
;
src
:
url("./montserrat-bold.eot?#iefix")
format
(
'embedded-opentype'
),
url("./montserrat-bold.woff")
format
(
'woff'
),
url("./montserrat-bold.ttf")
format
(
'truetype'
),
url("./montserrat-bold.svg#MontserratBold")
format
(
'svg'
);
font-style
:
normal
;
font-weight
:
bold
}
.iradio_square-green
{
html
,
body
{
height
:
100%
}
display
:
inline-block
;
body
{
font
:
14px
/
20px
'MontserratRegular'
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#222
;
background
:
#ebe7df
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAFZCAIAAAA96mnzAAACKklEQVR4Xn2VUW7kMAxD+QLf/1x7gv71LNwdKTLhZFtggMCwSVEUPdb3159/v0uSrM8HtGRZuoQk1R69J12o9ixJWvSnVyfLdbNw0XAXWe1fIL8BoqmNGiV/cHc9Gq4NXxLKHhteRyLpA28cl0SLdx0BckSWL4gkPlIVTg1nN9Ys3iyWI5AGDA5xOXB5BJaWmOw6KSLeU6+0P50QshQyEL2im/YMIL60dTSZ3RXenlkiJpMj8XPMAl1FtjMRW19NxzOE5VGWPVGrc7aSJgz1Y9ku57mpYSwn1h0ivFOXxoCKMCXiahbbZNIZR+tkphllPsomipCwb4GMkXTmPfVg40Jt2y4RQM/PqX5JTM4iiTN8Zz1XvbIAEEvoEW+3nxTLL3lB7t7J3WwyI7g5OVxKIeFEH4FIGLC9I+XqvSd4AxJM5O6WTPr54RAxLG44FVrEuz+kFdXyLiuX6kLPVLZL2ISlcHNlBIKm5rR8nEi9wJeA6Y8JZlJOyDiin0K5ag+AXHtALBicXasjIUu9h0STBbCMU+89gMnu/J05MU1QWqdbPMRPIZIzDgsi8Olg5t7wHhUg/pv5RUzO+BHDmczHkAfZWxlSYgNI5Ig5XRoc66dW9L45eHDkbkqCO7RLG5cna/HD7YhZnfINkFo8iNyj5kx6pFrxNGRlfhV2e1Zt5DnGU8T7Tud1ivi8jU8/3Zy88pkn6+zdXiJ7AVSFBZA3VcwDfXtt5UUHS38B35hQVuJip4MAAAAASUVORK5CYII=")
repeat-x
;
*
background-image
:
url("ie/header-line.png")
}
*
display
:
inline
;
a
{
color
:
#222
;
text-decoration
:
none
;
border-bottom
:
1px
solid
#bbb
;}
vertical-align
:
middle
;
a
:hover
{
color
:
#000
}
margin
:
0
;
a
,
.self
{
-webkit-transition
:
color
.1s
;
-moz-transition
:
color
.1s
;
-ms-transition
:
color
.1s
;
-o-transition
:
color
.1s
;
transition
:
color
.1s
}
padding
:
0
;
.self
{
color
:
#333
;
border-bottom
:
1px
dotted
#aaa
;
cursor
:
pointer
;}
width
:
22px
;
.self
:hover
{
color
:
#000
}
height
:
22px
;
strong
{
font-family
:
'MontserratBold'
,
Helvetica
,
Arial
,
sans-serif
;
font-weight
:
700
}
background
:
url(green.png)
no-repeat
;
p
{
margin
:
0
0
8px
}
border
:
none
;
label
{
cursor
:
pointer
}
cursor
:
pointer
;
h1
,
h2
,
h3
,
h4
{
margin
:
0
;
font
:
bold
20px
/
60px
'MontserratBold'
,
Helvetica
,
Arial
,
sans-serif
}
}
h2
{
height
:
60px
;
text-align
:
center
;
text-transform
:
uppercase
}
h4
{
font-size
:
18px
;
line-height
:
24px
}
.icheckbox_square-green
{
ul
{
margin
:
0
;
padding
:
0
;
list-style
:
none
}
background-position
:
0
0
;
table
{
width
:
100%
;
margin-bottom
:
21px
}
}
th
,
td
{
padding
:
11px
20px
12px
;
vertical-align
:
top
;
font-weight
:
normal
;
text-align
:
left
;
border-bottom
:
2px
solid
#e7e5e0
;}
.icheckbox_square-green.hover
{
thead
th
,
thead
td
{
background
:
#f3f2ef
}
background-position
:
-24px
0
;
th
{
white-space
:
nowrap
}
}
td
{
width
:
100%
}
.icheckbox_square-green.checked
{
.focus
{
outline
:
1px
dotted
rgba
(
0
,
0
,
0
,
0.5
)
!important
}
background-position
:
-48px
0
;
.clear
{
position
:
relative
;
*
zoom
:
1
;}
}
.clear
:before
,
.clear
:after
{
content
:
''
;
display
:
table
;
clear
:
both
}
.icheckbox_square-green.disabled
{
.layout
{
width
:
930px
;
margin
:
0
auto
;
padding
:
0
15px
}
background-position
:
-72px
0
;
.header
{
padding
:
115px
0
73px
;
color
:
#fff
;
text-align
:
center
;}
cursor
:
default
;
.header
h1
,
.header
strong
{
letter-spacing
:
-1px
;
text-transform
:
uppercase
}
}
.header
h1
{
padding-bottom
:
23px
;
font-size
:
22px
;
line-height
:
28px
}
.icheckbox_square-green.checked.disabled
{
.header
h3
{
position
:
relative
;
padding
:
35px
0
17px
;
font-size
:
120px
;
line-height
:
140px
;
letter-spacing
:
-5px
;}
background-position
:
-96px
0
;
.header
h3
span
{
font-size
:
30px
;
line-height
:
40px
;
letter-spacing
:
0
;
margin-left
:
-10px
;
vertical-align
:
baseline
;}
}
.header
h3
:before
{
content
:
''
;
display
:
inline-block
;
width
:
72px
;
height
:
64px
;
margin-right
:
32px
;
vertical-align
:
middle
;
background
:
url("icheck.png")
}
.header
h3
:after
{
content
:
''
;
position
:
absolute
;
top
:
0
;
left
:
50%
;
width
:
100px
;
margin-left
:
-50px
;
border-top
:
3px
solid
#fff
}
.iradio_square-green
{
.header
strong
{
font
:
24px
/
30px
'MontserratRegular'
,
Helvetica
,
Arial
,
sans-serif
;}
background-position
:
-120px
0
;
.header
strong
a
{
color
:
#fff
;
border-bottom-color
:
#fff
}
}
.features
{
position
:
relative
;
font-size
:
16px
;
color
:
#555
;
background
:
#fff
;}
.iradio_square-green.hover
{
.features
.self
{
color
:
#555
;
border-bottom-color
:
#bbb
;}
background-position
:
-144px
0
;
.features
.self
:hover
{
color
:
#222
}
}
.features
.arrows
{
top
:
0
}
.iradio_square-green.checked
{
.features
:hover
.arrows
.bottom
{
left
:
0
}
background-position
:
-168px
0
;
.features
h2
{
color
:
#fff
;
background
:
#2489c5
}
}
.features
ul
{
padding
:
44px
60px
36px
}
.iradio_square-green.disabled
{
.features
li
{
padding
:
0
0
9px
36px
;
background
:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABI0lEQVR4XpXSP0vDUBjF4ZtLkIr4EYzduogdXJTWWV2FLMVNoQrdAhlUUFAEcejo1q13svgFBAUdxA/g30kcdQoIIlL9DWcKuZEeeOCl99w3gTSI49h4MoFb/KCJz6KShS/rOh/TbEZZECLBiSQIR1nQQgAnAVr/LZjEnIq76OJbutjRGR26isUB3pDhBikucWoUzVdI1cl05zBk2MI5jvCKIfL5QluzxTS20bY6WENdl0ujTl13Ni3DABtwWEFp1HG6M7Aq9NHBGRbgy7w6HfTzX6GHCyyXPV2dnu9/MIUX+PIMOkRsbq7hHkZmxciDOrZoQRUVPCGCw504RDobR7VoQQ0f2Mejls1IRb/t4R10CcLc6/2igSVcw8gqFnEMOnSVPxQqQaPw2y7fAAAAAElFTkSuQmCC")
0
1px
no-repeat
;
*
background-image
:
url("ie/icon-star.png")
;}
background-position
:
-192px
0
;
.features
li
.offset
{
margin-top
:
20px
}
cursor
:
default
;
.mark
{
padding
:
0
2px
;
color
:
#777
;
background
:
#e7e5e0
;}
}
.skin-polaris
.mark
{
background
:
#232830
}
.iradio_square-green.checked.disabled
{
.skin-futurico
.mark
{
background
:
#25262a
}
background-position
:
-216px
0
;
.social
{
height
:
60px
;
margin-bottom
:
60px
;
padding
:
0
60px
;
font-size
:
16px
;
color
:
#555
;
background
:
#f5f3ef
;}
}
.social
a
{
color
:
#777
;
border-bottom-color
:
#ccc
;}
.social
a
:hover
{
color
:
#444
}
/* HiDPI support */
.social
.left
{
float
:
left
;
padding-top
:
19px
;}
@media
(
-o-min-device-pixel-ratio
:
5
/
4
),
(
-webkit-min-device-pixel-ratio
:
1.25
),
(
min-resolution
:
120dpi
)
{
.social
.left
li
{
float
:
left
;
padding-right
:
30px
;}
.icheckbox_square-green
,
.social
.left
li
a
{
position
:
relative
}
.iradio_square-green
{
.social
.right
{
float
:
right
;
padding-top
:
20px
;}
background-image
:
url(green@2x.png)
;
.social
.right
li
{
float
:
right
;
padding-left
:
10px
}
-webkit-background-size
:
240px
24px
;
.social
.right.local
{
padding-top
:
19px
;}
background-size
:
240px
24px
;
.social
.right.local
li
{
padding-left
:
30px
;
font-size
:
14px
}
}
.demo-holder
{
margin-bottom
:
97px
}
}
.demo-title
{
padding-bottom
:
36px
;
font-size
:
26px
;
letter-spacing
:
-1px
}
\ No newline at end of file
.demo
{
position
:
relative
;}
.demo
:hover
.arrows
.top
,
.demo
:hover
.arrows
.bottom
{
left
:
0
}
.demo-list
{
position
:
relative
;
margin-right
:
360px
;
padding
:
33px
57px
17px
;
color
:
#555
;
background
:
#fff
;
border
:
3px
solid
#ddd8ce
;}
.demo-list
ul
{
float
:
right
;
white-space
:
nowrap
;}
.demo-list
ul
:first-child
{
float
:
left
}
.demo-list
ul
li
{
position
:
relative
;
padding
:
0
0
18px
42px
}
.demo-list
ul
input
{
position
:
absolute
;
top
:
4px
;
left
:
0
}
.demo-list
ul
.icheckbox_square-blue
,
.demo-list
ul
.iradio_square-blue
{
position
:
absolute
;
top
:
-1px
;
left
:
0
}
.demo-list
ul
span
{
color
:
#bbb
}
.demo-methods
{
padding
:
21px
360px
0
0
;}
.demo-methods
.mark
{
background
:
#d3cfc6
}
.demo-methods
dt
{
position
:
relative
;
padding
:
17px
150px
18px
0
;
font
:
16px
/
24px
'MontserratRegular'
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#444
;
border-bottom
:
3px
solid
#ddd8ce
;}
.demo-methods
dt
.self
{
cursor
:
pointer
;}
.demo-methods
dt
.self
:hover
{
color
:
#222
}
.demo-methods
dt
.code
{
position
:
absolute
;
right
:
0
;
bottom
:
18px
;
color
:
#777
;}
.demo-methods
dt
.code
.self
:hover
{
color
:
#444
}
.demo-methods
dd
{
position
:
relative
;
display
:
none
;
margin
:
0
;
background
:
#fff
;
border
:
3px
solid
#ddd8ce
;
border-top
:
none
;}
.demo-methods
dd
:before
{
content
:
''
;
position
:
absolute
;
top
:
-13px
;
left
:
0
;
width
:
0
;
height
:
0
;
border
:
5px
solid
transparent
;
border-bottom-color
:
#ddd8ce
;
border-left-color
:
#ddd8ce
}
.demo-methods
dd
.markup
{
margin
:
0
;
color
:
#888
;
background
:
#f5f3ef
;
border
:
none
;}
.demo-methods
dd
.markup
.comment
{
color
:
#aaa
}
.demo-callbacks
{
position
:
absolute
;
top
:
0
;
right
:
0
;
bottom
:
0
;
width
:
300px
;
color
:
#aaa
;
background
:
#232323
;
border
:
3px
solid
#ddd8ce
;}
.demo-callbacks
h2
{
color
:
#fff
;
background
:
#6a5a8c
}
.demo-callbacks
ul
{
position
:
absolute
;
top
:
60px
;
width
:
100%
;
bottom
:
0
;
overflow
:
auto
;}
.demo-callbacks
ul
::-webkit-scrollbar
{
width
:
10px
;
background
:
none
;}
.demo-callbacks
ul
::-webkit-scrollbar-track
{
background
:
none
;
border
:
none
;}
.demo-callbacks
ul
::-webkit-scrollbar-track-piece:disabled
{
display
:
none
!important
;}
.demo-callbacks
ul
::-webkit-scrollbar-thumb
{
background
:
rgba
(
255
,
255
,
255
,
.25
);
border
:
none
;}
.demo-callbacks
ul
::-webkit-scrollbar-thumb:hover
{
background
:
rgba
(
255
,
255
,
255
,
.3
);}
.demo-callbacks
ul
li
{
margin-top
:
-1px
;
padding
:
13px
20px
15px
;
border-top
:
1px
solid
#2e2e2e
;}
.demo-callbacks
ul
li
span
{
color
:
#888
}
.skins
{
position
:
relative
;
*
zoom
:
1
;}
.skins
h2
{
position
:
absolute
;
top
:
-38px
;
right
:
0
;
left
:
0
;
font-size
:
24px
;
text-align
:
center
}
.arrows
{
position
:
absolute
;
top
:
3px
;
left
:
-60px
;
width
:
60px
;
overflow
:
hidden
;}
.arrows
.top
,
.arrows
.bottom
{
position
:
relative
;
left
:
60px
;
width
:
60px
;
height
:
60px
;
cursor
:
pointer
;
-webkit-transition
:
left
.3s
,
background-color
.2s
;
-moz-transition
:
left
.3s
,
background-color
.2s
;
-ms-transition
:
left
.3s
,
background-color
.2s
;
-o-transition
:
left
.3s
,
background-color
.2s
;
transition
:
left
.3s
,
background-color
.2s
}
.arrows
.top
{
background
:
#83b3be
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAALCAYAAACZIGYHAAAAdklEQVR4Xo3MuwmFQBiE0b0FmAuutnRBsAARLMTYRzvWItiEYLq/s6CYyMwGXzTDcWbG8mhEf/ZjQIV2ZCigjiASMAVJIAVKAQ4FKWBDJVoYpAB/7z8GRaAQgBNQG8dZA28f0BmHBgUCKGh9hhpNKH8BWY8GlF2OH3hCC1zmdAAAAABJRU5ErkJggg==")
50%
no-repeat
;
*
background-image
:
url("ie/arrow-top.png")
;}
.arrows
.top
:hover
{
background-color
:
#6ba4b1
}
.arrows
.bottom
{
background
:
#e2b78d
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAALCAYAAACZIGYHAAAAf0lEQVR4Xo3MzQmEQBCE0TGAvQuOpiQIBiCCgXj2J52NRTAJwev0Vh+WOgjlNHyHguYFM/M6tKLSd2YTmtHHR48S8jtQzAB2430d2bgJvQLsdqRCZwZUPAFLaPjrjYAUMKLgwBtUK4CIhi4BEFGQBohISANEJKQBIqqIFtSqvx/0bXhCCUrgiAAAAABJRU5ErkJggg==")
50%
no-repeat
;
*
background-image
:
url("ie/arrow-bottom.png")
;}
.arrows
.bottom
:hover
{
background-color
:
#dba571
}
@media
screen
and
(
max-width
:
1049px
){
.arrows
,
.fork-me
{
display
:
none
}
}
.skin
{
position
:
relative
;
margin-bottom
:
40px
;}
.skin
:hover
.arrows
.top
,
.skin
:hover
.arrows
.bottom
{
left
:
0
}
.skin
h3
{
position
:
relative
;
z-index
:
20
;
float
:
left
;
height
:
60px
;
padding
:
0
57px
;
line-height
:
58px
;
background
:
#fff
;
border
:
3px
solid
#ddd8ce
;
border-bottom
:
none
;}
.skin
h3
:before
{
content
:
''
;
position
:
absolute
;
top
:
100%
;
left
:
0
;
width
:
100%
;
height
:
2px
;
margin-top
:
-1px
;
background
:
#fff
}
.skin.skin-polaris
h3
{
color
:
#cacdd1
;
background
:
#2c323c
;}
.skin.skin-polaris
h3
:before
{
background
:
#2c323c
}
.skin.skin-futurico
h3
{
color
:
#c3c3c3
;
background
:
#2e3035
;}
.skin.skin-futurico
h3
:before
{
background
:
#2e3035
}
.skin
dl
{
z-index
:
10
;
width
:
100%
;
margin
:
0
}
.skin
dt
{
position
:
relative
;
top
:
-53px
;
right
:
-3px
;
float
:
right
;
height
:
47px
;
margin-right
:
-3px
;
padding
:
0
57px
;
line-height
:
47px
;
border
:
3px
solid
#ddd8ce
;
cursor
:
pointer
;}
.skin
dt
:hover
{
background
:
#f0ede7
;
border-bottom
:
3px
solid
#ddd8ce
}
.skin
dt
.selected
{
height
:
50px
;
background
:
#fff
;
border-bottom
:
none
;
cursor
:
default
;}
.skin
dt
.selected
:before
{
content
:
''
;
position
:
absolute
;
top
:
100%
;
left
:
0
;
width
:
100%
;
height
:
2px
;
margin-top
:
-1px
;
background
:
#fff
}
.skin.skin-polaris
dt
{
color
:
#cacdd1
;
background
:
#647083
;}
.skin.skin-polaris
dt
:hover
{
background
:
#4a5361
}
.skin.skin-polaris
dt
.selected
{
background
:
#2c323c
;}
.skin.skin-polaris
dt
.selected
:before
{
background
:
#2c323c
}
.skin.skin-futurico
dt
{
color
:
#c3c3c3
;
background
:
#676c77
;}
.skin.skin-futurico
dt
:hover
{
background
:
#4b4e56
}
.skin.skin-futurico
dt
.selected
{
background
:
#2e3035
;}
.skin.skin-futurico
dt
.selected
:before
{
background
:
#2e3035
}
.skin
dd
{
position
:
relative
;
display
:
none
;
float
:
left
;
width
:
100%
;
margin
:
-3px
-100%
0
0
;
overflow
:
hidden
;
color
:
#444
;
background
:
#fff
;
border
:
3px
solid
#ddd8ce
;}
.skin
dd
.selected
{
display
:
block
}
.skin
dd
a
{
color
:
#444
;}
.skin
dd
a
:hover
{
color
:
#111
}
.skin.skin-polaris
dd
{
color
:
#7a828b
;
background
:
#2c323c
;}
.skin.skin-polaris
dd
a
{
color
:
#7a828b
;
border-bottom-color
:
#4e596b
;}
.skin.skin-polaris
dd
a
:hover
{
color
:
#a2a7ae
}
.skin.skin-futurico
dd
{
color
:
#888
;
background
:
#2e3035
;}
.skin.skin-futurico
dd
a
{
color
:
#888
;
border-bottom-color
:
#545861
;}
.skin.skin-futurico
dd
a
:hover
{
color
:
#aaa
}
.skin-section
{
float
:
left
;
padding
:
42px
0
31px
57px
;
line-height
:
18px
;}
.skin-section
h4
{
padding-bottom
:
18px
;}
.skin-polaris
.skin-section
h4
{
color
:
#959ba2
}
.skin-futurico
.skin-section
h4
{
color
:
#a0a0a0
}
.skin-section
.list
{
float
:
left
;
padding-right
:
60px
;}
.skin-section
.list
li
{
position
:
relative
;
padding-bottom
:
15px
}
.skin-minimal
.skin-section
.list
li
{
padding-left
:
38px
}
.skin-square
.skin-section
.list
li
{
padding-left
:
42px
}
.skin-flat
.skin-section
.list
li
,
.skin-line
.skin-section
label
{
padding-left
:
40px
}
.skin-line
.skin-section
h4
{
padding-bottom
:
24px
}
.skin-line
.skin-section
.list
{
padding-right
:
40px
;}
.skin-line
.skin-section
.list
li
{
padding-bottom
:
10px
}
.skin-polaris
.skin-section
.list
li
{
padding-left
:
37px
}
.skin-futurico
.skin-section
.list
li
{
padding-left
:
36px
}
.icheckbox_minimal
,
.icheckbox_minimal-red
,
.icheckbox_minimal-green
,
.icheckbox_minimal-blue
,
.icheckbox_minimal-aero
,
.icheckbox_minimal-grey
,
.icheckbox_minimal-orange
,
.icheckbox_minimal-yellow
,
.icheckbox_minimal-pink
,
.icheckbox_minimal-purple
,
.iradio_minimal
,
.iradio_minimal-red
,
.iradio_minimal-green
,
.iradio_minimal-blue
,
.iradio_minimal-aero
,
.iradio_minimal-grey
,
.iradio_minimal-orange
,
.iradio_minimal-yellow
,
.iradio_minimal-pink
,
.iradio_minimal-purple
{
position
:
absolute
;
top
:
1px
;
left
:
0
}
.skin
input
[
type
=
checkbox
],
.skin
input
[
type
=
radio
]
{
position
:
absolute
;
top
:
2px
;
left
:
0
}
.icheckbox_square
,
.icheckbox_square-red
,
.icheckbox_square-green
,
.icheckbox_square-blue
,
.icheckbox_square-aero
,
.icheckbox_square-grey
,
.icheckbox_square-orange
,
.icheckbox_square-yellow
,
.icheckbox_square-pink
,
.icheckbox_square-purple
,
.iradio_square
,
.iradio_square-red
,
.iradio_square-green
,
.iradio_square-blue
,
.iradio_square-aero
,
.iradio_square-grey
,
.iradio_square-orange
,
.iradio_square-yellow
,
.iradio_square-pink
,
.iradio_square-purple
{
position
:
absolute
;
top
:
-1px
;
left
:
0
}
.icheckbox_flat
,
.icheckbox_flat-red
,
.icheckbox_flat-green
,
.icheckbox_flat-blue
,
.icheckbox_flat-aero
,
.icheckbox_flat-grey
,
.icheckbox_flat-orange
,
.icheckbox_flat-yellow
,
.icheckbox_flat-pink
,
.icheckbox_flat-purple
,
.iradio_flat
,
.iradio_flat-red
,
.iradio_flat-green
,
.iradio_flat-blue
,
.iradio_flat-aero
,
.iradio_flat-grey
,
.iradio_flat-orange
,
.iradio_flat-yellow
,
.iradio_flat-pink
,
.iradio_flat-purple
{
position
:
absolute
;
top
:
0
;
left
:
0
}
.icheckbox_polaris
,
.iradio_polaris
{
position
:
absolute
;
top
:
-4px
;
left
:
-6px
}
.icheckbox_futurico
,
.iradio_futurico
{
position
:
absolute
;
top
:
2px
;
left
:
0
}
.skin-states
{
float
:
right
;
padding-right
:
57px
;
padding-left
:
0
;}
.skin-states
.state
{
cursor
:
default
!important
}
.skin-states
.list
{
padding-right
:
0
}
.skin-minimal
.skin-states
.list
li
{
padding-left
:
71px
}
.skin-square
.skin-states
.list
li
{
padding-left
:
79px
}
.skin-flat
.skin-states
.list
li
{
padding-left
:
75px
}
.skin-line
.skin-states
.list
{
padding-right
:
0
}
.skin-polaris
.skin-states
.list
li
{
padding-left
:
69px
}
.skin-futurico
.skin-states
.list
li
{
padding-left
:
67px
}
.skin-states
.iradio_minimal
,
.skin-states
.iradio_minimal-red
,
.skin-states
.iradio_minimal-green
,
.skin-states
.iradio_minimal-blue
,
.skin-states
.iradio_minimal-aero
,
.skin-states
.iradio_minimal-grey
,
.skin-states
.iradio_minimal-orange
,
.skin-states
.iradio_minimal-yellow
,
.skin-states
.iradio_minimal-pink
,
.skin-states
.iradio_minimal-purple
{
left
:
33px
}
.skin-states
.iradio_square
,
.skin-states
.iradio_square-red
,
.skin-states
.iradio_square-green
,
.skin-states
.iradio_square-blue
,
.skin-states
.iradio_square-aero
,
.skin-states
.iradio_square-grey
,
.skin-states
.iradio_square-orange
,
.skin-states
.iradio_square-yellow
,
.skin-states
.iradio_square-pink
,
.skin-states
.iradio_square-purple
{
left
:
37px
}
.skin-states
.iradio_flat
,
.skin-states
.iradio_flat-red
,
.skin-states
.iradio_flat-green
,
.skin-states
.iradio_flat-blue
,
.skin-states
.iradio_flat-aero
,
.skin-states
.iradio_flat-grey
,
.skin-states
.iradio_flat-orange
,
.skin-states
.iradio_flat-yellow
,
.skin-states
.iradio_flat-pink
,
.skin-states
.iradio_flat-purple
{
left
:
35px
}
.skin-states
.iradio_polaris
{
left
:
26px
}
.skin-states
.iradio_futurico
{
left
:
31px
}
.colors
{
clear
:
both
;
padding
:
24px
0
9px
;}
.skin-line
.colors
{
padding-top
:
28px
}
.colors
strong
{
float
:
left
;
line-height
:
20px
;
margin-right
:
20px
}
.colors
li
{
position
:
relative
;
float
:
left
;
width
:
16px
;
height
:
16px
;
margin
:
2px
1px
0
0
;
background
:
#000
;
cursor
:
pointer
;
filter
:
alpha
(
opacity
=
50
);
opacity
:
.5
;
-webkit-transition
:
opacity
.2s
;
-moz-transition
:
opacity
.2s
;
-ms-transition
:
opacity
.2s
;
-o-transition
:
opacity
.2s
;
transition
:
opacity
.2s
;}
.colors
li
:hover
{
filter
:
alpha
(
opacity
=
100
);
opacity
:
1
}
.colors
li
.active
{
height
:
20px
;
margin-top
:
0
;
filter
:
alpha
(
opacity
=
75
);
opacity
:
.75
}
.colors
li
.red
{
background
:
#d54e21
}
.colors
li
.green
{
background
:
#78a300
}
.colors
li
.blue
{
background
:
#0e76a8
}
.colors
li
.aero
{
background
:
#9cc2cb
}
.colors
li
.grey
{
background
:
#73716e
}
.colors
li
.orange
{
background
:
#f70
}
.colors
li
.yellow
{
background
:
#fc0
}
.colors
li
.pink
{
background
:
#ff66b5
}
.colors
li
.purple
{
background
:
#6a5a8c
}
.skin-square
.colors
li
.red
{
background
:
#e56c69
}
.skin-square
.colors
li
.green
{
background
:
#1b7e5a
}
.skin-square
.colors
li
.blue
{
background
:
#2489c5
}
.skin-square
.colors
li
.aero
{
background
:
#9cc2cb
}
.skin-square
.colors
li
.grey
{
background
:
#73716e
}
.skin-square
.colors
li
.yellow
{
background
:
#fc3
}
.skin-square
.colors
li
.pink
{
background
:
#a77a94
}
.skin-square
.colors
li
.purple
{
background
:
#6a5a8c
}
.skin-square
.colors
li
.orange
{
background
:
#f70
}
.skin-flat
.colors
li
.red
{
background
:
#ec7063
}
.skin-flat
.colors
li
.green
{
background
:
#1abc9c
}
.skin-flat
.colors
li
.blue
{
background
:
#3498db
}
.skin-flat
.colors
li
.grey
{
background
:
#95a5a6
}
.skin-flat
.colors
li
.orange
{
background
:
#f39c12
}
.skin-flat
.colors
li
.yellow
{
background
:
#f1c40f
}
.skin-flat
.colors
li
.pink
{
background
:
#af7ac5
}
.skin-flat
.colors
li
.purple
{
background
:
#8677a7
}
.skin-line
.colors
li
.yellow
{
background
:
#ffc414
}
.skins-info
{
padding
:
13px
0
57px
;
font-size
:
16px
;
line-height
:
22px
;
text-align
:
center
;}
.skins-info
p
{
margin-bottom
:
17px
}
.skins-info
.skins-banner
{
margin
:
34px
0
3px
;}
.skins-info
.skins-banner
a
{
display
:
block
;
width
:
728px
;
height
:
90px
;
margin
:
0
auto
;
overflow
:
hidden
;
text-indent
:
100%
;
white-space
:
nowrap
;
background
:
url(banner.jpg)
;
-webkit-transition
:
opacity
0.4s
ease
;
-moz-transition
:
opacity
0.4s
ease
;
-o-transition
:
opacity
0.4s
ease
;
transition
:
opacity
0.4s
ease
;
border
:
none
;}
.skins-info
.skins-banner
a
:hover
{
opacity
:
.8
;}
.skin-pre
{
padding
:
43px
60px
0
}
.skin-usage
{
padding
:
19px
60px
8px
;
list-style
:
decimal
outside
;}
.skin-usage
li
{
margin-bottom
:
23px
}
.skin-usage
.schemes
{
margin-bottom
:
-3px
;
padding
:
13px
0
0
20px
;
color
:
#888
;}
.skin-usage
.schemes
ul
{
float
:
left
;
padding-right
:
60px
}
.skin-usage
.schemes
li
{
margin
:
0
;
padding-bottom
:
3px
}
.usage
{
position
:
relative
;
margin-bottom
:
80px
;
background
:
#fff
;}
.usage
a
{
border-bottom-color
:
#ddd
}
.usage
.self
{
border-bottom-color
:
#bbb
}
.usage
.arrows
{
top
:
0
}
.usage
:hover
.arrows
.top
,
.usage
:hover
.arrows
.bottom
{
left
:
0
}
.usage
h2
{
color
:
#fff
;
background
:
#1f7f5c
}
.usage
h4
{
margin
:
26px
0
10px
;}
.usage
h4
.indeterminate
{
margin-top
:
28px
}
.usage
p
{
margin-bottom
:
5px
;}
.usage
p
.offset
{
margin-top
:
10px
}
.usage
p
.callbacks-info
{
margin-bottom
:
19px
}
.usage
p
.methods-info
{
margin-bottom
:
10px
}
.usage
p
.methods-callback
{
margin-top
:
10px
}
.usage
p
.issue-tracker
{
margin-top
:
31px
}
.usage
.markup
{
margin
:
9px
0
16px
}
.usage
.usage-inner
{
font-size
:
15px
;
line-height
:
23px
;
padding
:
41px
60px
39px
}
.markup
{
margin
:
10px
0
18px
;
padding
:
8px
0
9px
17px
;
font
:
14px
/
20px
'MontserratRegular'
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#777
;
background
:
#e7e5e0
;
border-left
:
3px
solid
#d7d5cb
;}
.markup
.comment
{
color
:
#999
;}
.markup
.comment
.self
{
color
:
#555
;}
.markup
.comment
.self
:hover
{
color
:
#333
}
.skin-polaris
.markup
{
background
:
#232830
;
border-left-color
:
#1f232a
}
.skin-futurico
.markup
{
background
:
#25262a
;
border-left-color
:
#202225
}
.skin-polaris
.markup
.comment
,
.skin-futurico
.markup
.comment
{
color
:
#555
}
.browsers
{
margin-bottom
:
74px
;}
.browsers
h2
{
margin-bottom
:
29px
;
font-size
:
24px
}
.browsers-inner
{
padding
:
0
60px
;
font-size
:
15px
;
line-height
:
23px
;}
.browsers-inner
p
{
margin-bottom
:
15px
}
.benefits
{
position
:
relative
;
margin-bottom
:
59px
;
color
:
#888
;
background
:
#232323
;}
.benefits
.arrows
{
top
:
0
}
.benefits
:hover
.arrows
.top
,
.benefits
:hover
.arrows
.bottom
{
left
:
0
}
.benefits
h2
{
color
:
#fff
;
background
:
#6a5b8c
}
.benefits
a
{
color
:
#888
;
border-bottom-color
:
#444
;}
.benefits
a
:hover
{
color
:
#aaa
}
.benefits
.mark
{
color
:
#777
;
background
:
#393939
}
.benefits-inner
{
padding
:
41px
60px
29px
;
font-size
:
15px
;
line-height
:
23px
;}
.benefits-inner
p
{
margin-bottom
:
15px
}
.benefits-inner
ul
{
margin
:
-10px
0
15px
}
.download
{
height
:
63px
;
text-align
:
center
;}
.download
a
{
display
:
block
;
height
:
60px
;
font-size
:
18px
;
line-height
:
58px
;
color
:
#fff
;
border-bottom
:
0
solid
#e24f49
;
background
:
#e76b66
;
-webkit-transition
:
border-bottom
.2s
;
-moz-transition
:
border-bottom
.2s
;
-ms-transition
:
border-bottom
.2s
;
-o-transition
:
border-bottom
.2s
;
transition
:
border-bottom
.2s
;}
.download
a
:before
{
content
:
''
;
display
:
inline-block
;
width
:
26px
;
height
:
26px
;
margin-right
:
12px
;
background
:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAACYUlEQVR4Xr3VPWhTURjH4VOt0ES7ZRJbEJpsNsaimx9E0GpRCdgU/NhsRAdNBYcK0RirQcSkIIK2cRBRiragVayDhqBDLVWatFvsIKK2UMEp4KBcf8N/KNdwvcHWAw8c/rzvebk5yU2dZVnmf6wVNdb70Ca+5Rrkx0e8E/ZkyzCoAyuxBZu17/jXQV34jjwCytowjUk90Ywyo5q8errcDoriPgpoRhEj6MQrGHmpbARF1RbUG3Uz6Bae4iBacQNNSKEPRi4pa1JNq3pGcds+qNrXu4B1CKKCWtZqlPAZO/72RDGsRdKWh5ATIdOSpHpjbu6ojBfYBiPdOIQeHJMeZd0wsh1jKDsNakEc97AHo8o3IYCz2I1nGMYuZQHVGPXs1RlxtNgH+TCFtBpvIqua40ghqkGdOIp27VOqMcigX8PTKIKzWXwZDDbAQhDG5o6yx2iAkQY80T4HYxOEpbP/uCOnN+wq1Nlq6x3qrWp3NIcKJvAWV+FVzU804i6uwyNZZY34BaOeyzpjQmfOLR70DSGcwyxOIa7mAZzHQ+QxLHllCdUYnMYZzOqsjeBsPbp8QFZ7Lw7gCt4jhGu4qCEGa5SVVWPUM4Yjbn5HfrTjNYzk8AAZ5CSjbBBG3qjXr0CqX+YAviJpy6cQg9NKIoJBN6+gIGbwA16kMY5eeGDEo2xcNV71TCPo5qM7iX14hJIueB4XkICRhLJ51ZTUsx8n3AwawmGE8QUhRDR4J4yElUUQUm1YvUPOfxPO4khj66KL70W/m+Z6uF3P0YdJBRVlZqkHlbEezQo+YWHJB8mC1Lx+Ayeq7nRIoewwAAAAAElFTkSuQmCC")
;
*
background-image
:
url("ie/icon-options.png")
;
vertical-align
:
middle
}
.download
a
:hover
{
border-bottom-width
:
3px
}
.license
{
color
:
#444
;
text-align
:
center
;
padding
:
30px
0
75px
}
.footer
{
padding-top
:
28px
;
height
:
60px
;
color
:
#666
;
background
:
#e2dfd8
;}
.footer
ul
{
float
:
left
;}
.footer
ul
li
{
float
:
left
;
padding
:
2px
10px
0
0
}
.footer
ul
.local
li
{
padding
:
0
30px
0
0
}
.footer
.code
{
float
:
right
}
.footer
a
{
color
:
#444
;}
.footer
a
:hover
{
color
:
#222
}
.footer-inner
{
width
:
930px
;
margin
:
0
auto
;
overflow
:
hidden
}
.fork-me
{
position
:
fixed
;
*
position
:
absolute
;
top
:
0
;
right
:
0
;
width
:
40px
;
height
:
40px
;
overflow
:
hidden
;
text-indent
:
100%
;
white-space
:
nowrap
;
background
:
#28545b
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAnElEQVR4XqVSgQmEMAyszw/gCI7wK7iBblBHcISfxG6gG/gjuIGO0A3ygaYQCCG2HhweF+6aShsAcDcBJBpuvlwFagqGJwUf5EL6kgV2eEe2yIgc9QI73CMPs8AOywI7nHDSzCxYxcnJ6+hrFnQkJrb2nGclP3Fj+vf0IUV1AgCZHiS86lOObxD4qqSD5mtXmAq1e2fB3vqXact3f/JmXumJlVq1AAAAAElFTkSuQmCC")
50%
no-repeat
;
*
background-image
:
url("ie/icon-fork.png")
;}
.fork-me
:hover
{
background-color
:
#1f7f5c
}
.skin
dt
,
.fork-me
{
-webkit-transition
:
background-color
.2s
;
-moz-transition
:
background-color
.2s
;
-ms-transition
:
background-color
.2s
;
-o-transition
:
background-color
.2s
;
transition
:
background-color
.2s
}
static/js/plugins/iCheck/icheck.min.js
View file @
c4196e7d
/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
(
function
(
f
){
function
A
(
a
,
b
,
d
){
var
c
=
a
[
0
],
g
=
/er/
.
test
(
d
)?
_indeterminate
:
/bl/
.
test
(
d
)?
n
:
k
,
e
=
d
==
_update
?{
checked
:
c
[
k
],
disabled
:
c
[
n
],
indeterminate
:
"true"
==
a
.
attr
(
_indeterminate
)
||
"false"
==
a
.
attr
(
_determinate
)}:
c
[
g
];
if
(
/^
(
ch|di|in
)
/
.
test
(
d
)
&&!
e
)
x
(
a
,
g
);
else
if
(
/^
(
un|en|de
)
/
.
test
(
d
)
&&
e
)
q
(
a
,
g
);
else
if
(
d
==
_update
)
for
(
var
f
in
e
)
e
[
f
]?
x
(
a
,
f
,
!
0
):
q
(
a
,
f
,
!
0
);
else
if
(
!
b
||
"toggle"
==
d
){
if
(
!
b
)
a
[
_callback
](
"ifClicked"
);
e
?
c
[
_type
]
!==
r
&&
q
(
a
,
g
):
x
(
a
,
g
)}}
function
x
(
a
,
b
,
d
){
var
c
=
a
[
0
],
g
=
a
.
parent
(),
e
=
b
==
k
,
u
=
b
==
_indeterminate
,
(
function
(
f
){
function
A
(
a
,
b
,
d
){
var
c
=
a
[
0
],
g
=
/er/
.
test
(
d
)?
_indeterminate
:
/bl/
.
test
(
d
)?
n
:
k
,
e
=
d
==
_update
?{
checked
:
c
[
k
],
disabled
:
c
[
n
],
indeterminate
:
"true"
==
a
.
attr
(
_indeterminate
)
||
"false"
==
a
.
attr
(
_determinate
)}:
c
[
g
];
if
(
/^
(
ch|di|in
)
/
.
test
(
d
)
&&!
e
)
x
(
a
,
g
);
else
if
(
/^
(
un|en|de
)
/
.
test
(
d
)
&&
e
)
q
(
a
,
g
);
else
if
(
d
==
_update
)
for
(
var
f
in
e
)
e
[
f
]?
x
(
a
,
f
,
!
0
):
q
(
a
,
f
,
!
0
);
else
if
(
!
b
||
"toggle"
==
d
){
if
(
!
b
)
a
[
_callback
](
"ifClicked"
);
e
?
c
[
_type
]
!==
r
&&
q
(
a
,
g
):
x
(
a
,
g
)}}
function
x
(
a
,
b
,
d
){
var
c
=
a
[
0
],
g
=
a
.
parent
(),
e
=
b
==
k
,
u
=
b
==
_indeterminate
,
v
=
b
==
n
,
s
=
u
?
_determinate
:
e
?
y
:
"enabled"
,
F
=
l
(
a
,
s
+
t
(
c
[
_type
])),
B
=
l
(
a
,
b
+
t
(
c
[
_type
]));
if
(
!
0
!==
c
[
b
]){
if
(
!
d
&&
b
==
k
&&
c
[
_type
]
==
r
&&
c
.
name
){
var
w
=
a
.
closest
(
"form"
),
p
=
'input[name="'
+
c
.
name
+
'"]'
,
p
=
w
.
length
?
w
.
find
(
p
):
f
(
p
);
p
.
each
(
function
(){
this
!==
c
&&
f
(
this
).
data
(
m
)
&&
q
(
f
(
this
),
b
)})}
u
?(
c
[
b
]
=!
0
,
c
[
k
]
&&
q
(
a
,
k
,
"force"
)):(
d
||
(
c
[
b
]
=!
0
),
e
&&
c
[
_indeterminate
]
&&
q
(
a
,
_indeterminate
,
!
1
));
D
(
a
,
e
,
b
,
d
)}
c
[
n
]
&&
l
(
a
,
_cursor
,
!
0
)
&&
g
.
find
(
"."
+
C
).
css
(
_cursor
,
"default"
);
g
[
_add
](
B
||
l
(
a
,
b
)
||
""
);
g
.
attr
(
"role"
)
&&!
u
&&
g
.
attr
(
"aria-"
+
(
v
?
n
:
k
),
"true"
);
v
=
b
==
n
,
s
=
u
?
_determinate
:
e
?
y
:
"enabled"
,
F
=
l
(
a
,
s
+
t
(
c
[
_type
])),
B
=
l
(
a
,
b
+
t
(
c
[
_type
]));
if
(
!
0
!==
c
[
b
]){
if
(
!
d
&&
b
==
k
&&
c
[
_type
]
==
r
&&
c
.
name
){
var
w
=
a
.
closest
(
"form"
),
p
=
'input[name="'
+
c
.
name
+
'"]'
,
p
=
w
.
length
?
w
.
find
(
p
):
f
(
p
);
p
.
each
(
function
(){
this
!==
c
&&
f
(
this
).
data
(
m
)
&&
q
(
f
(
this
),
b
)})}
u
?(
c
[
b
]
=!
0
,
c
[
k
]
&&
q
(
a
,
k
,
"force"
)):(
d
||
(
c
[
b
]
=!
0
),
e
&&
c
[
_indeterminate
]
&&
q
(
a
,
_indeterminate
,
!
1
));
D
(
a
,
e
,
b
,
d
)}
c
[
n
]
&&
l
(
a
,
_cursor
,
!
0
)
&&
g
.
find
(
"."
+
C
).
css
(
_cursor
,
"default"
);
g
[
_add
](
B
||
l
(
a
,
b
)
||
""
);
g
.
attr
(
"role"
)
&&!
u
&&
g
.
attr
(
"aria-"
+
(
v
?
n
:
k
),
"true"
);
g
[
_remove
](
F
||
l
(
a
,
s
)
||
""
)}
function
q
(
a
,
b
,
d
){
var
c
=
a
[
0
],
g
=
a
.
parent
(),
e
=
b
==
k
,
f
=
b
==
_indeterminate
,
m
=
b
==
n
,
s
=
f
?
_determinate
:
e
?
y
:
"enabled"
,
q
=
l
(
a
,
s
+
t
(
c
[
_type
])),
r
=
l
(
a
,
b
+
t
(
c
[
_type
]));
if
(
!
1
!==
c
[
b
]){
if
(
f
||!
d
||
"force"
==
d
)
c
[
b
]
=!
1
;
D
(
a
,
e
,
s
,
d
)}
!
c
[
n
]
&&
l
(
a
,
_cursor
,
!
0
)
&&
g
.
find
(
"."
+
C
).
css
(
_cursor
,
"pointer"
);
g
[
_remove
](
r
||
l
(
a
,
b
)
||
""
);
g
.
attr
(
"role"
)
&&!
f
&&
g
.
attr
(
"aria-"
+
(
m
?
n
:
k
),
"false"
);
g
[
_add
](
q
||
l
(
a
,
s
)
||
""
)}
function
E
(
a
,
b
){
if
(
a
.
data
(
m
)){
a
.
parent
().
html
(
a
.
attr
(
"style"
,
a
.
data
(
m
).
s
||
""
));
if
(
b
)
a
[
_callback
](
b
);
a
.
off
(
".i"
).
unwrap
();
g
[
_remove
](
F
||
l
(
a
,
s
)
||
""
)}
function
q
(
a
,
b
,
d
){
var
c
=
a
[
0
],
g
=
a
.
parent
(),
e
=
b
==
k
,
f
=
b
==
_indeterminate
,
m
=
b
==
n
,
s
=
f
?
_determinate
:
e
?
y
:
"enabled"
,
q
=
l
(
a
,
s
+
t
(
c
[
_type
])),
r
=
l
(
a
,
b
+
t
(
c
[
_type
]));
if
(
!
1
!==
c
[
b
]){
if
(
f
||!
d
||
"force"
==
d
)
c
[
b
]
=!
1
;
D
(
a
,
e
,
s
,
d
)}
!
c
[
n
]
&&
l
(
a
,
_cursor
,
!
0
)
&&
g
.
find
(
"."
+
C
).
css
(
_cursor
,
"pointer"
);
g
[
_remove
](
r
||
l
(
a
,
b
)
||
""
);
g
.
attr
(
"role"
)
&&!
f
&&
g
.
attr
(
"aria-"
+
(
m
?
n
:
k
),
"false"
);
g
[
_add
](
q
||
l
(
a
,
s
)
||
""
)}
function
E
(
a
,
b
){
if
(
a
.
data
(
m
)){
a
.
parent
().
html
(
a
.
attr
(
"style"
,
a
.
data
(
m
).
s
||
""
));
if
(
b
)
a
[
_callback
](
b
);
a
.
off
(
".i"
).
unwrap
();
f
(
_label
+
'[for="'
+
a
[
0
].
id
+
'"]'
).
add
(
a
.
closest
(
_label
)).
off
(
".i"
)}}
function
l
(
a
,
b
,
f
){
if
(
a
.
data
(
m
))
return
a
.
data
(
m
).
o
[
b
+
(
f
?
""
:
"Class"
)]}
function
t
(
a
){
return
a
.
charAt
(
0
).
toUpperCase
()
+
a
.
slice
(
1
)}
function
D
(
a
,
b
,
f
,
c
){
if
(
!
c
){
if
(
b
)
a
[
_callback
](
"ifToggled"
);
a
[
_callback
](
"ifChanged"
)[
_callback
](
"if"
+
t
(
f
))}}
var
m
=
"iCheck"
,
C
=
m
+
"-helper"
,
r
=
"radio"
,
k
=
"checked"
,
y
=
"un"
+
k
,
n
=
"disabled"
;
_determinate
=
"determinate"
;
_indeterminate
=
"in"
+
_determinate
;
_update
=
"update"
;
_type
=
"type"
;
_click
=
"click"
;
_touch
=
"touchbegin.i touchend.i"
;
f
(
_label
+
'[for="'
+
a
[
0
].
id
+
'"]'
).
add
(
a
.
closest
(
_label
)).
off
(
".i"
)}}
function
l
(
a
,
b
,
f
){
if
(
a
.
data
(
m
))
return
a
.
data
(
m
).
o
[
b
+
(
f
?
""
:
"Class"
)]}
function
t
(
a
){
return
a
.
charAt
(
0
).
toUpperCase
()
+
a
.
slice
(
1
)}
function
D
(
a
,
b
,
f
,
c
){
if
(
!
c
){
if
(
b
)
a
[
_callback
](
"ifToggled"
);
a
[
_callback
](
"ifChanged"
)[
_callback
](
"if"
+
t
(
f
))}}
var
m
=
"iCheck"
,
C
=
m
+
"-helper"
,
r
=
"radio"
,
k
=
"checked"
,
y
=
"un"
+
k
,
n
=
"disabled"
;
_determinate
=
"determinate"
;
_indeterminate
=
"in"
+
_determinate
;
_update
=
"update"
;
_type
=
"type"
;
_click
=
"click"
;
_touch
=
"touchbegin.i touchend.i"
;
_add
=
"addClass"
;
_remove
=
"removeClass"
;
_callback
=
"trigger"
;
_label
=
"label"
;
_cursor
=
"cursor"
;
_mobile
=
/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i
.
test
(
navigator
.
userAgent
);
f
.
fn
[
m
]
=
function
(
a
,
b
){
var
d
=
'input[type="checkbox"], input[type="'
+
r
+
'"]'
,
c
=
f
(),
g
=
function
(
a
){
a
.
each
(
function
(){
var
a
=
f
(
this
);
c
=
a
.
is
(
d
)?
c
.
add
(
a
):
c
.
add
(
a
.
find
(
d
))})};
if
(
/^
(
check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy
)
$/i
.
test
(
a
))
return
a
=
a
.
toLowerCase
(),
g
(
this
),
c
.
each
(
function
(){
var
c
=
_add
=
"addClass"
;
_remove
=
"removeClass"
;
_callback
=
"trigger"
;
_label
=
"label"
;
_cursor
=
"cursor"
;
_mobile
=
/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i
.
test
(
navigator
.
userAgent
);
f
.
fn
[
m
]
=
function
(
a
,
b
){
var
d
=
'input[type="checkbox"], input[type="'
+
r
+
'"]'
,
c
=
f
(),
g
=
function
(
a
){
a
.
each
(
function
(){
var
a
=
f
(
this
);
c
=
a
.
is
(
d
)?
c
.
add
(
a
):
c
.
add
(
a
.
find
(
d
))})};
if
(
/^
(
check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy
)
$/i
.
test
(
a
))
return
a
=
a
.
toLowerCase
(),
g
(
this
),
c
.
each
(
function
(){
var
c
=
f
(
this
);
"destroy"
==
a
?
E
(
c
,
"ifDestroyed"
):
A
(
c
,
!
0
,
a
);
f
.
isFunction
(
b
)
&&
b
()});
if
(
"object"
!=
typeof
a
&&
a
)
return
this
;
var
e
=
f
.
extend
({
checkedClass
:
k
,
disabledClass
:
n
,
indeterminateClass
:
_indeterminate
,
labelHover
:
!
0
},
a
),
l
=
e
.
handle
,
v
=
e
.
hoverClass
||
"hover"
,
s
=
e
.
focusClass
||
"focus"
,
t
=
e
.
activeClass
||
"active"
,
B
=!!
e
.
labelHover
,
w
=
e
.
labelHoverClass
||
"hover"
,
p
=
(
""
+
e
.
increaseArea
).
replace
(
"%"
,
""
)
|
0
;
if
(
"checkbox"
==
l
||
l
==
r
)
d
=
'input[type="'
+
l
+
'"]'
;
-
50
>
p
&&
(
p
=-
50
);
g
(
this
);
return
c
.
each
(
function
(){
var
a
=
f
(
this
);
E
(
a
);
var
c
=
this
,
f
(
this
);
"destroy"
==
a
?
E
(
c
,
"ifDestroyed"
):
A
(
c
,
!
0
,
a
);
f
.
isFunction
(
b
)
&&
b
()});
if
(
"object"
!=
typeof
a
&&
a
)
return
this
;
var
e
=
f
.
extend
({
checkedClass
:
k
,
disabledClass
:
n
,
indeterminateClass
:
_indeterminate
,
labelHover
:
!
0
},
a
),
l
=
e
.
handle
,
v
=
e
.
hoverClass
||
"hover"
,
s
=
e
.
focusClass
||
"focus"
,
t
=
e
.
activeClass
||
"active"
,
B
=!!
e
.
labelHover
,
w
=
e
.
labelHoverClass
||
"hover"
,
p
=
(
""
+
e
.
increaseArea
).
replace
(
"%"
,
""
)
|
0
;
if
(
"checkbox"
==
l
||
l
==
r
)
d
=
'input[type="'
+
l
+
'"]'
;
-
50
>
p
&&
(
p
=-
50
);
g
(
this
);
return
c
.
each
(
function
(){
var
a
=
f
(
this
);
E
(
a
);
var
c
=
this
,
b
=
c
.
id
,
g
=-
p
+
"%"
,
d
=
100
+
2
*
p
+
"%"
,
d
=
{
position
:
"absolute"
,
top
:
g
,
left
:
g
,
display
:
"block"
,
width
:
d
,
height
:
d
,
margin
:
0
,
padding
:
0
,
background
:
"#fff"
,
border
:
0
,
opacity
:
0
},
g
=
_mobile
?{
position
:
"absolute"
,
visibility
:
"hidden"
}:
p
?
d
:{
position
:
"absolute"
,
opacity
:
0
},
l
=
"checkbox"
==
c
[
_type
]?
e
.
checkboxClass
||
"icheckbox"
:
e
.
radioClass
||
"i"
+
r
,
z
=
f
(
_label
+
'[for="'
+
b
+
'"]'
).
add
(
a
.
closest
(
_label
)),
u
=!!
e
.
aria
,
y
=
m
+
"-"
+
Math
.
random
().
toString
(
36
).
substr
(
2
,
6
),
h
=
'<div class="'
+
l
+
'" '
+
(
u
?
'role="'
+
c
[
_type
]
+
'" '
:
""
);
u
&&
z
.
each
(
function
(){
h
+=
b
=
c
.
id
,
g
=-
p
+
"%"
,
d
=
100
+
2
*
p
+
"%"
,
d
=
{
position
:
"absolute"
,
top
:
g
,
left
:
g
,
display
:
"block"
,
width
:
d
,
height
:
d
,
margin
:
0
,
padding
:
0
,
background
:
"#fff"
,
border
:
0
,
opacity
:
0
},
g
=
_mobile
?{
position
:
"absolute"
,
visibility
:
"hidden"
}:
p
?
d
:{
position
:
"absolute"
,
opacity
:
0
},
l
=
"checkbox"
==
c
[
_type
]?
e
.
checkboxClass
||
"icheckbox"
:
e
.
radioClass
||
"i"
+
r
,
z
=
f
(
_label
+
'[for="'
+
b
+
'"]'
).
add
(
a
.
closest
(
_label
)),
u
=!!
e
.
aria
,
y
=
m
+
"-"
+
Math
.
random
().
toString
(
36
).
substr
(
2
,
6
),
h
=
'<div class="'
+
l
+
'" '
+
(
u
?
'role="'
+
c
[
_type
]
+
'" '
:
""
);
u
&&
z
.
each
(
function
(){
h
+=
'aria-labelledby="'
;
this
.
id
?
h
+=
this
.
id
:(
this
.
id
=
y
,
h
+=
y
);
h
+=
'"'
});
h
=
a
.
wrap
(
h
+
"/>"
)[
_callback
](
"ifCreated"
).
parent
().
append
(
e
.
insert
);
d
=
f
(
'<ins class="'
+
C
+
'"/>'
).
css
(
d
).
appendTo
(
h
);
a
.
data
(
m
,{
o
:
e
,
s
:
a
.
attr
(
"style"
)}).
css
(
g
);
e
.
inheritClass
&&
h
[
_add
](
c
.
className
||
""
);
e
.
inheritID
&&
b
&&
h
.
attr
(
"id"
,
m
+
"-"
+
b
);
"static"
==
h
.
css
(
"position"
)
&&
h
.
css
(
"position"
,
"relative"
);
A
(
a
,
!
0
,
_update
);
if
(
z
.
length
)
z
.
on
(
_click
+
".i mouseover.i mouseout.i "
+
_touch
,
function
(
b
){
var
d
=
b
[
_type
],
e
=
f
(
this
);
if
(
!
c
[
n
]){
if
(
d
==
_click
){
if
(
f
(
b
.
target
).
is
(
"a"
))
return
;
'aria-labelledby="'
;
this
.
id
?
h
+=
this
.
id
:(
this
.
id
=
y
,
h
+=
y
);
h
+=
'"'
});
h
=
a
.
wrap
(
h
+
"/>"
)[
_callback
](
"ifCreated"
).
parent
().
append
(
e
.
insert
);
d
=
f
(
'<ins class="'
+
C
+
'"/>'
).
css
(
d
).
appendTo
(
h
);
a
.
data
(
m
,{
o
:
e
,
s
:
a
.
attr
(
"style"
)}).
css
(
g
);
e
.
inheritClass
&&
h
[
_add
](
c
.
className
||
""
);
e
.
inheritID
&&
b
&&
h
.
attr
(
"id"
,
m
+
"-"
+
b
);
"static"
==
h
.
css
(
"position"
)
&&
h
.
css
(
"position"
,
"relative"
);
A
(
a
,
!
0
,
_update
);
if
(
z
.
length
)
z
.
on
(
_click
+
".i mouseover.i mouseout.i "
+
_touch
,
function
(
b
){
var
d
=
b
[
_type
],
e
=
f
(
this
);
if
(
!
c
[
n
]){
if
(
d
==
_click
){
if
(
f
(
b
.
target
).
is
(
"a"
))
return
;
A
(
a
,
!
1
,
!
0
)}
else
B
&&
(
/ut|nd/
.
test
(
d
)?(
h
[
_remove
](
v
),
e
[
_remove
](
w
)):(
h
[
_add
](
v
),
e
[
_add
](
w
)));
if
(
_mobile
)
b
.
stopPropagation
();
else
return
!
1
}});
a
.
on
(
_click
+
".i focus.i blur.i keyup.i keydown.i keypress.i"
,
function
(
b
){
var
d
=
b
[
_type
];
b
=
b
.
keyCode
;
if
(
d
==
_click
)
return
!
1
;
if
(
"keydown"
==
d
&&
32
==
b
)
return
c
[
_type
]
==
r
&&
c
[
k
]
||
(
c
[
k
]?
q
(
a
,
k
):
x
(
a
,
k
)),
!
1
;
if
(
"keyup"
==
d
&&
c
[
_type
]
==
r
)
!
c
[
k
]
&&
x
(
a
,
k
);
else
if
(
/us|ur/
.
test
(
d
))
h
[
"blur"
==
d
?
_remove
:
_add
](
s
)});
d
.
on
(
_click
+
" mousedown mouseup mouseover mouseout "
+
_touch
,
function
(
b
){
var
d
=
A
(
a
,
!
1
,
!
0
)}
else
B
&&
(
/ut|nd/
.
test
(
d
)?(
h
[
_remove
](
v
),
e
[
_remove
](
w
)):(
h
[
_add
](
v
),
e
[
_add
](
w
)));
if
(
_mobile
)
b
.
stopPropagation
();
else
return
!
1
}});
a
.
on
(
_click
+
".i focus.i blur.i keyup.i keydown.i keypress.i"
,
function
(
b
){
var
d
=
b
[
_type
];
b
=
b
.
keyCode
;
if
(
d
==
_click
)
return
!
1
;
if
(
"keydown"
==
d
&&
32
==
b
)
return
c
[
_type
]
==
r
&&
c
[
k
]
||
(
c
[
k
]?
q
(
a
,
k
):
x
(
a
,
k
)),
!
1
;
if
(
"keyup"
==
d
&&
c
[
_type
]
==
r
)
!
c
[
k
]
&&
x
(
a
,
k
);
else
if
(
/us|ur/
.
test
(
d
))
h
[
"blur"
==
d
?
_remove
:
_add
](
s
)});
d
.
on
(
_click
+
" mousedown mouseup mouseover mouseout "
+
_touch
,
function
(
b
){
var
d
=
b
[
_type
],
e
=
/wn|up/
.
test
(
d
)?
t
:
v
;
if
(
!
c
[
n
]){
if
(
d
==
_click
)
A
(
a
,
!
1
,
!
0
);
else
{
if
(
/wn|er|in/
.
test
(
d
))
h
[
_add
](
e
);
else
h
[
_remove
](
e
+
" "
+
t
);
if
(
z
.
length
&&
B
&&
e
==
v
)
z
[
/ut|nd/
.
test
(
d
)?
_remove
:
_add
](
w
)}
if
(
_mobile
)
b
.
stopPropagation
();
else
return
!
1
}})})}})(
window
.
jQuery
||
window
.
Zepto
);
b
[
_type
],
e
=
/wn|up/
.
test
(
d
)?
t
:
v
;
if
(
!
c
[
n
]){
if
(
d
==
_click
)
A
(
a
,
!
1
,
!
0
);
else
{
if
(
/wn|er|in/
.
test
(
d
))
h
[
_add
](
e
);
else
h
[
_remove
](
e
+
" "
+
t
);
if
(
z
.
length
&&
B
&&
e
==
v
)
z
[
/ut|nd/
.
test
(
d
)?
_remove
:
_add
](
w
)}
if
(
_mobile
)
b
.
stopPropagation
();
else
return
!
1
}})})}})(
window
.
jQuery
||
window
.
Zepto
);
templates/css_js.html
deleted
100644 → 0
View file @
ca3d4de8
<link
href=
"/static/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"/static/font-awesome/css/font-awesome.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/iCheck/custom.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/animate.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/style.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/colorbox.css"
rel=
"stylesheet"
>
<!-- Mainly scripts -->
<script
src=
"/static/js/jquery-2.1.1.js"
></script>
<script
src=
"/static/js/bootstrap.min.js"
></script>
<script
src=
"/static/js/plugins/metisMenu/jquery.metisMenu.js"
></script>
<script
src=
"/static/js/plugins/slimscroll/jquery.slimscroll.min.js"
></script>
<!-- Peity -->
<script
src=
"/static/js/plugins/peity/jquery.peity.min.js"
></script>
<!-- Custom and plugin javascript -->
<script
src=
"/static/js/inspinia.js"
></script>
<script
src=
"/static/js/plugins/pace/pace.min.js"
></script>
<!-- iCheck -->
<script
src=
"/static/js/plugins/iCheck/icheck.min.js"
></script>
<!-- Peity -->
<script
src=
"/static/js/demo/peity-demo.js"
></script>
<!-- pop windows -->
<script
src=
"/static/js/jquery.colorbox.js"
></script>
<script>
$
(
document
).
ready
(
function
(){
$
(
".iframe"
).
colorbox
({
iframe
:
true
,
width
:
"90%"
,
height
:
"90%"
});
});
</script>
\ No newline at end of file
templates/jperm/perm_group_edit.html
0 → 100644
View file @
c4196e7d
{% extends 'base.html' %}
{% load mytags %}
{% block content %}
<script
type=
"text/javascript"
>
function
move
(
from
,
to
)
{
$
(
"#"
+
from
+
" option"
).
each
(
function
(){
if
(
$
(
this
).
prop
(
"selected"
)
==
true
)
{
$
(
"#"
+
to
).
append
(
this
);
}
});
}
function
move_all
(
from
,
to
){
$
(
"#"
+
from
).
children
().
each
(
function
(){
$
(
"#"
+
to
).
append
(
this
);
});
}
function
search_host
(
text
){
$
(
"#host_unperm"
).
children
().
each
(
function
(){
$
(
this
).
remove
();});
var
permArray
=
[];
$
(
"#host_permed"
).
children
().
each
(
function
(){
permArray
.
push
(
$
(
this
).
text
());
});
$
(
"#host_all"
).
children
().
each
(
function
(){
if
(
$
(
this
).
text
().
search
(
text
)
!=
-
1
&&
permArray
.
indexOf
(
$
(
this
).
text
())
==
-
1
)
{
$
(
"#host_unperm"
).
append
(
$
(
this
).
clone
())
}
});
}
</script>
{% include 'nav_cat_bar.html' %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-lg-10"
>
<div
class=
"ibox float-e-margins"
>
<!-- title -->
<div
class=
"ibox-title"
>
<h5>
授权编辑表单
<small>
Edit perm of user group
</small></h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
<i
class=
"fa fa-chevron-up"
></i>
</a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-wrench"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
>
Config option 1
</a>
</li>
<li><a
href=
"#"
>
Config option 2
</a>
</li>
</ul>
<a
class=
"close-link"
>
<i
class=
"fa fa-times"
></i>
</a>
</div>
</div>
<!-- end title -->
<div
class=
"ibox-content"
>
<div
class=
"row"
>
<div
class=
"col-sm-5 "
>
<div
class=
"form-group"
>
<label></label>
<input
type=
"text"
id=
"host_filter"
placeholder=
"Search"
class=
"form-control"
value=
""
oninput=
"search_host(this.value)"
>
</div>
</div>
<div
class=
"col-sm-1 "
>
<div
class=
"form-group"
>
<label></label>
</div>
</div>
<div
class=
"col-sm-5 "
>
<div
class=
"form-group"
>
<label></label>
<input
type=
"text"
class=
"form-control"
value=
"{{ group.name }}"
readonly
>
</div>
</div>
</div>
<form
method=
"post"
action=
""
>
<input
type=
"text"
name=
"username"
class=
"form-control"
value=
"{{ group.name }}"
style=
"display: none"
>
<div
class=
"row"
>
<div
class=
"col-sm-5"
><h4>
未授权主机
</h4>
<div>
<select
id=
"host_all"
name=
"host_all"
class=
"form-control"
size=
"10"
multiple
style=
"display: none"
>
{% for asset in assets %}
<option
value=
"{{ asset.ip }}"
>
{{ asset.ip }}
</option>
{% endfor %}
</select>
<select
id=
"host_unperm"
name=
"host_unperm"
class=
"form-control m-b"
size=
"12"
multiple
>
{% for asset in assets_unperm %}
<option
value=
"{{ asset.ip }}"
>
{{ asset.ip }}
</option>
{% endfor %}
</select>
</div>
</div>
<div
class=
"col-sm-1"
>
<div
class=
"btn-group"
style=
"margin-top: 50px;"
>
<button
type=
"button"
class=
"btn btn-white"
onclick=
"move('host_unperm', 'host_permed')"
><i
class=
"fa fa-chevron-right"
></i></button>
<button
type=
"button"
class=
"btn btn-white"
onclick=
"move('host_permed', 'host_unperm')"
><i
class=
"fa fa-chevron-left"
></i>
</button>
</div>
</div>
<div
class=
"col-sm-5"
><h4>
授权主机
</h4>
<div>
<select
id=
"host_permed"
name=
"host_permed"
class=
"form-control m-b"
size=
"12"
multiple
>
{% for asset in assets_permed %}
<option
value=
"{{ asset.ip }}"
>
{{ asset.ip }}
</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
<button
class=
"btn btn-white"
type=
"submit"
>
取消
</button>
<button
class=
"btn btn-primary"
type=
"submit"
onclick=
"javascript: (function(){$('#host_permed option').each(function(){$(this).prop('selected', true)})})()"
>
确认保存
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
var
str
=
document
.
location
.
pathname
.
split
(
"/"
)[
1
];
var
str1
=
document
.
location
.
pathname
.
split
(
"/"
)[
2
];
$
(
"#"
+
str
).
addClass
(
'active'
);
$
(
"#"
+
str1
).
addClass
(
'active'
);
</script>
{#
<script
type=
"text/javascript"
>
#
}
{
#
$
(
"#host_permed"
).
children
().
each
(
function
(){
#
}
{
#
$
(
"#host_all"
).
append
(
$
(
this
).
clone
());
#
}
{
##
}
{
#
if
(
$
(
this
).
prop
(
"selected"
)
==
false
)
{
#
}
{
#
$
(
"#host_unperm"
).
append
(
this
);
#
}
{
#
}
#
}
{
##
}
{
#
$
(
"#host_all"
).
children
().
each
(
function
(){
$
(
this
).
prop
(
"selected"
,
false
)});
#
}
{
#
});
#
}
{
#
</script>
#}
{% endblock %}
\ No newline at end of file
templates/jperm/perm_host.html
View file @
c4196e7d
...
@@ -61,8 +61,8 @@
...
@@ -61,8 +61,8 @@
<td
class=
"text-center"
>
{{ user.username|groups_str }}
</td>
<td
class=
"text-center"
>
{{ user.username|groups_str }}
</td>
<td
class=
"text-center"
>
{{ user.id|perm_count }}
</td>
<td
class=
"text-center"
>
{{ user.id|perm_count }}
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<a
href=
"../perm_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../perm_
user_
detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../perm_edit/?id={{ user.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../perm_
user_
edit/?id={{ user.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
@@ -123,8 +123,8 @@
...
@@ -123,8 +123,8 @@
<td
class=
"text-center"
>
{{ group.name }}
</td>
<td
class=
"text-center"
>
{{ group.name }}
</td>
<td
class=
"text-center"
>
{{ group.comment }}
</td>
<td
class=
"text-center"
>
{{ group.comment }}
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<a
href=
"../perm_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../perm_
group_
detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../perm_edit/?id={{ user.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../perm_
group_
edit/?id={{ user.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
...
templates/jperm/perm_user_detail.html
0 → 100644
View file @
c4196e7d
{% load mytags %}
<html>
<head>
{% include 'link_css.html' %}
<style
type=
"text/css"
>
body
{
background
:
#FFFFFF
;
}
</style>
</head>
<body>
<div
class=
"row"
>
<div
class=
"contact-box"
>
<h2
class=
"text-center"
>
{{ user.name }} 授权详情
</h2>
<div
class=
"ibox-content"
>
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<thead>
<tr>
<th
class=
"text-center"
>
ID
</th>
<th
class=
"text-center"
>
IP
</th>
<th
class=
"text-center"
>
主机组
</th>
<th
class=
"text-center"
>
IDC
</th>
</tr>
</thead>
<tbody>
{% for asset in host_permed %}
<tr
class=
"gradeX"
>
<td
class=
"text-center"
>
{{ asset.id }}
</td>
<td
class=
"text-center"
>
{{ asset.ip }}
</td>
<td
class=
"text-center"
>
{% for group in asset.bis_group.all %}
{{ group }}
{% endfor %}
</td>
<td
class=
"text-center"
>
{{ asset.idc.name }}
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</body>
</html>
\ No newline at end of file
templates/jperm/perm_edit.html
→
templates/jperm/perm_
user_
edit.html
View file @
c4196e7d
File moved
templates/juser/user_add.html
View file @
c4196e7d
{% extends 'base.html' %}
{% extends 'base.html' %}
{% load mytags %}
{% load mytags %}
{% block content %}
{% block content %}
{% include 'nav_cat_bar.html' %}
{% include 'nav_cat_bar.html' %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
...
@@ -28,7 +29,7 @@
...
@@ -28,7 +29,7 @@
</div>
</div>
</div>
</div>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
>
<form
method=
"post"
class=
"form-horizontal"
action=
""
>
<form
method=
"post"
id=
"userForm"
class=
"form-horizontal"
action=
""
>
{% if error %}
{% if error %}
<div
class=
"alert alert-warning text-center"
>
{{ error }}
</div>
<div
class=
"alert alert-warning text-center"
>
{{ error }}
</div>
{% endif %}
{% endif %}
...
@@ -148,4 +149,61 @@
...
@@ -148,4 +149,61 @@
</div>
</div>
</div>
</div>
<script>
$
(
'#userForm'
).
validator
({
timely
:
2
,
theme
:
"yellow_right_effect"
,
rules
:
{
check_ip
:
[
/^
(\d{1,2}
|1
\d\d
|2
[
0-4
]\d
|25
[
0-5
])(\.(\d{1,2}
|1
\d\d
|2
[
0-4
]\d
|25
[
0-5
])){3}
$/
,
'ip地址不正确'
],
check_port
:
[
/^
\d{1,5}
$/
,
'端口号不正确'
],
type_m
:
function
(
element
){
return
$
(
"#M"
).
is
(
":checked"
);
}
},
fields
:
{
"username"
:
{
rule
:
"required"
,
tip
:
"输入用户名"
,
ok
:
""
,
msg
:
{
required
:
"必须填写!"
}
},
"password"
:
{
rule
:
"required;length[6~16]"
,
tip
:
"输入密码"
,
ok
:
""
,
msg
:
{
required
:
"必须填写!"
}
},
"ssh_key_pwd1"
:
{
rule
:
"required;length[6~16]"
,
tip
:
"ssh私钥密码"
,
ok
:
""
,
msg
:
{
required
:
"必须填写"
}
},
"groups"
:
{
rule
:
"checked"
,
tip
:
"选择用户组"
,
ok
:
""
,
msg
:
{
checked
:
"至少选择一个组"
}
},
"name"
:
{
rule
:
"required"
,
tip
:
"姓名"
,
ok
:
""
,
msg
:
{
required
:
"必须填写"
}
},
"role"
:
{
rule
:
"checked"
,
tip
:
"角色"
,
ok
:
""
,
msg
:
{
required
:
"选择一个"
}
}
},
valid
:
function
(
form
)
{
form
.
submit
();
}
});
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
templates/juser/user_list.html
View file @
c4196e7d
...
@@ -36,7 +36,9 @@
...
@@ -36,7 +36,9 @@
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<thead>
<thead>
<tr>
<tr>
<th
class=
"text-center"
><input
type=
"checkbox"
class=
"i-checks"
name=
""
></th>
<th
class=
"text-center"
>
<input
type=
"checkbox"
id=
"select_all"
onclick=
"selectAll()"
name=
"select_all"
>
</th>
<th
class=
"text-center"
>
ID
</th>
<th
class=
"text-center"
>
ID
</th>
<th
class=
"text-center"
>
用户名
</th>
<th
class=
"text-center"
>
用户名
</th>
<th
class=
"text-center"
>
姓名
</th>
<th
class=
"text-center"
>
姓名
</th>
...
@@ -50,7 +52,9 @@
...
@@ -50,7 +52,9 @@
<tbody>
<tbody>
{% for user in contacts.object_list %}
{% for user in contacts.object_list %}
<tr
class=
"gradeX"
>
<tr
class=
"gradeX"
>
<td
class=
"text-center"
><input
type=
"checkbox"
class=
"i-checks"
name=
""
></td>
<td
class=
"text-center"
>
<input
type=
"checkbox"
name=
"selected"
value=
"{{ user.id }}"
>
</td>
<td
class=
"text-center"
>
{{ user.id }}
</td>
<td
class=
"text-center"
>
{{ user.id }}
</td>
<td
class=
"text-center"
>
{{ user.username }}
</td>
<td
class=
"text-center"
>
{{ user.username }}
</td>
<td
class=
"text-center"
>
{{ user.name }}
</td>
<td
class=
"text-center"
>
{{ user.name }}
</td>
...
@@ -117,4 +121,4 @@
...
@@ -117,4 +121,4 @@
});
});
</script>
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
templates/juser/user_list1.html
0 → 100644
View file @
c4196e7d
{% extends 'base.html' %}
{% load mytags %}
{% block content %}
{% include 'nav_cat_bar.html' %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-lg-10"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<h5>
查看用户
<small>
show user info.
</small>
</h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
<i
class=
"fa fa-chevron-up"
></i>
</a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-wrench"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
>
未启用 1
</a>
</li>
<li><a
href=
"#"
>
未启用 2
</a>
</li>
</ul>
<a
class=
"close-link"
>
<i
class=
"fa fa-times"
></i>
</a>
</div>
</div>
<div
class=
"ibox-content"
>
<div
class=
""
>
<a
target=
"_blank"
href=
"/juser/user_add/"
class=
"btn btn-sm btn-primary "
>
添加
</a>
</div>
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<thead>
<tr>
<th
class=
"text-center"
><input
type=
"checkbox"
class=
"i-checks"
name=
""
></th>
<th
class=
"text-center"
>
ID
</th>
<th
class=
"text-center"
>
用户名
</th>
<th
class=
"text-center"
>
姓名
</th>
<th
class=
"text-center"
>
属组
</th>
<th
class=
"text-center"
>
角色
</th>
<th
class=
"text-center"
>
Email
</th>
<th
class=
"text-center"
>
激活
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody>
{% for user in contacts.object_list %}
<tr
class=
"gradeX"
>
<td
class=
"text-center"
><input
type=
"checkbox"
class=
"i-checks"
name=
""
></td>
<td
class=
"text-center"
>
{{ user.id }}
</td>
<td
class=
"text-center"
>
{{ user.username }}
</td>
<td
class=
"text-center"
>
{{ user.name }}
</td>
<td
class=
"text-center"
>
{{ user.username|groups_str }}
</td>
<td
class=
"text-center"
>
{{ user.id|get_role }}
</td>
<td
class=
"text-center"
>
{{ user.email }}
</td>
<td
class=
"text-center"
>
{{ user.is_active|bool2str }}
</td>
<td
class=
"text-center"
>
<a
href=
"../user_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../user_edit/?id={{ user.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../user_del/?id={{ user.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_info"
id=
"editable_info"
role=
"status"
aria-live=
"polite"
>
Showing {{ contacts.start_index }} to {{ contacts.end_index }} of {{ p.count }} entries
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_paginate paging_simple_numbers"
id=
"editable_paginate"
>
<ul
class=
"pagination"
style=
"margin-top: 0; float: right"
>
{% if contacts.has_previous %}
<li
class=
"paginate_button previous"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_previous"
>
<a
href=
"?page={{ contacts.previous_page_number }}"
>
Previous
</a>
</li>
{% else %}
<li
class=
"paginate_button previous disabled"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_previous"
>
<a
href=
"#"
>
Previous
</a>
</li>
{% endif %}
{% for page in p.page_range %}
{% ifequal offset1 page %}
<li
class=
"paginate_button active"
aria-controls=
"editable"
tabindex=
"0"
><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% else %}
<li
class=
"paginate_button"
aria-controls=
"editable"
tabindex=
"0"
><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% endifequal %}
{% endfor %}
{% if contacts.has_next %}
<li
class=
"paginate_button next"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_next"
>
<a
href=
"?page={{ contacts.next_page_number }}"
>
Next
</a>
</li>
{% else %}
<li
class=
"paginate_button next disabled"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_next"
>
<a
href=
"#"
>
Next
</a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$
(
document
).
ready
(
function
(){
$
(
".iframe"
).
colorbox
({
iframe
:
true
,
width
:
"70%"
,
height
:
"70%"
});
});
</script>
<script>
$
(
document
).
ready
(
function
(){
$
(
'input'
).
iCheck
({
checkboxClass
:
'icheckbox_square'
,
radioClass
:
'iradio_square'
,
increaseArea
:
'20%'
// optional
});
});
</script>
{% endblock %}
\ No newline at end of file
templates/link_css.html
View file @
c4196e7d
<link
href=
"/static/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"/static/font-awesome/css/font-awesome.css"
rel=
"stylesheet"
>
<link
href=
"/static/font-awesome/css/font-awesome.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/iCheck/custom.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/iCheck/custom.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/fullcalendar/fullcalendar.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/fullcalendar/fullcalendar.print.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/animate.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/animate.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/style.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/style.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/colorbox.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/colorbox.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/vaildator/jquery.validator.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/vaildator/jquery.validator.css"
rel=
"stylesheet"
>
\ No newline at end of file
templates/script.html
View file @
c4196e7d
...
@@ -4,30 +4,46 @@
...
@@ -4,30 +4,46 @@
<script
src=
"/static/js/plugins/metisMenu/jquery.metisMenu.js"
></script>
<script
src=
"/static/js/plugins/metisMenu/jquery.metisMenu.js"
></script>
<script
src=
"/static/js/plugins/slimscroll/jquery.slimscroll.min.js"
></script>
<script
src=
"/static/js/plugins/slimscroll/jquery.slimscroll.min.js"
></script>
<!-- Peity -->
<script
src=
"/static/js/plugins/peity/jquery.peity.min.js"
></script>
<!-- Custom and plugin javascript -->
<!-- Custom and plugin javascript -->
<script
src=
"/static/js/inspinia.js"
></script>
<script
src=
"/static/js/inspinia.js"
></script>
<script
src=
"/static/js/plugins/pace/pace.min.js"
></script>
<script
src=
"/static/js/plugins/pace/pace.min.js"
></script>
<!-- iCheck -->
<!-- iCheck
box
-->
<script
src=
"/static/js/plugins/iCheck/icheck.min.js"
></script>
<script
src=
"/static/js/plugins/iCheck/icheck.min.js"
></script>
<!-- Peity -->
<!-- Peity -->
<script
src=
"/static/js/
demo/peity-demo
.js"
></script>
<script
src=
"/static/js/
plugins/peity/jquery.peity.min
.js"
></script>
<!--<script>-->
<!-- Peity -->
<!--$(document).ready(function(){-->
<script
src=
"/static/js/demo/peity-demo.js"
></script>
<!--$('.i-checks').iCheck({-->
<!--checkboxClass: 'icheckbox_square-green',-->
<!--radioClass: 'iradio_square-green',-->
<!--});-->
<!--});-->
<!--</script>-->
<script>
$
(
document
).
ready
(
function
(){
$
(
'.i-checks'
).
iCheck
({
checkboxClass
:
'icheckbox_square-green'
,
radioClass
:
'iradio_square-green'
,
});
});
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
;
}
}
}
</script>
<script
src=
"/static/js/plugins/fullcalendar/fullcalendar.min.js"
></script>
<!-- pop windows -->
<!-- pop windows -->
<script
src=
"/static/js/jquery.colorbox.js"
></script>
<script
src=
"/static/js/jquery.colorbox.js"
></script>
...
...
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