Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zui
提交
c3e47472
Z
zui
项目概览
易企天创
/
zui
大约 1 年 前同步成功
通知
6
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
37
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
37
Issue
37
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c3e47472
编写于
8月 11, 2014
作者:
C
Catouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* save sorter config with local storage.
上级
40ead4b9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
66 addition
and
20 deletion
+66
-20
dist/js/zui.js
dist/js/zui.js
+32
-9
dist/js/zui.min.js
dist/js/zui.min.js
+2
-2
src/js/datatable.js
src/js/datatable.js
+32
-9
未找到文件。
dist/js/zui.js
浏览文件 @
c3e47472
...
...
@@ -4874,11 +4874,7 @@ var imgReady = (function () {
var
$th
,
sortdown
;
this
.
$headSpans
.
on
(
'
click
'
,
'
th:not(.sort-disabled, .check-btn)
'
,
function
()
{
$th
=
$
(
this
);
sortdown
=
$th
.
hasClass
(
'
sort-down
'
);
$headCells
.
removeClass
(
'
sort-up sort-down
'
);
$th
.
addClass
(
sortdown
?
'
sort-up
'
:
'
sort-down
'
);
self
.
sortTable
(
$th
);
self
.
sortTable
(
$
(
this
));
});
}
...
...
@@ -4887,17 +4883,39 @@ var imgReady = (function () {
DataTable
.
prototype
.
sortTable
=
function
(
$th
)
{
var
sorterStoreName
=
self
.
id
+
'
_
'
+
'
datatableSorter
'
;
var
sorter
=
store
.
pageGet
(
sorterStoreName
);
if
(
!
$th
)
{
if
(
sorter
)
{
$th
=
this
.
$headCells
.
filter
(
'
[data-index="
'
+
sorter
.
index
+
'
"]
'
).
addClass
(
'
sort-
'
+
sorter
.
type
);
}
else
{
$th
=
this
.
$headCells
.
filter
(
'
.sort-up, .sort-down
'
).
first
();
}
}
if
(
!
$th
.
length
)
{
return
;
}
var
data
=
this
.
data
;
var
cols
=
data
.
cols
,
rows
=
data
.
rows
,
$headCells
=
this
.
$headCells
,
sortUp
,
type
,
sortCol
,
index
;
if
(
!
$th
)
{
$th
=
this
.
$headCells
.
find
(
'
.sort-up, .sort-down
'
).
first
(
);
}
sortUp
=
!
$th
.
hasClass
(
'
sort-up
'
);
$headCells
.
removeClass
(
'
sort-up sort-down
'
);
$th
.
addClass
(
sortUp
?
'
sort-up
'
:
'
sort-down
'
);
index
=
$th
.
data
(
'
index
'
);
sortUp
=
$th
.
hasClass
(
'
sort-up
'
);
...
...
@@ -4958,6 +4976,9 @@ var imgReady = (function () {
lastRows
[
rIdx
]
=
$r
;
});
});
// save sort with local storage
store
.
pageSet
(
sorterStoreName
,
{
index
:
index
,
type
:
sortUp
?
'
up
'
:
'
down
'
});
}
DataTable
.
prototype
.
refresh
=
function
()
...
...
@@ -4974,6 +4995,8 @@ var imgReady = (function () {
{
$cells
.
filter
(
'
[data-index="
'
+
i
+
'
"]
'
).
css
(
'
width
'
,
cols
[
i
].
width
);
}
this
.
sortTable
();
}
$
.
fn
.
datatable
=
function
(
option
)
...
...
dist/js/zui.min.js
浏览文件 @
c3e47472
...
...
@@ -8,5 +8,5 @@
/* Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
if
(
"
undefined
"
==
typeof
jQuery
)
throw
new
Error
(
"
ZUI requires jQuery
"
);
+
function
(
a
,
b
){
"
use strict
"
;
var
c
=
"
localStorage
"
,
d
=
a
[
c
],
e
=
a
.
store
,
f
=
"
page_
"
+
a
.
location
.
pathname
,
g
=
function
(){
this
.
slience
=!
0
,
this
.
enable
=
c
in
a
&&
a
[
c
]
&&
a
[
c
].
setItem
,
this
.
storage
=
d
;
this
.
page
=
this
.
get
(
f
,{})};
g
.
prototype
.
pageSave
=
function
(){
if
(
b
.
isEmptyObject
(
this
.
page
))
this
.
remove
(
f
);
else
{
for
(
var
a
in
this
.
page
){
var
c
=
this
.
page
[
a
];
null
===
c
&&
delete
this
.
page
[
a
]}
this
.
set
(
f
,
this
.
page
)}},
g
.
prototype
.
pageRemove
=
function
(
a
){
"
undefined
"
!=
typeof
this
.
page
[
a
]
&&
(
this
.
page
[
a
]
=
null
,
this
.
pageSave
())},
g
.
prototype
.
pageClear
=
function
(){
this
.
page
=
{},
this
.
pageSave
()},
g
.
prototype
.
pageGet
=
function
(
a
,
b
){
var
c
=
this
.
page
[
a
];
return
void
0
===
b
||
null
!==
c
&&
void
0
!==
c
?
c
:
b
},
g
.
prototype
.
pageSet
=
function
(
a
,
c
){
b
.
isPlainObject
(
a
)?
b
.
extend
(
!
0
,
this
.
page
,
a
):
this
.
page
[
this
.
serialize
(
a
)]
=
c
,
this
.
pageSave
()},
g
.
prototype
.
check
=
function
(){
if
(
!
this
.
enable
&&!
this
.
slience
)
throw
new
Error
(
"
Browser not support localStorage or enable status been set true.
"
);
return
this
.
enable
},
g
.
prototype
.
length
=
function
(){
return
this
.
check
()?
d
.
length
:
0
},
g
.
prototype
.
removeItem
=
function
(
a
){
d
.
removeItem
(
a
)},
g
.
prototype
.
remove
=
function
(
a
){
this
.
removeItem
(
a
)},
g
.
prototype
.
getItem
=
function
(
a
){
return
d
.
getItem
(
a
)},
g
.
prototype
.
get
=
function
(
a
,
b
){
var
c
=
this
.
deserialize
(
this
.
getItem
(
a
));
return
void
0
===
b
||
null
!==
c
&&
void
0
!==
c
?
c
:
b
},
g
.
prototype
.
key
=
function
(){
return
d
.
key
(
key
)},
g
.
prototype
.
setItem
=
function
(
a
,
b
){
d
.
setItem
(
a
,
b
)},
g
.
prototype
.
set
=
function
(
a
,
b
){
return
void
0
===
b
?
this
.
remove
(
a
):
void
this
.
setItem
(
a
,
this
.
serialize
(
b
))},
g
.
prototype
.
clear
=
function
(){
d
.
clear
()},
g
.
prototype
.
forEach
=
function
(
a
){
for
(
var
b
=
0
;
b
<
d
.
length
;
b
++
){
var
c
=
d
.
key
(
b
);
a
(
c
,
h
.
get
(
c
))}},
g
.
prototype
.
getAll
=
function
(){
var
a
=
{};
return
this
.
forEach
(
function
(
b
,
c
){
a
[
b
]
=
c
}),
a
},
g
.
prototype
.
serialize
=
function
(
a
){
return
"
string
"
==
typeof
a
?
a
:
JSON
.
stringify
(
a
)},
g
.
prototype
.
deserialize
=
function
(
a
){
if
(
"
string
"
!=
typeof
a
)
return
void
0
;
try
{
return
JSON
.
parse
(
a
)}
catch
(
b
){
return
a
||
void
0
}};
var
h
=
new
g
;
a
.
store
=
h
,
a
.
store
.
noConflict
=
function
(){
return
a
.
store
=
e
,
h
}}(
window
,
jQuery
),
function
(
a
){
function
b
(
b
){
if
(
"
string
"
==
typeof
b
.
data
){
var
c
=
b
.
handler
,
d
=
b
.
data
.
toLowerCase
().
split
(
"
"
);
b
.
handler
=
function
(
b
){
if
(
this
===
b
.
target
||!
/textarea|select/i
.
test
(
b
.
target
.
nodeName
)
&&
"
text
"
!==
b
.
target
.
type
){
var
e
=
"
keypress
"
!==
b
.
type
&&
a
.
hotkeys
.
specialKeys
[
b
.
which
],
f
=
String
.
fromCharCode
(
b
.
which
).
toLowerCase
(),
g
=
""
,
h
=
{};
b
.
altKey
&&
"
alt
"
!==
e
&&
(
g
+=
"
alt+
"
),
b
.
ctrlKey
&&
"
ctrl
"
!==
e
&&
(
g
+=
"
ctrl+
"
),
b
.
metaKey
&&!
b
.
ctrlKey
&&
"
meta
"
!==
e
&&
(
g
+=
"
meta+
"
),
b
.
shiftKey
&&
"
shift
"
!==
e
&&
(
g
+=
"
shift+
"
),
e
?
h
[
g
+
e
]
=!
0
:(
h
[
g
+
f
]
=!
0
,
h
[
g
+
a
.
hotkeys
.
shiftNums
[
f
]]
=!
0
,
"
shift+
"
===
g
&&
(
h
[
a
.
hotkeys
.
shiftNums
[
f
]]
=!
0
));
for
(
var
i
=
0
,
j
=
d
.
length
;
j
>
i
;
i
++
)
if
(
h
[
d
[
i
]])
return
c
.
apply
(
this
,
arguments
)}}}}
a
.
hotkeys
=
{
version
:
"
0.8
"
,
specialKeys
:{
8
:
"
backspace
"
,
9
:
"
tab
"
,
13
:
"
return
"
,
16
:
"
shift
"
,
17
:
"
ctrl
"
,
18
:
"
alt
"
,
19
:
"
pause
"
,
20
:
"
capslock
"
,
27
:
"
esc
"
,
32
:
"
space
"
,
33
:
"
pageup
"
,
34
:
"
pagedown
"
,
35
:
"
end
"
,
36
:
"
home
"
,
37
:
"
left
"
,
38
:
"
up
"
,
39
:
"
right
"
,
40
:
"
down
"
,
45
:
"
insert
"
,
46
:
"
del
"
,
96
:
"
0
"
,
97
:
"
1
"
,
98
:
"
2
"
,
99
:
"
3
"
,
100
:
"
4
"
,
101
:
"
5
"
,
102
:
"
6
"
,
103
:
"
7
"
,
104
:
"
8
"
,
105
:
"
9
"
,
106
:
"
*
"
,
107
:
"
+
"
,
109
:
"
-
"
,
110
:
"
.
"
,
111
:
"
/
"
,
112
:
"
f1
"
,
113
:
"
f2
"
,
114
:
"
f3
"
,
115
:
"
f4
"
,
116
:
"
f5
"
,
117
:
"
f6
"
,
118
:
"
f7
"
,
119
:
"
f8
"
,
120
:
"
f9
"
,
121
:
"
f10
"
,
122
:
"
f11
"
,
123
:
"
f12
"
,
144
:
"
numlock
"
,
145
:
"
scroll
"
,
191
:
"
/
"
,
224
:
"
meta
"
},
shiftNums
:{
"
`
"
:
"
~
"
,
1
:
"
!
"
,
2
:
"
@
"
,
3
:
"
#
"
,
4
:
"
$
"
,
5
:
"
%
"
,
6
:
"
^
"
,
7
:
"
&
"
,
8
:
"
*
"
,
9
:
"
(
"
,
0
:
"
)
"
,
"
-
"
:
"
_
"
,
"
=
"
:
"
+
"
,
"
;
"
:
"
:
"
,
"
'
"
:
'
"
'
,
"
,
"
:
"
<
"
,
"
.
"
:
"
>
"
,
"
/
"
:
"
?
"
,
"
\\
"
:
"
|
"
}},
a
.
each
([
"
keydown
"
,
"
keyup
"
,
"
keypress
"
],
function
(){
a
.
event
.
special
[
this
]
=
{
add
:
b
}})}(
jQuery
),
function
(
a
){
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([
"
jquery
"
],
a
):
"
object
"
==
typeof
exports
?
module
.
exports
=
a
:
a
(
jQuery
)}(
function
(
a
){
function
b
(
b
){
var
g
=
b
||
window
.
event
,
h
=
i
.
call
(
arguments
,
1
),
j
=
0
,
l
=
0
,
m
=
0
,
n
=
0
,
o
=
0
,
p
=
0
;
if
(
b
=
a
.
event
.
fix
(
g
),
b
.
type
=
"
mousewheel
"
,
"
detail
"
in
g
&&
(
m
=-
1
*
g
.
detail
),
"
wheelDelta
"
in
g
&&
(
m
=
g
.
wheelDelta
),
"
wheelDeltaY
"
in
g
&&
(
m
=
g
.
wheelDeltaY
),
"
wheelDeltaX
"
in
g
&&
(
l
=-
1
*
g
.
wheelDeltaX
),
"
axis
"
in
g
&&
g
.
axis
===
g
.
HORIZONTAL_AXIS
&&
(
l
=-
1
*
m
,
m
=
0
),
j
=
0
===
m
?
l
:
m
,
"
deltaY
"
in
g
&&
(
m
=-
1
*
g
.
deltaY
,
j
=
m
),
"
deltaX
"
in
g
&&
(
l
=
g
.
deltaX
,
0
===
m
&&
(
j
=-
1
*
l
)),
0
!==
m
||
0
!==
l
){
if
(
1
===
g
.
deltaMode
){
var
q
=
a
.
data
(
this
,
"
mousewheel-line-height
"
);
j
*=
q
,
m
*=
q
,
l
*=
q
}
else
if
(
2
===
g
.
deltaMode
){
var
r
=
a
.
data
(
this
,
"
mousewheel-page-height
"
);
j
*=
r
,
m
*=
r
,
l
*=
r
}
if
(
n
=
Math
.
max
(
Math
.
abs
(
m
),
Math
.
abs
(
l
)),(
!
f
||
f
>
n
)
&&
(
f
=
n
,
d
(
g
,
n
)
&&
(
f
/=
40
)),
d
(
g
,
n
)
&&
(
j
/=
40
,
l
/=
40
,
m
/=
40
),
j
=
Math
[
j
>=
1
?
"
floor
"
:
"
ceil
"
](
j
/
f
),
l
=
Math
[
l
>=
1
?
"
floor
"
:
"
ceil
"
](
l
/
f
),
m
=
Math
[
m
>=
1
?
"
floor
"
:
"
ceil
"
](
m
/
f
),
k
.
settings
.
normalizeOffset
&&
this
.
getBoundingClientRect
){
var
s
=
this
.
getBoundingClientRect
();
o
=
b
.
clientX
-
s
.
left
,
p
=
b
.
clientY
-
s
.
top
}
return
b
.
deltaX
=
l
,
b
.
deltaY
=
m
,
b
.
deltaFactor
=
f
,
b
.
offsetX
=
o
,
b
.
offsetY
=
p
,
b
.
deltaMode
=
0
,
h
.
unshift
(
b
,
j
,
l
,
m
),
e
&&
clearTimeout
(
e
),
e
=
setTimeout
(
c
,
200
),(
a
.
event
.
dispatch
||
a
.
event
.
handle
).
apply
(
this
,
h
)}}
function
c
(){
f
=
null
}
function
d
(
a
,
b
){
return
k
.
settings
.
adjustOldDeltas
&&
"
mousewheel
"
===
a
.
type
&&
b
%
120
===
0
}
var
e
,
f
,
g
=
[
"
wheel
"
,
"
mousewheel
"
,
"
DOMMouseScroll
"
,
"
MozMousePixelScroll
"
],
h
=
"
onwheel
"
in
document
||
document
.
documentMode
>=
9
?[
"
wheel
"
]:[
"
mousewheel
"
,
"
DomMouseScroll
"
,
"
MozMousePixelScroll
"
],
i
=
Array
.
prototype
.
slice
;
if
(
a
.
event
.
fixHooks
)
for
(
var
j
=
g
.
length
;
j
;)
a
.
event
.
fixHooks
[
g
[
--
j
]]
=
a
.
event
.
mouseHooks
;
var
k
=
a
.
event
.
special
.
mousewheel
=
{
version
:
"
3.1.12
"
,
setup
:
function
(){
if
(
this
.
addEventListener
)
for
(
var
c
=
h
.
length
;
c
;)
this
.
addEventListener
(
h
[
--
c
],
b
,
!
1
);
else
this
.
onmousewheel
=
b
;
a
.
data
(
this
,
"
mousewheel-line-height
"
,
k
.
getLineHeight
(
this
)),
a
.
data
(
this
,
"
mousewheel-page-height
"
,
k
.
getPageHeight
(
this
))},
teardown
:
function
(){
if
(
this
.
removeEventListener
)
for
(
var
c
=
h
.
length
;
c
;)
this
.
removeEventListener
(
h
[
--
c
],
b
,
!
1
);
else
this
.
onmousewheel
=
null
;
a
.
removeData
(
this
,
"
mousewheel-line-height
"
),
a
.
removeData
(
this
,
"
mousewheel-page-height
"
)},
getLineHeight
:
function
(
b
){
var
c
=
a
(
b
),
d
=
c
[
"
offsetParent
"
in
a
.
fn
?
"
offsetParent
"
:
"
parent
"
]();
return
d
.
length
||
(
d
=
a
(
"
body
"
)),
parseInt
(
d
.
css
(
"
fontSize
"
),
10
)
||
parseInt
(
c
.
css
(
"
fontSize
"
),
10
)
||
16
},
getPageHeight
:
function
(
b
){
return
a
(
b
).
height
()},
settings
:{
adjustOldDeltas
:
!
0
,
normalizeOffset
:
!
0
}};
a
.
fn
.
extend
({
mousewheel
:
function
(
a
){
return
a
?
this
.
bind
(
"
mousewheel
"
,
a
):
this
.
trigger
(
"
mousewheel
"
)},
unmousewheel
:
function
(
a
){
return
this
.
unbind
(
"
mousewheel
"
,
a
)}})}),
+
function
(
a
,
b
,
c
){
"
$:nomunge
"
;
function
d
(){
e
=
b
[
h
](
function
(){
f
.
each
(
function
(){
var
b
=
a
(
this
),
c
=
b
.
width
(),
d
=
b
.
height
(),
e
=
a
.
data
(
this
,
j
);(
c
!==
e
.
w
||
d
!==
e
.
h
)
&&
b
.
trigger
(
i
,[
e
.
w
=
c
,
e
.
h
=
d
])}),
d
()},
g
[
k
])}
var
e
,
f
=
a
([]),
g
=
a
.
resize
=
a
.
extend
(
a
.
resize
,{}),
h
=
"
setTimeout
"
,
i
=
"
resize
"
,
j
=
i
+
"
-special-event
"
,
k
=
"
delay
"
,
l
=
"
throttleWindow
"
;
g
[
k
]
=
250
,
g
[
l
]
=!
0
,
a
.
event
.
special
[
i
]
=
{
setup
:
function
(){
if
(
!
g
[
l
]
&&
this
[
h
])
return
!
1
;
var
b
=
a
(
this
);
f
=
f
.
add
(
b
),
a
.
data
(
this
,
j
,{
w
:
b
.
width
(),
h
:
b
.
height
()}),
1
===
f
.
length
&&
d
()},
teardown
:
function
(){
if
(
!
g
[
l
]
&&
this
[
h
])
return
!
1
;
var
b
=
a
(
this
);
f
=
f
.
not
(
b
),
b
.
removeData
(
j
),
f
.
length
||
clearTimeout
(
e
)},
add
:
function
(
b
){
function
d
(
b
,
d
,
f
){
var
g
=
a
(
this
),
h
=
a
.
data
(
this
,
j
);
h
.
w
=
d
!==
c
?
d
:
g
.
width
(),
h
.
h
=
f
!==
c
?
f
:
g
.
height
(),
e
.
apply
(
this
,
arguments
)}
if
(
!
g
[
l
]
&&
this
[
h
])
return
!
1
;
var
e
;
return
a
.
isFunction
(
b
)?(
e
=
b
,
d
):(
e
=
b
.
handler
,
void
(
b
.
handler
=
d
))}}}(
jQuery
,
this
),
String
.
prototype
.
format
=
function
(
a
){
var
b
=
this
;
if
(
arguments
.
length
>
0
){
var
c
;
if
(
1
==
arguments
.
length
&&
"
object
"
==
typeof
a
)
for
(
var
d
in
a
)
void
0
!=
a
[
d
]
&&
(
c
=
new
RegExp
(
"
({
"
+
d
+
"
})
"
,
"
g
"
),
b
=
b
.
replace
(
c
,
a
[
d
]));
else
for
(
var
e
=
0
;
e
<
arguments
.
length
;
e
++
)
void
0
!=
arguments
[
e
]
&&
(
c
=
new
RegExp
(
"
({[
"
+
e
+
"
]})
"
,
"
g
"
),
b
=
b
.
replace
(
c
,
arguments
[
e
]))}
return
b
},
String
.
prototype
.
isNum
=
function
(
a
){
if
(
null
!=
a
){
var
b
,
c
;
return
c
=
/
\d
*/i
,
b
=
a
.
match
(
c
),
b
==
a
?
!
0
:
!
1
}
return
!
1
},
Date
.
prototype
.
format
=
function
(
a
){
var
b
=
{
"
M+
"
:
this
.
getMonth
()
+
1
,
"
d+
"
:
this
.
getDate
(),
"
h+
"
:
this
.
getHours
(),
"
m+
"
:
this
.
getMinutes
(),
"
s+
"
:
this
.
getSeconds
(),
"
q+
"
:
Math
.
floor
((
this
.
getMonth
()
+
3
)
/
3
),
"
S+
"
:
this
.
getMilliseconds
()};
/
(
y+
)
/i
.
test
(
a
)
&&
(
a
=
a
.
replace
(
RegExp
.
$1
,(
this
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
)));
for
(
var
c
in
b
)
new
RegExp
(
"
(
"
+
c
+
"
)
"
).
test
(
a
)
&&
(
a
=
a
.
replace
(
RegExp
.
$1
,
1
==
RegExp
.
$1
.
length
?
b
[
c
]:(
"
00
"
+
b
[
c
]).
substr
((
""
+
b
[
c
]).
length
)));
return
a
},
function
(
a
){
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([
"
jquery
"
],
a
):
a
(
"
object
"
==
typeof
exports
?
require
(
"
jquery
"
):
jQuery
)}(
function
(
a
){
function
b
(
a
){
return
h
.
raw
?
a
:
encodeURIComponent
(
a
)}
function
c
(
a
){
return
h
.
raw
?
a
:
decodeURIComponent
(
a
)}
function
d
(
a
){
return
b
(
h
.
json
?
JSON
.
stringify
(
a
):
String
(
a
))}
function
e
(
a
){
0
===
a
.
indexOf
(
'
"
'
)
&&
(
a
=
a
.
slice
(
1
,
-
1
).
replace
(
/
\\
"/g
,
'
"
'
).
replace
(
/
\\\\
/g
,
"
\\
"
));
try
{
return
a
=
decodeURIComponent
(
a
.
replace
(
g
,
"
"
)),
h
.
json
?
JSON
.
parse
(
a
):
a
}
catch
(
b
){}}
function
f
(
b
,
c
){
var
d
=
h
.
raw
?
b
:
e
(
b
);
return
a
.
isFunction
(
c
)?
c
(
d
):
d
}
var
g
=
/
\+
/g
,
h
=
a
.
cookie
=
function
(
e
,
g
,
i
){
if
(
void
0
!==
g
&&!
a
.
isFunction
(
g
)){
if
(
i
=
a
.
extend
({},
h
.
defaults
,
i
),
"
number
"
==
typeof
i
.
expires
){
var
j
=
i
.
expires
,
k
=
i
.
expires
=
new
Date
;
k
.
setTime
(
+
k
+
864
e5
*
j
)}
return
document
.
cookie
=
[
b
(
e
),
"
=
"
,
d
(
g
),
i
.
expires
?
"
; expires=
"
+
i
.
expires
.
toUTCString
():
""
,
i
.
path
?
"
; path=
"
+
i
.
path
:
""
,
i
.
domain
?
"
; domain=
"
+
i
.
domain
:
""
,
i
.
secure
?
"
; secure
"
:
""
].
join
(
""
)}
for
(
var
l
=
e
?
void
0
:{},
m
=
document
.
cookie
?
document
.
cookie
.
split
(
"
;
"
):[],
n
=
0
,
o
=
m
.
length
;
o
>
n
;
n
++
){
var
p
=
m
[
n
].
split
(
"
=
"
),
q
=
c
(
p
.
shift
()),
r
=
p
.
join
(
"
=
"
);
if
(
e
&&
e
===
q
){
l
=
f
(
r
,
g
);
break
}
e
||
void
0
===
(
r
=
f
(
r
))
||
(
l
[
q
]
=
r
)}
return
l
};
h
.
defaults
=
{},
a
.
removeCookie
=
function
(
b
,
c
){
return
void
0
===
a
.
cookie
(
b
)?
!
1
:(
a
.
cookie
(
b
,
""
,
a
.
extend
({},
c
,{
expires
:
-
1
})),
!
a
.
cookie
(
b
))}}),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
a
.
extend
({
uuid
:
function
(){
for
(
var
a
=
(
new
Date
).
getTime
();
1
e16
>
a
;)
a
*=
10
;
return
a
+
d
.
floor
(
9999
*
d
.
random
())},
getPropertyCount
:
function
(
a
){
return
"
object
"
!=
typeof
a
||
null
==
a
?
0
:
Object
.
getOwnPropertyNames
(
a
).
length
},
callEvent
:
function
(
b
,
c
,
d
){
if
(
a
.
isFunction
(
b
)){
"
undefined
"
!=
typeof
d
&&
(
b
=
a
.
proxy
(
b
,
d
));
var
e
=
b
(
c
);
return
!
(
void
0
!=
e
&&!
e
)}
return
1
}})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
){
var
c
=
1200
,
d
=
992
,
e
=
768
,
f
=
{
desktop
:
"
screen-desktop
"
,
desktopLg
:
"
screen-desktop-wide
"
,
tablet
:
"
screen-tablet
"
,
phone
:
"
screen-phone
"
,
isMobile
:
"
device-mobile
"
,
isDesktop
:
"
device-desktop
"
},
g
=
function
(){
var
g
=
a
(
b
).
width
();
a
(
"
html
"
).
toggleClass
(
f
.
desktop
,
g
>=
d
&&
c
>
g
).
toggleClass
(
f
.
desktopLg
,
g
>=
c
).
toggleClass
(
f
.
tablet
,
g
>=
e
&&
d
>
g
).
toggleClass
(
f
.
phone
,
e
>
g
).
toggleClass
(
f
.
isMobile
,
d
>
g
).
toggleClass
(
f
.
isDesktop
,
g
>=
d
)};
a
(
b
).
resize
(
g
),
g
()}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
function
b
(){
var
a
=
document
.
createElement
(
"
bootstrap
"
),
b
=
{
WebkitTransition
:
"
webkitTransitionEnd
"
,
MozTransition
:
"
transitionend
"
,
transition
:
"
transitionend
"
};
for
(
var
c
in
b
)
if
(
void
0
!==
a
.
style
[
c
])
return
{
end
:
b
[
c
]}}
a
.
fn
.
emulateTransitionEnd
=
function
(
b
){
var
c
=!
1
,
d
=
this
;
a
(
this
).
one
(
a
.
support
.
transition
.
end
,
function
(){
c
=!
0
});
var
e
=
function
(){
c
||
a
(
d
).
trigger
(
a
.
support
.
transition
.
end
)};
return
setTimeout
(
e
,
b
),
this
},
a
(
function
(){
a
.
support
.
transition
=
b
()})}(
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
'
[data-dismiss="alert"]
'
,
c
=
function
(
c
){
a
(
c
).
on
(
"
click
"
,
b
,
this
.
close
)};
c
.
prototype
.
close
=
function
(
b
){
function
c
(){
f
.
trigger
(
"
closed.bs.alert
"
).
remove
()}
var
d
=
a
(
this
),
e
=
d
.
attr
(
"
data-target
"
);
e
||
(
e
=
d
.
attr
(
"
href
"
),
e
=
e
&&
e
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
""
));
var
f
=
a
(
e
);
b
&&
b
.
preventDefault
(),
f
.
length
||
(
f
=
d
.
hasClass
(
"
alert
"
)?
d
:
d
.
parent
()),
f
.
trigger
(
b
=
a
.
Event
(
"
close.bs.alert
"
)),
b
.
isDefaultPrevented
()
||
(
f
.
removeClass
(
"
in
"
),
a
.
support
.
transition
&&
f
.
hasClass
(
"
fade
"
)?
f
.
one
(
a
.
support
.
transition
.
end
,
c
).
emulateTransitionEnd
(
150
):
c
())};
var
d
=
a
.
fn
.
alert
;
a
.
fn
.
alert
=
function
(
b
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.alert
"
);
e
||
d
.
data
(
"
bs.alert
"
,
e
=
new
c
(
this
)),
"
string
"
==
typeof
b
&&
e
[
b
].
call
(
d
)})},
a
.
fn
.
alert
.
Constructor
=
c
,
a
.
fn
.
alert
.
noConflict
=
function
(){
return
a
.
fn
.
alert
=
d
,
this
},
a
(
document
).
on
(
"
click.bs.alert.data-api
"
,
b
,
c
.
prototype
.
close
)}(
window
.
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
c
,
d
){
this
.
$element
=
a
(
c
),
this
.
options
=
a
.
extend
({},
b
.
DEFAULTS
,
d
),
this
.
isLoading
=!
1
};
b
.
DEFAULTS
=
{
loadingText
:
"
loading...
"
},
b
.
prototype
.
setState
=
function
(
b
){
var
c
=
"
disabled
"
,
d
=
this
.
$element
,
e
=
d
.
is
(
"
input
"
)?
"
val
"
:
"
html
"
,
f
=
d
.
data
();
b
+=
"
Text
"
,
f
.
resetText
||
d
.
data
(
"
resetText
"
,
d
[
e
]()),
d
[
e
](
f
[
b
]
||
this
.
options
[
b
]),
setTimeout
(
a
.
proxy
(
function
(){
"
loadingText
"
==
b
?(
this
.
isLoading
=!
0
,
d
.
addClass
(
c
).
attr
(
c
,
c
)):
this
.
isLoading
&&
(
this
.
isLoading
=!
1
,
d
.
removeClass
(
c
).
removeAttr
(
c
))},
this
),
0
)},
b
.
prototype
.
toggle
=
function
(){
var
a
=!
0
,
b
=
this
.
$element
.
closest
(
'
[data-toggle="buttons"]
'
);
if
(
b
.
length
){
var
c
=
this
.
$element
.
find
(
"
input
"
);
"
radio
"
==
c
.
prop
(
"
type
"
)
&&
(
c
.
prop
(
"
checked
"
)
&&
this
.
$element
.
hasClass
(
"
active
"
)?
a
=!
1
:
b
.
find
(
"
.active
"
).
removeClass
(
"
active
"
)),
a
&&
c
.
prop
(
"
checked
"
,
!
this
.
$element
.
hasClass
(
"
active
"
)).
trigger
(
"
change
"
)}
a
&&
this
.
$element
.
toggleClass
(
"
active
"
)};
var
c
=
a
.
fn
.
button
;
a
.
fn
.
button
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.button
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.button
"
,
e
=
new
b
(
this
,
f
)),
"
toggle
"
==
c
?
e
.
toggle
():
c
&&
e
.
setState
(
c
)})},
a
.
fn
.
button
.
Constructor
=
b
,
a
.
fn
.
button
.
noConflict
=
function
(){
return
a
.
fn
.
button
=
c
,
this
},
a
(
document
).
on
(
"
click.bs.button.data-api
"
,
"
[data-toggle^=button]
"
,
function
(
b
){
var
c
=
a
(
b
.
target
);
c
.
hasClass
(
"
btn
"
)
||
(
c
=
c
.
closest
(
"
.btn
"
)),
c
.
button
(
"
toggle
"
),
b
.
preventDefault
()})}(
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
,
c
){
this
.
$element
=
a
(
b
),
this
.
$indicators
=
this
.
$element
.
find
(
"
.carousel-indicators
"
),
this
.
options
=
c
,
this
.
paused
=
this
.
sliding
=
this
.
interval
=
this
.
$active
=
this
.
$items
=
null
,
"
hover
"
==
this
.
options
.
pause
&&
this
.
$element
.
on
(
"
mouseenter
"
,
a
.
proxy
(
this
.
pause
,
this
)).
on
(
"
mouseleave
"
,
a
.
proxy
(
this
.
cycle
,
this
))};
b
.
DEFAULTS
=
{
interval
:
5
e3
,
pause
:
"
hover
"
,
wrap
:
!
0
,
touchable
:
!
0
},
b
.
prototype
.
touchable
=
function
(){
function
b
(
b
){
var
b
=
b
||
window
.
event
;
b
.
originalEvent
&&
(
b
=
b
.
originalEvent
);
var
f
=
a
(
this
);
switch
(
b
.
type
){
case
"
touchstart
"
:
d
=
b
.
touches
[
0
].
pageX
,
e
=
b
.
touches
[
0
].
pageY
;
break
;
case
"
touchend
"
:
var
g
=
b
.
changedTouches
[
0
].
pageX
-
d
,
h
=
b
.
changedTouches
[
0
].
pageY
-
e
;
if
(
Math
.
abs
(
g
)
>
Math
.
abs
(
h
))
c
(
f
,
g
),
Math
.
abs
(
g
)
>
10
&&
b
.
preventDefault
();
else
{
var
i
=
a
(
window
);
a
(
"
body,html
"
).
animate
({
scrollTop
:
i
.
scrollTop
()
-
h
},
400
)}}}
function
c
(
a
,
b
){
b
>
10
&&
a
.
find
(
"
.left.carousel-control
"
).
click
(),
-
10
>
b
&&
a
.
find
(
"
.right.carousel-control
"
).
click
()}
if
(
this
.
options
.
touchable
){
this
.
$element
.
on
(
"
touchstart touchmove touchend
"
,
b
);
var
d
,
e
}},
b
.
prototype
.
cycle
=
function
(
b
){
return
b
||
(
this
.
paused
=!
1
),
this
.
interval
&&
clearInterval
(
this
.
interval
),
this
.
options
.
interval
&&!
this
.
paused
&&
(
this
.
interval
=
setInterval
(
a
.
proxy
(
this
.
next
,
this
),
this
.
options
.
interval
)),
this
},
b
.
prototype
.
getActiveIndex
=
function
(){
return
this
.
$active
=
this
.
$element
.
find
(
"
.item.active
"
),
this
.
$items
=
this
.
$active
.
parent
().
children
(),
this
.
$items
.
index
(
this
.
$active
)},
b
.
prototype
.
to
=
function
(
b
){
var
c
=
this
,
d
=
this
.
getActiveIndex
();
return
b
>
this
.
$items
.
length
-
1
||
0
>
b
?
void
0
:
this
.
sliding
?
this
.
$element
.
one
(
"
slid
"
,
function
(){
c
.
to
(
b
)}):
d
==
b
?
this
.
pause
().
cycle
():
this
.
slide
(
b
>
d
?
"
next
"
:
"
prev
"
,
a
(
this
.
$items
[
b
]))},
b
.
prototype
.
pause
=
function
(
b
){
return
b
||
(
this
.
paused
=!
0
),
this
.
$element
.
find
(
"
.next, .prev
"
).
length
&&
a
.
support
.
transition
.
end
&&
(
this
.
$element
.
trigger
(
a
.
support
.
transition
.
end
),
this
.
cycle
(
!
0
)),
this
.
interval
=
clearInterval
(
this
.
interval
),
this
},
b
.
prototype
.
next
=
function
(){
return
this
.
sliding
?
void
0
:
this
.
slide
(
"
next
"
)},
b
.
prototype
.
prev
=
function
(){
return
this
.
sliding
?
void
0
:
this
.
slide
(
"
prev
"
)},
b
.
prototype
.
slide
=
function
(
b
,
c
){
var
d
=
this
.
$element
.
find
(
"
.item.active
"
),
e
=
c
||
d
[
b
](),
f
=
this
.
interval
,
g
=
"
next
"
==
b
?
"
left
"
:
"
right
"
,
h
=
"
next
"
==
b
?
"
first
"
:
"
last
"
,
i
=
this
;
if
(
!
e
.
length
){
if
(
!
this
.
options
.
wrap
)
return
;
e
=
this
.
$element
.
find
(
"
.item
"
)[
h
]()}
this
.
sliding
=!
0
,
f
&&
this
.
pause
();
var
j
=
a
.
Event
(
"
slide.bs.carousel
"
,{
relatedTarget
:
e
[
0
],
direction
:
g
});
if
(
!
e
.
hasClass
(
"
active
"
)){
if
(
this
.
$indicators
.
length
&&
(
this
.
$indicators
.
find
(
"
.active
"
).
removeClass
(
"
active
"
),
this
.
$element
.
one
(
"
slid
"
,
function
(){
var
b
=
a
(
i
.
$indicators
.
children
()[
i
.
getActiveIndex
()]);
b
&&
b
.
addClass
(
"
active
"
)})),
a
.
support
.
transition
&&
this
.
$element
.
hasClass
(
"
slide
"
)){
if
(
this
.
$element
.
trigger
(
j
),
j
.
isDefaultPrevented
())
return
;
e
.
addClass
(
b
),
e
[
0
].
offsetWidth
,
d
.
addClass
(
g
),
e
.
addClass
(
g
),
d
.
one
(
a
.
support
.
transition
.
end
,
function
(){
e
.
removeClass
([
b
,
g
].
join
(
"
"
)).
addClass
(
"
active
"
),
d
.
removeClass
([
"
active
"
,
g
].
join
(
"
"
)),
i
.
sliding
=!
1
,
setTimeout
(
function
(){
i
.
$element
.
trigger
(
"
slid
"
)},
0
)}).
emulateTransitionEnd
(
600
)}
else
{
if
(
this
.
$element
.
trigger
(
j
),
j
.
isDefaultPrevented
())
return
;
d
.
removeClass
(
"
active
"
),
e
.
addClass
(
"
active
"
),
this
.
sliding
=!
1
,
this
.
$element
.
trigger
(
"
slid
"
)}
return
f
&&
this
.
cycle
(),
this
}};
var
c
=
a
.
fn
.
carousel
;
a
.
fn
.
carousel
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.carousel
"
),
f
=
a
.
extend
({},
b
.
DEFAULTS
,
d
.
data
(),
"
object
"
==
typeof
c
&&
c
),
g
=
"
string
"
==
typeof
c
?
c
:
f
.
slide
;
e
||
d
.
data
(
"
bs.carousel
"
,
e
=
new
b
(
this
,
f
)),
"
number
"
==
typeof
c
?
e
.
to
(
c
):
g
?
e
[
g
]():
f
.
interval
&&
e
.
pause
().
cycle
(),
f
.
touchable
&&
e
.
touchable
()})},
a
.
fn
.
carousel
.
Constructor
=
b
,
a
.
fn
.
carousel
.
noConflict
=
function
(){
return
a
.
fn
.
carousel
=
c
,
this
},
a
(
document
).
on
(
"
click.bs.carousel.data-api
"
,
"
[data-slide], [data-slide-to]
"
,
function
(
b
){
var
c
,
d
=
a
(
this
),
e
=
a
(
d
.
attr
(
"
data-target
"
)
||
(
c
=
d
.
attr
(
"
href
"
))
&&
c
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
""
)),
f
=
a
.
extend
({},
e
.
data
(),
d
.
data
()),
g
=
d
.
attr
(
"
data-slide-to
"
);
g
&&
(
f
.
interval
=!
1
),
e
.
carousel
(
f
),(
g
=
d
.
attr
(
"
data-slide-to
"
))
&&
e
.
data
(
"
bs.carousel
"
).
to
(
g
),
b
.
preventDefault
()}),
a
(
window
).
on
(
"
load
"
,
function
(){
a
(
'
[data-ride="carousel"]
'
).
each
(
function
(){
var
b
=
a
(
this
);
b
.
carousel
(
b
.
data
())})})}(
window
.
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
c
,
d
){
this
.
$element
=
a
(
c
),
this
.
options
=
a
.
extend
({},
b
.
DEFAULTS
,
d
),
this
.
transitioning
=
null
,
this
.
options
.
parent
&&
(
this
.
$parent
=
a
(
this
.
options
.
parent
)),
this
.
options
.
toggle
&&
this
.
toggle
()};
b
.
DEFAULTS
=
{
toggle
:
!
0
},
b
.
prototype
.
dimension
=
function
(){
var
a
=
this
.
$element
.
hasClass
(
"
width
"
);
return
a
?
"
width
"
:
"
height
"
},
b
.
prototype
.
show
=
function
(){
if
(
!
this
.
transitioning
&&!
this
.
$element
.
hasClass
(
"
in
"
)){
var
b
=
a
.
Event
(
"
show.bs.collapse
"
);
if
(
this
.
$element
.
trigger
(
b
),
!
b
.
isDefaultPrevented
()){
var
c
=
this
.
$parent
&&
this
.
$parent
.
find
(
"
> .panel > .in
"
);
if
(
c
&&
c
.
length
){
var
d
=
c
.
data
(
"
bs.collapse
"
);
if
(
d
&&
d
.
transitioning
)
return
;
c
.
collapse
(
"
hide
"
),
d
||
c
.
data
(
"
bs.collapse
"
,
null
)}
var
e
=
this
.
dimension
();
this
.
$element
.
removeClass
(
"
collapse
"
).
addClass
(
"
collapsing
"
)[
e
](
0
),
this
.
transitioning
=
1
;
var
f
=
function
(){
this
.
$element
.
removeClass
(
"
collapsing
"
).
addClass
(
"
in
"
)[
e
](
"
auto
"
),
this
.
transitioning
=
0
,
this
.
$element
.
trigger
(
"
shown.bs.collapse
"
)};
if
(
!
a
.
support
.
transition
)
return
f
.
call
(
this
);
var
g
=
a
.
camelCase
([
"
scroll
"
,
e
].
join
(
"
-
"
));
this
.
$element
.
one
(
a
.
support
.
transition
.
end
,
a
.
proxy
(
f
,
this
)).
emulateTransitionEnd
(
350
)[
e
](
this
.
$element
[
0
][
g
])}}},
b
.
prototype
.
hide
=
function
(){
if
(
!
this
.
transitioning
&&
this
.
$element
.
hasClass
(
"
in
"
)){
var
b
=
a
.
Event
(
"
hide.bs.collapse
"
);
if
(
this
.
$element
.
trigger
(
b
),
!
b
.
isDefaultPrevented
()){
var
c
=
this
.
dimension
();
this
.
$element
[
c
](
this
.
$element
[
c
]())[
0
].
offsetHeight
,
this
.
$element
.
addClass
(
"
collapsing
"
).
removeClass
(
"
collapse
"
).
removeClass
(
"
in
"
),
this
.
transitioning
=
1
;
var
d
=
function
(){
this
.
transitioning
=
0
,
this
.
$element
.
trigger
(
"
hidden.bs.collapse
"
).
removeClass
(
"
collapsing
"
).
addClass
(
"
collapse
"
)};
return
a
.
support
.
transition
?
void
this
.
$element
[
c
](
0
).
one
(
a
.
support
.
transition
.
end
,
a
.
proxy
(
d
,
this
)).
emulateTransitionEnd
(
350
):
d
.
call
(
this
)}}},
b
.
prototype
.
toggle
=
function
(){
this
[
this
.
$element
.
hasClass
(
"
in
"
)?
"
hide
"
:
"
show
"
]()};
var
c
=
a
.
fn
.
collapse
;
a
.
fn
.
collapse
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.collapse
"
),
f
=
a
.
extend
({},
b
.
DEFAULTS
,
d
.
data
(),
"
object
"
==
typeof
c
&&
c
);
e
||
d
.
data
(
"
bs.collapse
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
collapse
.
Constructor
=
b
,
a
.
fn
.
collapse
.
noConflict
=
function
(){
return
a
.
fn
.
collapse
=
c
,
this
},
a
(
document
).
on
(
"
click.bs.collapse.data-api
"
,
"
[data-toggle=collapse]
"
,
function
(
b
){
var
c
,
d
=
a
(
this
),
e
=
d
.
attr
(
"
data-target
"
)
||
b
.
preventDefault
()
||
(
c
=
d
.
attr
(
"
href
"
))
&&
c
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
""
),
f
=
a
(
e
),
g
=
f
.
data
(
"
bs.collapse
"
),
h
=
g
?
"
toggle
"
:
d
.
data
(),
i
=
d
.
attr
(
"
data-parent
"
),
j
=
i
&&
a
(
i
);
g
&&
g
.
transitioning
||
(
j
&&
j
.
find
(
'
[data-toggle=collapse][data-parent="
'
+
i
+
'
"]
'
).
not
(
d
).
addClass
(
"
collapsed
"
),
d
[
f
.
hasClass
(
"
in
"
)?
"
addClass
"
:
"
removeClass
"
](
"
collapsed
"
)),
f
.
collapse
(
h
)})}(
window
.
jQuery
),
+
function
(
a
){
"
use strict
"
;
function
b
(){
a
(
d
).
remove
(),
a
(
e
).
each
(
function
(
b
){
var
d
=
c
(
a
(
this
));
d
.
hasClass
(
"
open
"
)
&&
(
d
.
trigger
(
b
=
a
.
Event
(
"
hide.bs.dropdown
"
)),
b
.
isDefaultPrevented
()
||
d
.
removeClass
(
"
open
"
).
trigger
(
"
hidden.bs.dropdown
"
))})}
function
c
(
b
){
var
c
=
b
.
attr
(
"
data-target
"
);
c
||
(
c
=
b
.
attr
(
"
href
"
),
c
=
c
&&
/#/
.
test
(
c
)
&&
c
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
""
));
var
d
=
c
&&
a
(
c
);
return
d
&&
d
.
length
?
d
:
b
.
parent
()}
var
d
=
"
.dropdown-backdrop
"
,
e
=
"
[data-toggle=dropdown]
"
,
f
=
function
(
b
){
a
(
b
).
on
(
"
click.bs.dropdown
"
,
this
.
toggle
)};
f
.
prototype
.
toggle
=
function
(
d
){
var
e
=
a
(
this
);
if
(
!
e
.
is
(
"
.disabled, :disabled
"
)){
var
f
=
c
(
e
),
g
=
f
.
hasClass
(
"
open
"
);
if
(
b
(),
!
g
){
if
(
"
ontouchstart
"
in
document
.
documentElement
&&!
f
.
closest
(
"
.navbar-nav
"
).
length
&&
a
(
'
<div class="dropdown-backdrop"/>
'
).
insertAfter
(
a
(
this
)).
on
(
"
click
"
,
b
),
f
.
trigger
(
d
=
a
.
Event
(
"
show.bs.dropdown
"
)),
d
.
isDefaultPrevented
())
return
;
f
.
toggleClass
(
"
open
"
).
trigger
(
"
shown.bs.dropdown
"
),
e
.
focus
()}
return
!
1
}},
f
.
prototype
.
keydown
=
function
(
b
){
if
(
/
(
38|40|27
)
/
.
test
(
b
.
keyCode
)){
var
d
=
a
(
this
);
if
(
b
.
preventDefault
(),
b
.
stopPropagation
(),
!
d
.
is
(
"
.disabled, :disabled
"
)){
var
f
=
c
(
d
),
g
=
f
.
hasClass
(
"
open
"
);
if
(
!
g
||
g
&&
27
==
b
.
keyCode
)
return
27
==
b
.
which
&&
f
.
find
(
e
).
focus
(),
d
.
click
();
var
h
=
a
(
"
[role=menu] li:not(.divider):visible a
"
,
f
);
if
(
h
.
length
){
var
i
=
h
.
index
(
h
.
filter
(
"
:focus
"
));
38
==
b
.
keyCode
&&
i
>
0
&&
i
--
,
40
==
b
.
keyCode
&&
i
<
h
.
length
-
1
&&
i
++
,
~
i
||
(
i
=
0
),
h
.
eq
(
i
).
focus
()}}}};
var
g
=
a
.
fn
.
dropdown
;
a
.
fn
.
dropdown
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
dropdown
"
);
d
||
c
.
data
(
"
dropdown
"
,
d
=
new
f
(
this
)),
"
string
"
==
typeof
b
&&
d
[
b
].
call
(
c
)})},
a
.
fn
.
dropdown
.
Constructor
=
f
,
a
.
fn
.
dropdown
.
noConflict
=
function
(){
return
a
.
fn
.
dropdown
=
g
,
this
},
a
(
document
).
on
(
"
click.bs.dropdown.data-api
"
,
b
).
on
(
"
click.bs.dropdown.data-api
"
,
"
.dropdown form
"
,
function
(
a
){
a
.
stopPropagation
()}).
on
(
"
click.bs.dropdown.data-api
"
,
e
,
f
.
prototype
.
toggle
).
on
(
"
keydown.bs.dropdown.data-api
"
,
e
+
"
, [role=menu]
"
,
f
.
prototype
.
keydown
)}(
window
.
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
,
c
){
this
.
options
=
c
,
this
.
$element
=
a
(
b
),
this
.
$backdrop
=
this
.
isShown
=
null
,
this
.
options
.
remote
&&
this
.
$element
.
load
(
this
.
options
.
remote
)};
b
.
DEFAULTS
=
{
backdrop
:
!
0
,
keyboard
:
!
0
,
show
:
!
0
,
position
:
"
fit
"
},
b
.
prototype
.
toggle
=
function
(
a
){
return
this
[
this
.
isShown
?
"
hide
"
:
"
show
"
](
a
)},
b
.
prototype
.
show
=
function
(
b
){
var
c
=
this
,
d
=
a
.
Event
(
"
show.bs.modal
"
,{
relatedTarget
:
b
});
this
.
$element
.
trigger
(
d
),
this
.
isShown
||
d
.
isDefaultPrevented
()
||
(
this
.
isShown
=!
0
,
this
.
escape
(),
this
.
$element
.
on
(
"
click.dismiss.modal
"
,
'
[data-dismiss="modal"]
'
,
a
.
proxy
(
this
.
hide
,
this
)),
this
.
backdrop
(
function
(){
var
d
=
a
.
support
.
transition
&&
c
.
$element
.
hasClass
(
"
fade
"
);
if
(
c
.
$element
.
parent
().
length
||
c
.
$element
.
appendTo
(
document
.
body
),
c
.
$element
.
show
(),
d
&&
c
.
$element
[
0
].
offsetWidth
,
c
.
$element
.
addClass
(
"
in
"
).
attr
(
"
aria-hidden
"
,
!
1
),
c
.
options
.
position
){
var
e
=
c
.
$element
.
find
(
"
.modal-dialog
"
),
f
=
Math
.
max
(
0
,(
a
(
window
).
height
()
-
e
.
outerHeight
())
/
2
),
g
=
"
fit
"
==
c
.
options
.
position
?
2
*
f
/
3
:
"
center
"
==
c
.
options
.
position
?
f
:
c
.
options
.
position
;
e
.
css
(
"
margin-top
"
,
g
)}
c
.
enforceFocus
();
var
h
=
a
.
Event
(
"
shown.bs.modal
"
,{
relatedTarget
:
b
});
d
?
c
.
$element
.
find
(
"
.modal-dialog
"
).
one
(
a
.
support
.
transition
.
end
,
function
(){
c
.
$element
.
focus
().
trigger
(
h
)}).
emulateTransitionEnd
(
300
):
c
.
$element
.
focus
().
trigger
(
h
)}))},
b
.
prototype
.
hide
=
function
(
b
){
b
&&
b
.
preventDefault
(),
b
=
a
.
Event
(
"
hide.bs.modal
"
),
this
.
$element
.
trigger
(
b
),
this
.
isShown
&&!
b
.
isDefaultPrevented
()
&&
(
this
.
isShown
=!
1
,
this
.
escape
(),
a
(
document
).
off
(
"
focusin.bs.modal
"
),
this
.
$element
.
removeClass
(
"
in
"
).
attr
(
"
aria-hidden
"
,
!
0
).
off
(
"
click.dismiss.modal
"
),
a
.
support
.
transition
&&
this
.
$element
.
hasClass
(
"
fade
"
)?
this
.
$element
.
one
(
a
.
support
.
transition
.
end
,
a
.
proxy
(
this
.
hideModal
,
this
)).
emulateTransitionEnd
(
300
):
this
.
hideModal
())},
b
.
prototype
.
enforceFocus
=
function
(){
a
(
document
).
off
(
"
focusin.bs.modal
"
).
on
(
"
focusin.bs.modal
"
,
a
.
proxy
(
function
(
a
){
this
.
$element
[
0
]
===
a
.
target
||
this
.
$element
.
has
(
a
.
target
).
length
||
this
.
$element
.
focus
()},
this
))},
b
.
prototype
.
escape
=
function
(){
this
.
isShown
&&
this
.
options
.
keyboard
?
a
(
document
).
on
(
"
keyup.dismiss.bs.modal
"
,
a
.
proxy
(
function
(
b
){
if
(
27
==
b
.
which
){
var
c
=
a
.
Event
(
"
escaping.bs.modal
"
),
d
=
this
.
$element
.
triggerHandler
(
c
,
"
esc
"
);
if
(
void
0
!=
d
&&!
d
)
return
;
this
.
hide
()}},
this
)):
this
.
isShown
||
a
(
document
).
off
(
"
keyup.dismiss.bs.modal
"
)},
b
.
prototype
.
hideModal
=
function
(){
var
a
=
this
;
this
.
$element
.
hide
(),
this
.
backdrop
(
function
(){
a
.
removeBackdrop
(),
a
.
$element
.
trigger
(
"
hidden.bs.modal
"
)})},
b
.
prototype
.
removeBackdrop
=
function
(){
this
.
$backdrop
&&
this
.
$backdrop
.
remove
(),
this
.
$backdrop
=
null
},
b
.
prototype
.
backdrop
=
function
(
b
){
var
c
=
this
.
$element
.
hasClass
(
"
fade
"
)?
"
fade
"
:
""
;
if
(
this
.
isShown
&&
this
.
options
.
backdrop
){
var
d
=
a
.
support
.
transition
&&
c
;
if
(
this
.
$backdrop
=
a
(
'
<div class="modal-backdrop
'
+
c
+
'
" />
'
).
appendTo
(
document
.
body
),
this
.
$element
.
on
(
"
click.dismiss.modal
"
,
a
.
proxy
(
function
(
a
){
a
.
target
===
a
.
currentTarget
&&
(
"
static
"
==
this
.
options
.
backdrop
?
this
.
$element
[
0
].
focus
.
call
(
this
.
$element
[
0
]):
this
.
hide
.
call
(
this
))},
this
)),
d
&&
this
.
$backdrop
[
0
].
offsetWidth
,
this
.
$backdrop
.
addClass
(
"
in
"
),
!
b
)
return
;
d
?
this
.
$backdrop
.
one
(
a
.
support
.
transition
.
end
,
b
).
emulateTransitionEnd
(
150
):
b
()}
else
!
this
.
isShown
&&
this
.
$backdrop
?(
this
.
$backdrop
.
removeClass
(
"
in
"
),
a
.
support
.
transition
&&
this
.
$element
.
hasClass
(
"
fade
"
)?
this
.
$backdrop
.
one
(
a
.
support
.
transition
.
end
,
b
).
emulateTransitionEnd
(
150
):
b
()):
b
&&
b
()};
var
c
=
a
.
fn
.
modal
;
a
.
fn
.
modal
=
function
(
c
,
d
){
return
this
.
each
(
function
(){
var
e
=
a
(
this
),
f
=
e
.
data
(
"
bs.modal
"
),
g
=
a
.
extend
({},
b
.
DEFAULTS
,
e
.
data
(),
"
object
"
==
typeof
c
&&
c
);
f
||
e
.
data
(
"
bs.modal
"
,
f
=
new
b
(
this
,
g
)),
"
string
"
==
typeof
c
?
f
[
c
](
d
):
g
.
show
&&
f
.
show
(
d
)})},
a
.
fn
.
modal
.
Constructor
=
b
,
a
.
fn
.
modal
.
noConflict
=
function
(){
return
a
.
fn
.
modal
=
c
,
this
},
a
(
document
).
on
(
"
click.bs.modal.data-api
"
,
'
[data-toggle="modal"]
'
,
function
(
b
){
var
c
=
a
(
this
),
d
=
c
.
attr
(
"
href
"
),
e
=
a
(
c
.
attr
(
"
data-target
"
)
||
d
&&
d
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
""
));
if
(
!
(
e
.
length
<
1
)){
var
f
=
e
.
data
(
"
modal
"
)?
"
toggle
"
:
a
.
extend
({
remote
:
!
/#/
.
test
(
d
)
&&
d
},
e
.
data
(),
c
.
data
());
b
.
preventDefault
(),
e
.
modal
(
f
,
this
).
one
(
"
hide
"
,
function
(){
c
.
is
(
"
:visible
"
)
&&
c
.
focus
()})}}),
a
(
document
).
on
(
"
show.bs.modal
"
,
"
.modal
"
,
function
(){
a
(
document
.
body
).
addClass
(
"
modal-open
"
)}).
on
(
"
hidden.bs.modal
"
,
"
.modal
"
,
function
(){
a
(
document
.
body
).
removeClass
(
"
modal-open
"
)})}(
window
.
jQuery
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
function
e
(
c
,
e
){
if
(
c
){
var
f
=
d
.
max
(
0
,(
a
(
b
).
height
()
-
e
.
outerHeight
())
/
2
),
g
=
"
fit
"
==
c
?
2
*
f
/
3
:
"
center
"
==
c
?
f
:
c
;
e
.
css
(
"
margin-top
"
,
g
)}}
if
(
!
a
.
fn
.
modal
)
throw
new
Error
(
"
Modal trigger requires modal.js
"
);
var
f
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
f
.
DEFAULTS
=
{
type
:
"
ajax
"
,
width
:
null
,
height
:
"
auto
"
,
icon
:
"
*
"
,
name
:
"
modalIframe
"
,
fade
:
!
0
,
position
:
"
fit
"
,
iframeTeamplate
:
"
<div class='icon-spinner icon-spin loader'></div><div class='modal-dialog modal-iframe' style='width: {width};'><div class='modal-content'><div class='modal-header'><button class='close' data-dismiss='modal'>×</button><h4 class='modal-title'><i class='icon-{icon}'></i> {title}</h4></div><div class='modal-body' style='height:{height}'><iframe id='{name}' name='{name}' src='{url}' frameborder='no' allowtransparency='true' scrolling='auto' hidefocus='' style='width: 100%; height: 100%; left: 0px;'></iframe></div></div></div>
"
,
ajaxTeamplate
:
"
<div class='icon-spinner icon-spin loader'></div><div class='modal-dialog modal-ajax' style='width: {width};'><div class='modal-content'><div class='modal-header'><button class='close' data-dismiss='modal'>×</button><h4 class='modal-title'><i class='icon-{icon}'></i> {title}</h4></div><div class='modal-body' style='height:{height}'></div></div></div>
"
},
f
.
prototype
.
getOptions
=
function
(
b
){
if
(
b
=
a
.
extend
({
title
:
this
.
$
.
text
()},
f
.
DEFAULTS
,
this
.
$
.
data
(),
b
),
"
number
"
==
typeof
b
.
height
&&
(
b
.
height
+=
"
px
"
),
"
number
"
==
typeof
b
.
width
&&
(
b
.
width
+=
"
px
"
),
"
*
"
==
b
.
icon
){
var
c
=
this
.
$
.
find
(
"
[class^='icon-']
"
);
b
.
icon
=
c
.
length
?
c
.
attr
(
"
class
"
).
substring
(
5
):
""
}
return
b
},
f
.
prototype
.
init
=
function
(){
this
.
initModal
(),
this
.
handleClick
()},
f
.
prototype
.
handleClick
=
function
(){
var
d
=
this
.
options
,
f
=
this
.
modal
;
this
.
$
.
click
(
function
(){
var
g
=
a
(
this
);
if
(
"
disabled
"
==
g
.
attr
(
"
disabled
"
)
||
g
.
hasClass
(
"
disabled
"
))
return
!
1
;
d
.
url
=
(
d
?
d
.
url
:
!
1
)
||
g
.
attr
(
"
href
"
);
var
h
=
d
.
cssClass
;
if
(
"
fullscreen
"
==
d
.
size
){
var
i
=
a
(
b
);
d
.
width
=
i
.
width
(),
d
.
height
=
i
.
height
(),
h
+=
"
fullscreen
"
}
if
(
d
.
headerless
?
h
+=
"
hide-header
"
:
"
fullscreen
"
==
d
.
size
&&
(
d
.
height
-=
f
.
find
(
"
.modal-header
"
).
outerHeight
()),
f
.
addClass
(
"
modal-loading
"
).
toggleClass
(
"
fade
"
,
d
.
fade
),
"
custom
"
===
d
.
type
&&
d
.
custom
)
d
.
custom
({
modal
:
f
,
options
:
d
,
element
:
g
,
ready
:
function
(){
e
(
d
.
position
,
f
.
find
(
"
.modal-dialog
"
)),
f
.
removeClass
(
"
modal-loading
"
)}});
else
if
(
"
ajax
"
===
d
.
type
)
f
.
load
(
d
.
url
,
function
(){
setTimeout
(
function
(){
var
a
=
f
.
find
(
"
.modal-body
"
),
b
=
f
.
find
(
"
.modal-dialog
"
);
d
.
width
&&
b
.
css
(
"
width
"
,
d
.
width
),
"
auto
"
!=
d
.
height
&&
a
.
css
(
"
height
"
,
d
.
height
),
d
.
width
&&
b
.
css
(
"
width
"
,
d
.
width
),
e
(
d
.
position
,
b
),
f
.
removeClass
(
"
modal-loading
"
)},
200
)});
else
{
f
.
data
(
"
first
"
,
!
0
),
f
.
html
(
d
.
iframeTeamplate
.
format
(
d
));
var
j
=
f
.
find
(
"
.modal-body
"
),
k
=
f
.
find
(
"
.modal-dialog
"
);
h
&&
k
.
addClass
(
d
.
cssClass
),
d
.
width
&&
k
.
css
(
"
width
"
,
d
.
width
);
var
l
=
c
.
getElementById
(
d
.
name
);
l
.
onload
=
l
.
onreadystatechange
=
function
(){
if
(
f
.
data
(
"
first
"
)
||
f
.
addClass
(
"
modal-loading
"
),
!
this
.
readyState
||
"
complete
"
==
this
.
readyState
){
f
.
data
(
"
first
"
,
!
1
);
try
{
var
c
=
a
(
b
.
frames
[
d
.
name
].
document
);
if
(
"
auto
"
==
d
.
height
&&
"
fullscreen
"
!=
d
.
size
){
var
g
=
c
.
find
(
"
body
"
);
setTimeout
(
function
(){
j
.
css
(
"
height
"
,
g
.
addClass
(
"
body-modal
"
).
outerHeight
()),
e
(
d
.
position
,
k
),
f
.
removeClass
(
"
modal-loading
"
)},
100
),
g
.
resize
(
function
(){
j
.
css
(
"
height
"
,
g
.
outerHeight
())})}
else
f
.
removeClass
(
"
modal-loading
"
);
var
h
=
b
.
frames
[
d
.
name
].
$
;
h
&&
h
.
extend
({
closeModal
:
a
.
closeModal
})}
catch
(
i
){
f
.
removeClass
(
"
modal-loading
"
)}}}}
return
f
.
modal
(
"
show
"
),
f
.
attr
(
"
rel
"
,
d
.
url
),
!
1
})},
f
.
prototype
.
initModal
=
function
(){
var
c
=
"
ajaxModal
"
,
d
=
this
.
options
,
e
=
d
.
location
;
a
(
"
#
"
+
c
).
length
?
a
(
c
).
off
(
"
show.bs.modal shown.bs.modal hide.bs.modal hidden.bs.modal
"
):
a
(
'
<div id="
'
+
c
+
'
" class="modal fade"></div>
'
).
appendTo
(
"
body
"
);
var
f
=
a
(
"
#
"
+
c
);
this
.
modal
=
f
.
data
(
"
options
"
,
d
),
a
.
extend
({
closeModal
:
function
(
c
,
d
){
d
=
d
||
e
,
f
.
on
(
"
hidden.bs.modal
"
,
function
(){
d
&&
(
"
this
"
==
d
?
b
.
location
.
reload
():
b
.
location
=
d
),
c
&&
a
.
isFunction
(
c
)
&&
c
()}),
f
.
modal
(
"
hide
"
)}}),
d
.
afterShow
&&
a
.
isFunction
(
d
.
afterShow
)
&&
f
.
on
(
"
show.bs.modal
"
,
d
.
afterShow
),
d
.
afterShown
&&
a
.
isFunction
(
d
.
afterShown
)
&&
f
.
on
(
"
shown.bs.modal
"
,
d
.
afterShown
),
d
.
afterHide
&&
a
.
isFunction
(
d
.
afterHide
)
&&
f
.
on
(
"
hide.bs.modal
"
,
d
.
afterHide
),
d
.
afterHidden
&&
a
.
isFunction
(
d
.
afterHidden
)
&&
f
.
on
(
"
hidden.bs.modal
"
,
d
.
afterHidden
)},
a
.
fn
.
modalTrigger
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.modalTrigger
"
),
e
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.dataTable
"
,
d
=
new
f
(
this
,
e
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
(
function
(){
a
(
'
[data-toggle="modal"]
'
).
each
(
function
(){{
var
b
=
a
(
this
);
b
.
attr
(
"
href
"
)}
if
(
b
.
hasClass
(
"
iframe
"
))
b
.
modalTrigger
({
type
:
"
iframe
"
});
else
{
var
c
=
b
.
attr
(
"
href
"
)
||
b
.
data
(
"
target
"
);
try
{
a
(
c
).
length
||
b
.
modalTrigger
()}
catch
(
d
){
b
.
modalTrigger
()}}})})}(
window
.
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
a
,
b
){
this
.
type
=
this
.
options
=
this
.
enabled
=
this
.
timeout
=
this
.
hoverState
=
this
.
$element
=
null
,
this
.
init
(
"
tooltip
"
,
a
,
b
)};
b
.
DEFAULTS
=
{
animation
:
!
0
,
placement
:
"
top
"
,
selector
:
!
1
,
template
:
'
<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>
'
,
trigger
:
"
hover focus
"
,
title
:
""
,
delay
:
0
,
html
:
!
1
,
container
:
!
1
},
b
.
prototype
.
init
=
function
(
b
,
c
,
d
){
this
.
enabled
=!
0
,
this
.
type
=
b
,
this
.
$element
=
a
(
c
),
this
.
options
=
this
.
getOptions
(
d
);
for
(
var
e
=
this
.
options
.
trigger
.
split
(
"
"
),
f
=
e
.
length
;
f
--
;){
var
g
=
e
[
f
];
if
(
"
click
"
==
g
)
this
.
$element
.
on
(
"
click.
"
+
this
.
type
,
this
.
options
.
selector
,
a
.
proxy
(
this
.
toggle
,
this
));
else
if
(
"
manual
"
!=
g
){
var
h
=
"
hover
"
==
g
?
"
mouseenter
"
:
"
focus
"
,
i
=
"
hover
"
==
g
?
"
mouseleave
"
:
"
blur
"
;
this
.
$element
.
on
(
h
+
"
.
"
+
this
.
type
,
this
.
options
.
selector
,
a
.
proxy
(
this
.
enter
,
this
)),
this
.
$element
.
on
(
i
+
"
.
"
+
this
.
type
,
this
.
options
.
selector
,
a
.
proxy
(
this
.
leave
,
this
))}}
this
.
options
.
selector
?
this
.
_options
=
a
.
extend
({},
this
.
options
,{
trigger
:
"
manual
"
,
selector
:
""
}):
this
.
fixTitle
()},
b
.
prototype
.
getDefaults
=
function
(){
return
b
.
DEFAULTS
},
b
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
this
.
getDefaults
(),
this
.
$element
.
data
(),
b
),
b
.
delay
&&
"
number
"
==
typeof
b
.
delay
&&
(
b
.
delay
=
{
show
:
b
.
delay
,
hide
:
b
.
delay
}),
b
},
b
.
prototype
.
getDelegateOptions
=
function
(){
var
b
=
{},
c
=
this
.
getDefaults
();
return
this
.
_options
&&
a
.
each
(
this
.
_options
,
function
(
a
,
d
){
c
[
a
]
!=
d
&&
(
b
[
a
]
=
d
)}),
b
},
b
.
prototype
.
enter
=
function
(
b
){
var
c
=
b
instanceof
this
.
constructor
?
b
:
a
(
b
.
currentTarget
)[
this
.
type
](
this
.
getDelegateOptions
()).
data
(
"
bs.
"
+
this
.
type
);
return
clearTimeout
(
c
.
timeout
),
c
.
hoverState
=
"
in
"
,
c
.
options
.
delay
&&
c
.
options
.
delay
.
show
?
void
(
c
.
timeout
=
setTimeout
(
function
(){
"
in
"
==
c
.
hoverState
&&
c
.
show
()},
c
.
options
.
delay
.
show
)):
c
.
show
()},
b
.
prototype
.
leave
=
function
(
b
){
var
c
=
b
instanceof
this
.
constructor
?
b
:
a
(
b
.
currentTarget
)[
this
.
type
](
this
.
getDelegateOptions
()).
data
(
"
bs.
"
+
this
.
type
);
return
clearTimeout
(
c
.
timeout
),
c
.
hoverState
=
"
out
"
,
c
.
options
.
delay
&&
c
.
options
.
delay
.
hide
?
void
(
c
.
timeout
=
setTimeout
(
function
(){
"
out
"
==
c
.
hoverState
&&
c
.
hide
()},
c
.
options
.
delay
.
hide
)):
c
.
hide
()},
b
.
prototype
.
show
=
function
(){
var
b
=
a
.
Event
(
"
show.bs.
"
+
this
.
type
);
if
(
this
.
hasContent
()
&&
this
.
enabled
){
if
(
this
.
$element
.
trigger
(
b
),
b
.
isDefaultPrevented
())
return
;
var
c
=
this
.
tip
();
this
.
setContent
(),
this
.
options
.
animation
&&
c
.
addClass
(
"
fade
"
);
var
d
=
"
function
"
==
typeof
this
.
options
.
placement
?
this
.
options
.
placement
.
call
(
this
,
c
[
0
],
this
.
$element
[
0
]):
this
.
options
.
placement
,
e
=
/
\s?
auto
?\s?
/i
,
f
=
e
.
test
(
d
);
f
&&
(
d
=
d
.
replace
(
e
,
""
)
||
"
top
"
),
c
.
detach
().
css
({
top
:
0
,
left
:
0
,
display
:
"
block
"
}).
addClass
(
d
),
this
.
options
.
container
?
c
.
appendTo
(
this
.
options
.
container
):
c
.
insertAfter
(
this
.
$element
);
var
g
=
this
.
getPosition
(),
h
=
c
[
0
].
offsetWidth
,
i
=
c
[
0
].
offsetHeight
;
if
(
f
){
var
j
=
this
.
$element
.
parent
(),
k
=
d
,
l
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
,
m
=
"
body
"
==
this
.
options
.
container
?
window
.
innerWidth
:
j
.
outerWidth
(),
n
=
"
body
"
==
this
.
options
.
container
?
window
.
innerHeight
:
j
.
outerHeight
(),
o
=
"
body
"
==
this
.
options
.
container
?
0
:
j
.
offset
().
left
;
d
=
"
bottom
"
==
d
&&
g
.
top
+
g
.
height
+
i
-
l
>
n
?
"
top
"
:
"
top
"
==
d
&&
g
.
top
-
l
-
i
<
0
?
"
bottom
"
:
"
right
"
==
d
&&
g
.
right
+
h
>
m
?
"
left
"
:
"
left
"
==
d
&&
g
.
left
-
h
<
o
?
"
right
"
:
d
,
c
.
removeClass
(
k
).
addClass
(
d
)}
var
p
=
this
.
getCalculatedOffset
(
d
,
g
,
h
,
i
);
this
.
applyPlacement
(
p
,
d
),
this
.
$element
.
trigger
(
"
shown.bs.
"
+
this
.
type
)}},
b
.
prototype
.
applyPlacement
=
function
(
a
,
b
){
var
c
,
d
=
this
.
tip
(),
e
=
d
[
0
].
offsetWidth
,
f
=
d
[
0
].
offsetHeight
,
g
=
parseInt
(
d
.
css
(
"
margin-top
"
),
10
),
h
=
parseInt
(
d
.
css
(
"
margin-left
"
),
10
);
isNaN
(
g
)
&&
(
g
=
0
),
isNaN
(
h
)
&&
(
h
=
0
),
a
.
top
=
a
.
top
+
g
,
a
.
left
=
a
.
left
+
h
,
d
.
offset
(
a
).
addClass
(
"
in
"
);
var
i
=
d
[
0
].
offsetWidth
,
j
=
d
[
0
].
offsetHeight
;
if
(
"
top
"
==
b
&&
j
!=
f
&&
(
c
=!
0
,
a
.
top
=
a
.
top
+
f
-
j
),
/bottom|top/
.
test
(
b
)){
var
k
=
0
;
a
.
left
<
0
&&
(
k
=-
2
*
a
.
left
,
a
.
left
=
0
,
d
.
offset
(
a
),
i
=
d
[
0
].
offsetWidth
,
j
=
d
[
0
].
offsetHeight
),
this
.
replaceArrow
(
k
-
e
+
i
,
i
,
"
left
"
)}
else
this
.
replaceArrow
(
j
-
f
,
j
,
"
top
"
);
c
&&
d
.
offset
(
a
)},
b
.
prototype
.
replaceArrow
=
function
(
a
,
b
,
c
){
this
.
arrow
().
css
(
c
,
a
?
50
*
(
1
-
a
/
b
)
+
"
%
"
:
""
)},
b
.
prototype
.
setContent
=
function
(){
var
a
=
this
.
tip
(),
b
=
this
.
getTitle
();
a
.
find
(
"
.tooltip-inner
"
)[
this
.
options
.
html
?
"
html
"
:
"
text
"
](
b
),
a
.
removeClass
(
"
fade in top bottom left right
"
)},
b
.
prototype
.
hide
=
function
(){
function
b
(){
"
in
"
!=
c
.
hoverState
&&
d
.
detach
()}
var
c
=
this
,
d
=
this
.
tip
(),
e
=
a
.
Event
(
"
hide.bs.
"
+
this
.
type
);
return
this
.
$element
.
trigger
(
e
),
e
.
isDefaultPrevented
()?
void
0
:(
d
.
removeClass
(
"
in
"
),
a
.
support
.
transition
&&
this
.
$tip
.
hasClass
(
"
fade
"
)?
d
.
one
(
a
.
support
.
transition
.
end
,
b
).
emulateTransitionEnd
(
150
):
b
(),
this
.
$element
.
trigger
(
"
hidden.bs.
"
+
this
.
type
),
this
)},
b
.
prototype
.
fixTitle
=
function
(){
var
a
=
this
.
$element
;(
a
.
attr
(
"
title
"
)
||
"
string
"
!=
typeof
a
.
attr
(
"
data-original-title
"
))
&&
a
.
attr
(
"
data-original-title
"
,
a
.
attr
(
"
title
"
)
||
""
).
attr
(
"
title
"
,
""
)},
b
.
prototype
.
hasContent
=
function
(){
return
this
.
getTitle
()},
b
.
prototype
.
getPosition
=
function
(){
var
b
=
this
.
$element
[
0
];
return
a
.
extend
({},
"
function
"
==
typeof
b
.
getBoundingClientRect
?
b
.
getBoundingClientRect
():{
width
:
b
.
offsetWidth
,
height
:
b
.
offsetHeight
},
this
.
$element
.
offset
())},
b
.
prototype
.
getCalculatedOffset
=
function
(
a
,
b
,
c
,
d
){
return
"
bottom
"
==
a
?{
top
:
b
.
top
+
b
.
height
,
left
:
b
.
left
+
b
.
width
/
2
-
c
/
2
}:
"
top
"
==
a
?{
top
:
b
.
top
-
d
,
left
:
b
.
left
+
b
.
width
/
2
-
c
/
2
}:
"
left
"
==
a
?{
top
:
b
.
top
+
b
.
height
/
2
-
d
/
2
,
left
:
b
.
left
-
c
}:{
top
:
b
.
top
+
b
.
height
/
2
-
d
/
2
,
left
:
b
.
left
+
b
.
width
}},
b
.
prototype
.
getTitle
=
function
(){
var
a
,
b
=
this
.
$element
,
c
=
this
.
options
;
return
a
=
b
.
attr
(
"
data-original-title
"
)
||
(
"
function
"
==
typeof
c
.
title
?
c
.
title
.
call
(
b
[
0
]):
c
.
title
)},
b
.
prototype
.
tip
=
function
(){
return
this
.
$tip
=
this
.
$tip
||
a
(
this
.
options
.
template
)},
b
.
prototype
.
arrow
=
function
(){
return
this
.
$arrow
=
this
.
$arrow
||
this
.
tip
().
find
(
"
.tooltip-arrow
"
)},
b
.
prototype
.
validate
=
function
(){
this
.
$element
[
0
].
parentNode
||
(
this
.
hide
(),
this
.
$element
=
null
,
this
.
options
=
null
)},
b
.
prototype
.
enable
=
function
(){
this
.
enabled
=!
0
},
b
.
prototype
.
disable
=
function
(){
this
.
enabled
=!
1
},
b
.
prototype
.
toggleEnabled
=
function
(){
this
.
enabled
=!
this
.
enabled
},
b
.
prototype
.
toggle
=
function
(
b
){
var
c
=
b
?
a
(
b
.
currentTarget
)[
this
.
type
](
this
.
getDelegateOptions
()).
data
(
"
bs.
"
+
this
.
type
):
this
;
c
.
tip
().
hasClass
(
"
in
"
)?
c
.
leave
(
c
):
c
.
enter
(
c
)},
b
.
prototype
.
destroy
=
function
(){
this
.
hide
().
$element
.
off
(
"
.
"
+
this
.
type
).
removeData
(
"
bs.
"
+
this
.
type
)};
var
c
=
a
.
fn
.
tooltip
;
a
.
fn
.
tooltip
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.tooltip
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.tooltip
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
tooltip
.
Constructor
=
b
,
a
.
fn
.
tooltip
.
noConflict
=
function
(){
return
a
.
fn
.
tooltip
=
c
,
this
}}(
window
.
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
a
,
b
){
this
.
init
(
"
popover
"
,
a
,
b
)};
if
(
!
a
.
fn
.
tooltip
)
throw
new
Error
(
"
Popover requires tooltip.js
"
);
b
.
DEFAULTS
=
a
.
extend
({},
a
.
fn
.
tooltip
.
Constructor
.
DEFAULTS
,{
placement
:
"
right
"
,
trigger
:
"
click
"
,
content
:
""
,
template
:
'
<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>
'
}),
b
.
prototype
=
a
.
extend
({},
a
.
fn
.
tooltip
.
Constructor
.
prototype
),
b
.
prototype
.
constructor
=
b
,
b
.
prototype
.
getDefaults
=
function
(){
return
b
.
DEFAULTS
},
b
.
prototype
.
setContent
=
function
(){
var
a
=
this
.
tip
(),
b
=
this
.
getTarget
();
if
(
b
)
return
b
.
find
(
"
.arrow
"
).
length
<
1
&&
a
.
addClass
(
"
no-arrow
"
),
void
a
.
html
(
b
.
html
());
var
c
=
this
.
getTitle
(),
d
=
this
.
getContent
();
a
.
find
(
"
.popover-title
"
)[
this
.
options
.
html
?
"
html
"
:
"
text
"
](
c
),
a
.
find
(
"
.popover-content
"
)[
this
.
options
.
html
?
"
html
"
:
"
text
"
](
d
),
a
.
removeClass
(
"
fade top bottom left right in
"
),
a
.
find
(
"
.popover-title
"
).
html
()
||
a
.
find
(
"
.popover-title
"
).
hide
()},
b
.
prototype
.
hasContent
=
function
(){
return
this
.
getTarget
()
||
this
.
getTitle
()
||
this
.
getContent
()},
b
.
prototype
.
getContent
=
function
(){
var
a
=
this
.
$element
,
b
=
this
.
options
;
return
a
.
attr
(
"
data-content
"
)
||
(
"
function
"
==
typeof
b
.
content
?
b
.
content
.
call
(
a
[
0
]):
b
.
content
)},
b
.
prototype
.
getTarget
=
function
(){
var
b
=
this
.
$element
,
c
=
this
.
options
,
d
=
b
.
attr
(
"
data-target
"
)
||
(
"
function
"
==
typeof
c
.
target
?
c
.
target
.
call
(
b
[
0
]):
c
.
target
);
return
d
?
"
$next
"
==
d
?
b
.
next
(
"
.popover
"
):
a
(
d
):
!
1
},
b
.
prototype
.
arrow
=
function
(){
return
this
.
$arrow
=
this
.
$arrow
||
this
.
tip
().
find
(
"
.arrow
"
)},
b
.
prototype
.
tip
=
function
(){
return
this
.
$tip
||
(
this
.
$tip
=
a
(
this
.
options
.
template
)),
this
.
$tip
};
var
c
=
a
.
fn
.
popover
;
a
.
fn
.
popover
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.popover
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.popover
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
popover
.
Constructor
=
b
,
a
.
fn
.
popover
.
noConflict
=
function
(){
return
a
.
fn
.
popover
=
c
,
this
}}(
window
.
jQuery
),
+
function
(
a
){
"
user strict
"
;
var
b
=
function
(
a
,
b
){
this
.
init
(
"
pager
"
,
a
,
b
)};
if
(
!
a
.
fn
.
tooltip
)
throw
new
Error
(
"
Popover requires tooltip.js
"
);
if
(
!
a
.
fn
.
popover
)
throw
new
Error
(
"
Popover requires popover.js
"
);
b
.
prototype
.
init
=
function
(
b
,
c
,
d
){
this
.
type
=
b
,
this
.
$element
=
a
(
c
),
this
.
options
=
d
,
this
.
computeIndex
(),
this
.
$element
.
popover
({
container
:
"
body
"
,
trigger
:
"
manual
"
,
html
:
!
0
,
template
:
'
<div class="popover pager-popover"><div class="arrow"></div><div class="popover-content"></div></div>
'
}).
on
(
"
click.
"
+
this
.
type
,
!
1
,
a
.
proxy
(
this
.
showPopover
,
this
))},
b
.
prototype
.
hidePopover
=
function
(){
var
b
=
this
.
$element
;
"
true
"
==
b
.
attr
(
"
data-safe-close
"
)?(
b
.
popover
(
"
hide
"
).
attr
(
"
data-safe-close
"
,
!
1
),
a
(
document
).
unbind
(
"
click
"
,
this
.
hidePopover
)):
b
.
attr
(
"
data-safe-close
"
,
!
0
)},
b
.
prototype
.
showPopover
=
function
(){
var
b
=
this
.
$element
;
b
.
attr
(
"
data-content
"
)
||
b
.
attr
(
"
data-content
"
,
"
<ul class='pager'>
"
+
this
.
setContent
(
this
.
getUrl
())
+
"
</ul>
"
),
b
.
popover
(
"
show
"
),
a
(
document
).
bind
(
"
click
"
,
a
.
proxy
(
this
.
hidePopover
,
this
))},
b
.
prototype
.
setContent
=
function
(
a
){
var
b
=
""
;
if
(
this
.
isRangeIndex
)
for
(
var
c
=
this
.
indexStart
;
c
<=
this
.
indexEnd
;
c
++
)
b
+=
"
<li><a href='
"
+
a
.
replace
(
"
%
"
,
c
)
+
"
'>
"
+
c
+
"
</a></li>
"
;
else
for
(
var
c
=
this
.
indexs
.
length
-
1
;
c
>=
0
;
c
--
){
var
d
=
this
.
indexs
[
c
];
b
+=
"
<li><a href='
"
+
a
.
replace
(
"
%
"
,
d
)
+
"
'>
"
+
d
+
"
</a></li>
"
}
return
b
},
b
.
prototype
.
getUrl
=
function
(){
var
a
=
this
.
$element
,
b
=
this
.
options
;
return
a
.
attr
(
"
data-url
"
)
||
a
.
attr
(
"
href
"
)
||
(
"
function
"
==
typeof
b
.
url
?
b
.
url
.
call
(
a
[
0
]):
b
.
url
)
||
"
?page=%
"
},
b
.
prototype
.
computeIndex
=
function
(){
var
a
=
this
.
$element
,
b
=
a
.
closest
(
"
li
"
),
c
=
this
.
options
,
d
=
a
.
attr
(
"
data-index
"
)
||
(
"
function
"
==
typeof
c
.
index
?
c
.
index
.
call
(
a
[
0
]):
c
.
index
)
||
b
.
prev
(
"
li
"
).
find
(
"
a
"
).
text
()
-
0
+
1
+
"
-
"
+
(
b
.
next
(
"
li
"
).
find
(
"
a
"
).
text
()
-
1
);
if
(
d
.
indexOf
(
"
-
"
)
>
0
){
this
.
isRangeIndex
=!
0
;
var
e
=
d
.
split
(
"
-
"
);
this
.
indexStart
=
e
[
0
]
-
0
,
this
.
indexEnd
=
e
[
1
]
-
0
,
this
.
indexCount
=
this
.
indexEnd
-
this
.
indexStart
}
else
this
.
indexs
=
d
.
split
(
"
,
"
),
this
.
indexCount
=
this
.
indexs
.
length
};
var
c
=
a
.
fn
.
pager
;
a
.
fn
.
pager
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.pager
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.pager
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
pager
.
Constructor
=
b
,
a
.
fn
.
pager
.
noConflict
=
function
(){
return
a
.
fn
.
pager
=
c
,
this
}}(
window
.
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
){
this
.
element
=
a
(
b
)};
b
.
prototype
.
show
=
function
(){
var
b
=
this
.
element
,
c
=
b
.
closest
(
"
ul:not(.dropdown-menu)
"
),
d
=
b
.
attr
(
"
data-target
"
);
if
(
d
||
(
d
=
b
.
attr
(
"
href
"
),
d
=
d
&&
d
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
""
)),
!
b
.
parent
(
"
li
"
).
hasClass
(
"
active
"
)){
var
e
=
c
.
find
(
"
.active:last a
"
)[
0
],
f
=
a
.
Event
(
"
show.bs.tab
"
,{
relatedTarget
:
e
});
if
(
b
.
trigger
(
f
),
!
f
.
isDefaultPrevented
()){
var
g
=
a
(
d
);
this
.
activate
(
b
.
parent
(
"
li
"
),
c
),
this
.
activate
(
g
,
g
.
parent
(),
function
(){
b
.
trigger
({
type
:
"
shown.bs.tab
"
,
relatedTarget
:
e
})})}}},
b
.
prototype
.
activate
=
function
(
b
,
c
,
d
){
function
e
(){
f
.
removeClass
(
"
active
"
).
find
(
"
> .dropdown-menu > .active
"
).
removeClass
(
"
active
"
),
b
.
addClass
(
"
active
"
),
g
?(
b
[
0
].
offsetWidth
,
b
.
addClass
(
"
in
"
)):
b
.
removeClass
(
"
fade
"
),
b
.
parent
(
"
.dropdown-menu
"
)
&&
b
.
closest
(
"
li.dropdown
"
).
addClass
(
"
active
"
),
d
&&
d
()}
var
f
=
c
.
find
(
"
> .active
"
),
g
=
d
&&
a
.
support
.
transition
&&
f
.
hasClass
(
"
fade
"
);
g
?
f
.
one
(
a
.
support
.
transition
.
end
,
e
).
emulateTransitionEnd
(
150
):
e
(),
f
.
removeClass
(
"
in
"
)};
var
c
=
a
.
fn
.
tab
;
a
.
fn
.
tab
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.tab
"
);
e
||
d
.
data
(
"
bs.tab
"
,
e
=
new
b
(
this
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
tab
.
Constructor
=
b
,
a
.
fn
.
tab
.
noConflict
=
function
(){
return
a
.
fn
.
tab
=
c
,
this
},
a
(
document
).
on
(
"
click.bs.tab.data-api
"
,
'
[data-toggle="tab"], [data-toggle="pill"]
'
,
function
(
b
){
b
.
preventDefault
(),
a
(
this
).
tab
(
"
show
"
)})}(
window
.
jQuery
);
var
imgReady
=
function
(){
var
a
=
[],
b
=
null
,
c
=
function
(){
for
(
var
b
=
0
;
b
<
a
.
length
;
b
++
)
a
[
b
].
end
?
a
.
splice
(
b
--
,
1
):
a
[
b
]();
!
a
.
length
&&
d
()},
d
=
function
(){
clearInterval
(
b
),
b
=
null
};
return
function
(
d
,
e
,
f
,
g
){
var
h
,
i
,
j
,
k
,
l
,
m
=
new
Image
;
return
m
.
src
=
d
,
m
.
complete
?(
e
.
call
(
m
),
void
(
f
&&
f
.
call
(
m
))):(
i
=
m
.
width
,
j
=
m
.
height
,
m
.
onerror
=
function
(){
g
&&
g
.
call
(
m
),
h
.
end
=!
0
,
m
=
m
.
onload
=
m
.
onerror
=
null
},
h
=
function
(){
k
=
m
.
width
,
l
=
m
.
height
,(
k
!==
i
||
l
!==
j
||
k
*
l
>
1024
)
&&
(
e
.
call
(
m
),
h
.
end
=!
0
)},
h
(),
m
.
onload
=
function
(){
!
h
.
end
&&
h
(),
f
&&
f
.
call
(
m
),
m
=
m
.
onload
=
m
.
onerror
=
null
},
void
(
h
.
end
||
(
a
.
push
(
h
),
null
===
b
&&
(
b
=
setInterval
(
c
,
40
)))))}}();
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
if
(
!
a
.
fn
.
modalTrigger
)
throw
new
Error
(
"
modal & modalTrigger requires for lightbox
"
);
if
(
!
imgReady
)
throw
new
Error
(
"
imgReady requires for lightbox
"
);
var
e
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
e
.
DEFAULTS
=
{
modalTeamplate
:
'
<div class="icon-spinner icon-spin loader"></div><div class="modal-dialog"><button class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-remove"></i></button><button class="controller prev"><i class="icon icon-chevron-left"></i></button><button class="controller next"><i class="icon icon-chevron-right"></i></button><img class="lightbox-img" src="{image}" alt="" data-dismiss="modal" /><div class="caption"><div class="content">{caption}<div></div></div>
'
},
e
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
e
.
DEFAULTS
,
this
.
$
.
data
(),
b
),
b
.
image
||
(
b
.
image
=
this
.
$
.
attr
(
"
src
"
)
||
this
.
$
.
attr
(
"
href
"
)
||
this
.
$
.
find
(
"
img
"
).
attr
(
"
src
"
),
this
.
$
.
data
(
"
image
"
,
b
.
image
)),
b
},
e
.
prototype
.
init
=
function
(){
this
.
bindEvents
()},
e
.
prototype
.
initGroups
=
function
(){
var
b
=
this
.
$
.
data
(
"
groups
"
);
b
||
(
b
=
a
(
'
[data-toggle="lightbox"][data-group="
'
+
this
.
options
.
group
+
'
"], [data-lightbox-group="
'
+
this
.
options
.
group
+
'
"]
'
),
this
.
$
.
data
(
"
groups
"
,
b
),
b
.
each
(
function
(
b
){
a
(
this
).
attr
(
"
data-group-index
"
,
b
)})),
this
.
groups
=
b
,
this
.
groupIndex
=
parseInt
(
this
.
$
.
data
(
"
group-index
"
))},
e
.
prototype
.
bindEvents
=
function
(){
var
c
=
this
.
$
,
e
=
this
,
f
=
this
.
options
;
return
f
.
image
?
void
c
.
modalTrigger
({
type
:
"
custom
"
,
name
:
"
lightboxModal
"
,
position
:
"
center
"
,
custom
:
function
(
c
){
e
.
initGroups
();
var
g
=
c
.
modal
,
h
=
e
.
groups
,
i
=
e
.
groupIndex
;
g
.
addClass
(
"
modal-lightbox
"
).
html
(
f
.
modalTeamplate
.
format
(
f
)).
toggleClass
(
"
lightbox-with-caption
"
,
"
string
"
==
typeof
f
.
caption
).
removeClass
(
"
lightbox-full
"
).
data
(
"
group-index
"
,
i
);
var
j
=
g
.
find
(
"
.modal-dialog
"
),
k
=
a
(
b
).
width
();
imgReady
(
f
.
image
,
function
(){
j
.
css
({
width
:
d
.
min
(
k
,
this
.
width
)}),
k
<
this
.
width
+
30
&&
g
.
addClass
(
"
lightbox-full
"
),
c
.
ready
()}),
g
.
find
(
"
.prev
"
).
toggleClass
(
"
show
"
,
h
.
filter
(
'
[data-group-index="
'
+
(
i
-
1
)
+
'
"]
'
).
length
>
0
),
g
.
find
(
"
.next
"
).
toggleClass
(
"
show
"
,
h
.
filter
(
'
[data-group-index="
'
+
(
i
+
1
)
+
'
"]
'
).
length
>
0
),
g
.
find
(
"
.controller
"
).
click
(
function
(){
var
e
=
a
(
this
),
f
=
g
.
data
(
"
group-index
"
)
+
(
e
.
hasClass
(
"
prev
"
)?
-
1
:
1
),
i
=
h
.
filter
(
'
[data-group-index="
'
+
f
+
'
"]
'
);
if
(
i
.
length
){
var
l
=
i
.
data
(
"
image
"
),
m
=
i
.
data
(
"
caption
"
);
g
.
addClass
(
"
modal-loading
"
).
data
(
"
group-index
"
,
f
).
toggleClass
(
"
lightbox-with-caption
"
,
"
string
"
==
typeof
m
).
removeClass
(
"
lightbox-full
"
),
g
.
find
(
"
.lightbox-img
"
).
attr
(
"
src
"
,
l
),
k
=
a
(
b
).
width
(),
imgReady
(
l
,
function
(){
j
.
css
({
width
:
d
.
min
(
k
,
this
.
width
)}),
k
<
this
.
width
+
30
&&
g
.
addClass
(
"
lightbox-full
"
),
c
.
ready
()})}
return
g
.
find
(
"
.prev
"
).
toggleClass
(
"
show
"
,
h
.
filter
(
'
[data-group-index="
'
+
(
f
-
1
)
+
'
"]
'
).
length
>
0
),
g
.
find
(
"
.next
"
).
toggleClass
(
"
show
"
,
h
.
filter
(
'
[data-group-index="
'
+
(
f
+
1
)
+
'
"]
'
).
length
>
0
),
!
1
})}}):
!
1
},
a
.
fn
.
lightbox
=
function
(
b
){
var
c
=
"
group
"
+
(
new
Date
).
getTime
();
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
f
=
"
object
"
==
typeof
b
&&
b
;
"
object
"
==
typeof
f
&&
f
.
group
?
d
.
attr
(
"
data-lightbox-group
"
,
f
.
group
):
d
.
data
(
"
group
"
)?
d
.
attr
(
"
data-lightbox-group
"
,
d
.
data
(
"
group
"
)):
d
.
attr
(
"
data-lightbox-group
"
,
c
),
d
.
data
(
"
group
"
,
d
.
data
(
"
lightbox-group
"
));
var
g
=
d
.
data
(
"
zui.lightbox
"
);
g
||
d
.
data
(
"
zui.lightbox
"
,
g
=
new
e
(
this
,
f
)),
"
string
"
==
typeof
b
&&
g
[
b
]()})},
a
.
fn
.
lightbox
.
Constructor
=
e
,
a
(
function
(){
a
(
'
[data-toggle="lightbox"]
'
).
lightbox
()})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
,
c
){
"
use strict
"
;
var
d
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
d
.
DEFAULTS
=
{
container
:
"
body
"
,
move
:
!
0
},
d
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
d
.
DEFAULTS
,
this
.
$
.
data
(),
b
)},
d
.
prototype
.
init
=
function
(){
this
.
handleMouseEvents
()},
d
.
prototype
.
handleMouseEvents
=
function
(){
var
b
=
this
.
$
,
d
=
this
.
options
;
b
.
mousedown
(
function
(
e
){
function
f
(
c
){
o
=!
0
;
var
e
=
c
.
pageX
,
f
=
c
.
pageY
,
g
=
{
left
:
e
-
m
.
x
,
top
:
f
-
m
.
y
};
b
.
removeClass
(
"
drag-ready
"
).
addClass
(
"
dragging
"
),
d
.
move
&&
b
.
css
(
g
),
d
.
hasOwnProperty
(
"
drag
"
)
&&
a
.
isFunction
(
d
.
drag
)
&&
d
.
drag
({
event
:
c
,
element
:
b
,
startOffset
:
m
,
pos
:
g
,
offset
:{
x
:
e
-
l
.
x
,
y
:
f
-
l
.
y
},
smallOffset
:{
x
:
e
-
n
.
x
,
y
:
f
-
n
.
y
}}),
n
.
x
=
e
,
n
.
y
=
f
,
d
.
stopPropagation
&&
c
.
stopPropagation
()}
function
g
(
e
){
if
(
a
(
c
).
unbind
(
"
mousemove
"
,
f
).
unbind
(
"
mouseup
"
,
g
),
!
o
)
return
void
b
.
removeClass
(
"
drag-ready
"
);
var
h
=
{
left
:
e
.
pageX
-
m
.
x
,
top
:
e
.
pageY
-
m
.
y
};
b
.
removeClass
(
"
drag-ready
"
).
removeClass
(
"
dragging
"
),
d
.
move
&&
b
.
css
(
h
),
d
.
hasOwnProperty
(
"
finish
"
)
&&
a
.
isFunction
(
d
.
finish
)
&&
d
.
finish
({
event
:
e
,
element
:
b
,
pos
:
h
,
offset
:{
x
:
e
.
pageX
-
l
.
x
,
y
:
e
.
pageY
-
l
.
y
},
smallOffset
:{
x
:
e
.
pageX
-
n
.
x
,
y
:
e
.
pageY
-
n
.
y
}}),
e
.
preventDefault
(),
d
.
stopPropagation
&&
e
.
stopPropagation
()}
if
(
d
.
hasOwnProperty
(
"
before
"
)
&&
a
.
isFunction
(
d
.
before
)){
var
h
=
d
.
before
({
event
:
e
,
element
:
b
});
if
(
void
0
!=
h
&&!
h
)
return
}
var
i
=
a
(
d
.
container
),
j
=
b
.
offset
(),
k
=
i
.
offset
(),
l
=
{
x
:
e
.
pageX
,
y
:
e
.
pageY
},
m
=
{
x
:
e
.
pageX
-
j
.
left
+
k
.
left
,
y
:
e
.
pageY
-
j
.
top
+
k
.
top
},
n
=
a
.
extend
({},
l
),
o
=!
1
;
b
.
addClass
(
"
drag-ready
"
),
a
(
c
).
bind
(
"
mousemove
"
,
f
).
bind
(
"
mouseup
"
,
g
),
e
.
preventDefault
(),
d
.
stopPropagation
&&
e
.
stopPropagation
()})},
a
.
fn
.
draggable
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
e
=
c
.
data
(
"
zui.draggable
"
),
f
=
"
object
"
==
typeof
b
&&
b
;
e
||
c
.
data
(
"
zui.draggable
"
,
e
=
new
d
(
this
,
f
)),
"
string
"
==
typeof
b
&&
e
[
b
]()})},
a
.
fn
.
draggable
.
Constructor
=
d
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
var
e
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
e
.
DEFAULTS
=
{
container
:
"
body
"
,
flex
:
!
1
,
deviation
:
5
,
sensorOffsetX
:
0
,
sensorOffsetY
:
0
,
nested
:
!
1
},
e
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
e
.
DEFAULTS
,
this
.
$
.
data
(),
b
)},
e
.
prototype
.
callEvent
=
function
(
b
,
c
){
return
a
.
callEvent
(
this
.
options
[
b
],
c
,
this
)},
e
.
prototype
.
init
=
function
(){
this
.
handleMouseEvents
()},
e
.
prototype
.
handleMouseEvents
=
function
(){
var
b
=
this
.
$
,
e
=
this
,
f
=
this
.
options
;
this
.
$triggerTarget
=
f
.
trigger
?(
a
.
isFunction
(
f
.
trigger
)?
f
.
trigger
(
b
):
b
.
find
(
f
.
trigger
)).
first
():
b
,
this
.
$triggerTarget
.
on
(
"
mousedown
"
,
function
(
g
){
function
h
(
c
){
var
g
=
{
left
:
c
.
pageX
,
top
:
c
.
pageY
};
if
(
!
(
d
.
abs
(
g
.
left
-
s
.
left
)
<
f
.
deviation
&&
d
.
abs
(
g
.
top
-
s
.
top
)
<
f
.
deviation
)){
if
(
null
==
n
){
var
h
=
o
.
css
(
"
position
"
);
"
absolute
"
!=
h
&&
"
relative
"
!=
h
&&
"
fixed
"
!=
h
&&
(
k
=
h
,
o
.
css
(
"
position
"
,
"
relative
"
)),
n
=
b
.
clone
().
removeClass
(
"
drag-from
"
).
addClass
(
"
drag-shadow
"
).
css
({
position
:
"
absolute
"
,
width
:
b
.
outerWidth
(),
transition
:
"
none
"
}).
appendTo
(
o
),
b
.
addClass
(
"
dragging
"
),
e
.
callEvent
(
"
start
"
,{
event
:
c
,
element
:
b
})}
var
i
=
{
left
:
g
.
left
-
u
.
left
,
top
:
g
.
top
-
u
.
top
},
j
=
{
left
:
i
.
left
-
t
.
left
,
top
:
i
.
top
-
t
.
top
};
n
.
css
(
j
);{({
left
:
g
.
left
-
v
.
left
,
top
:
g
.
top
-
v
.
top
})}
v
.
left
=
g
.
left
,
v
.
top
=
g
.
top
;
var
r
=!
1
;
p
=!
1
,
f
.
flex
||
l
.
removeClass
(
"
drop-to
"
);
var
w
=
null
;
if
(
l
.
each
(
function
(){
var
b
=
a
(
this
),
c
=
b
.
offset
(),
d
=
b
.
width
(),
e
=
b
.
height
(),
h
=
c
.
left
+
f
.
sensorOffsetX
,
i
=
c
.
top
+
f
.
sensorOffsetY
;
return
g
.
left
>
h
&&
g
.
top
>
i
&&
g
.
left
<
h
+
d
&&
g
.
top
<
i
+
e
&&
(
w
&&
w
.
removeClass
(
"
drop-to
"
),
w
=
b
,
!
f
.
nested
)?
!
1
:
void
0
}),
w
){
p
=!
0
;
var
x
=
w
.
data
(
"
id
"
);
b
.
data
(
"
id
"
)
!=
x
&&
(
q
=!
1
),(
null
==
m
||
m
.
data
(
"
id
"
)
!=
x
&&!
q
)
&&
(
r
=!
0
),
m
=
w
,
f
.
flex
&&
l
.
removeClass
(
"
drop-to
"
),
m
.
addClass
(
"
drop-to
"
)}
f
.
flex
?
null
!=
m
&&
m
.
length
&&
(
p
=!
0
):(
b
.
toggleClass
(
"
drop-in
"
,
p
),
n
.
toggleClass
(
"
drop-in
"
,
p
)),
e
.
callEvent
(
"
drag
"
,{
event
:
c
,
isIn
:
p
,
target
:
m
,
element
:
b
,
isNew
:
r
,
selfTarget
:
q
,
clickOffset
:
u
,
offset
:
i
,
position
:{
left
:
i
.
left
-
t
.
left
,
top
:
i
.
top
-
t
.
top
},
mouseOffset
:
g
})}}
function
i
(
d
){
if
(
k
&&
o
.
css
(
"
position
"
,
k
),
null
==
n
)
return
b
.
removeClass
(
"
drag-from
"
),
void
a
(
c
).
unbind
(
"
mousemove
"
,
h
).
unbind
(
"
mouseup
"
,
i
);
p
||
(
m
=
null
);
var
f
=!
0
,
g
=
{
left
:
d
.
pageX
,
top
:
d
.
pageY
},
j
=
{
left
:
g
.
left
-
u
.
left
,
top
:
g
.
top
-
u
.
top
},
r
=
{
left
:
g
.
left
-
v
.
left
,
top
:
g
.
top
-
v
.
top
};
v
.
left
=
g
.
left
,
v
.
top
=
g
.
top
;
var
s
=
{
event
:
d
,
isIn
:
p
,
target
:
m
,
element
:
b
,
isNew
:
!
q
&&
null
!=
m
,
selfTarget
:
q
,
offset
:
j
,
mouseOffset
:
g
,
position
:{
left
:
j
.
left
-
t
.
left
,
top
:
j
.
top
-
t
.
top
},
lastMouseOffset
:
v
,
moveOffset
:
r
};
f
=
e
.
callEvent
(
"
beforeDrop
"
,
s
),
f
&&
p
&&
e
.
callEvent
(
"
drop
"
,
s
),
a
(
c
).
unbind
(
"
mousemove
"
,
h
).
unbind
(
"
mouseup
"
,
i
),
l
.
removeClass
(
"
drop-to
"
),
b
.
removeClass
(
"
dragging
"
).
removeClass
(
"
drag-from
"
),
n
.
remove
(),
e
.
callEvent
(
"
finish
"
,
s
),
d
.
preventDefault
()}
if
(
f
.
hasOwnProperty
(
"
before
"
)
&&
a
.
isFunction
(
f
.
before
)){
var
j
=
f
.
before
({
event
:
g
,
element
:
b
});
if
(
void
0
!=
j
&&!
j
)
return
}
var
k
,
l
=
a
.
isFunction
(
f
.
target
)?
f
.
target
(
b
):
a
(
f
.
target
),
m
=
null
,
n
=
null
,
o
=
a
(
f
.
container
).
first
(),
p
=!
1
,
q
=!
0
,
r
=
b
.
offset
(),
s
=
{
left
:
g
.
pageX
,
top
:
g
.
pageY
},
t
=
o
.
offset
(),
u
=
({
left
:
r
.
left
-
t
.
left
,
top
:
r
.
top
-
t
.
top
},{
left
:
s
.
left
-
r
.
left
,
top
:
s
.
top
-
r
.
top
}),
v
=
{
left
:
s
.
left
,
top
:
s
.
top
};
b
.
addClass
(
"
drag-from
"
),
a
(
c
).
bind
(
"
mousemove
"
,
h
).
bind
(
"
mouseup
"
,
i
),
g
.
preventDefault
()})},
e
.
prototype
.
reset
=
function
(){
this
.
$triggerTarget
.
off
(
"
mousedown
"
),
this
.
handleMouseEvents
()},
a
.
fn
.
droppable
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.droppable
"
),
f
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.droppable
"
,
d
=
new
e
(
this
,
f
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
.
fn
.
droppable
.
Constructor
=
e
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
b
.
DEFAULTS
=
{
list
:
"
li, div
"
,
dragCssClass
:
"
invisible
"
},
b
.
prototype
.
getOptions
=
function
(
c
){
return
c
=
a
.
extend
({},
b
.
DEFAULTS
,
this
.
$
.
data
(),
c
)},
b
.
prototype
.
init
=
function
(){
this
.
bindEventToList
(
this
.
$
.
children
(
this
.
options
.
selector
))},
b
.
prototype
.
reset
=
function
(){
var
b
=
this
,
c
=
0
,
d
=
this
.
$
.
children
(
this
.
options
.
selector
);
d
.
each
(
function
(){
var
e
=
a
(
this
);
e
.
data
(
"
zui.droppable
"
)?(
e
.
data
(
"
zui.droppable
"
).
options
.
target
=
d
,
e
.
droppable
(
"
reset
"
)):
b
.
bindEventToList
(
e
),
a
(
this
).
attr
(
"
data-order
"
,
++
c
)})},
b
.
prototype
.
bindEventToList
=
function
(
b
){
function
c
(
b
){
var
c
=
0
;
b
.
each
(
function
(){
a
(
this
).
attr
(
"
data-order
"
,
++
c
)})}
var
d
=
this
.
$
,
e
=
this
.
options
;
c
(
b
),
b
.
droppable
({
trigger
:
e
.
trigger
,
target
:
d
.
children
(
e
.
selector
),
container
:
d
,
flex
:
!
0
,
start
:
function
(
a
){
e
.
dragCssClass
&&
a
.
element
.
addClass
(
e
.
dragCssClass
)},
drag
:
function
(
b
){
if
(
b
.
isIn
){
var
f
=
b
.
element
,
g
=
b
.
target
,
h
=
f
.
attr
(
"
data-order
"
),
i
=
g
.
attr
(
"
data-order
"
);
if
(
h
==
i
)
return
;
h
>
i
?
g
.
before
(
f
):
g
.
after
(
f
);
var
j
=
d
.
children
(
e
.
selector
);
c
(
j
),
a
.
callEvent
(
e
.
order
,{
list
:
j
,
element
:
f
})}},
finish
:
function
(
b
){
e
.
dragCssClass
&&
b
.
element
.
removeClass
(
e
.
dragCssClass
),
a
.
callEvent
(
e
.
finish
,{
list
:
d
.
children
(
e
.
selector
),
element
:
b
.
element
})}})},
a
.
fn
.
sortable
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
zui.sortable
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
?
"
object
"
==
typeof
c
&&
e
.
reset
():
d
.
data
(
"
zui.sortable
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
sortable
.
Constructor
=
b
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
function
e
(
b
){
var
c
=
b
.
data
(
"
url
"
);
c
&&
(
b
.
addClass
(
"
panel-loading
"
).
find
(
"
.panel-heading .icon-refresh,.panel-heading .icon-repeat
"
).
addClass
(
"
icon-spin
"
),
a
.
ajax
({
url
:
c
,
dataType
:
"
html
"
}).
done
(
function
(
a
){
b
.
find
(
"
.panel-body
"
).
html
(
a
)}).
fail
(
function
(){
b
.
addClass
(
"
panel-error
"
)}).
always
(
function
(){
b
.
removeClass
(
"
panel-loading
"
),
b
.
find
(
"
.panel-heading .icon-refresh,.panel-heading .icon-repeat
"
).
removeClass
(
"
icon-spin
"
)}))}
var
f
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
draggable
=
this
.
$
.
hasClass
(
"
dashboard-draggable
"
)
||
this
.
options
.
draggable
,
this
.
init
()};
f
.
DEFAULTS
=
{
height
:
360
},
f
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
f
.
DEFAULTS
,
this
.
$
.
data
(),
b
)},
f
.
prototype
.
handleRemoveEvent
=
function
(){
var
b
=
this
.
options
.
afterPanelRemoved
,
c
=
this
.
options
.
panelRemovingTip
;
this
.
$
.
find
(
"
.remove-panel
"
).
click
(
function
(){
var
d
=
a
(
this
).
closest
(
"
.panel
"
),
e
=
d
.
data
(
"
name
"
)
||
d
.
find
(
"
.panel-heading
"
).
text
().
replace
(
"
\n
"
,
""
).
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
""
),
f
=
d
.
attr
(
"
data-id
"
);(
void
0
==
c
||
confirm
(
c
.
format
(
e
)))
&&
(
d
.
parent
().
remove
(),
b
&&
a
.
isFunction
(
b
)
&&
b
(
f
))})},
f
.
prototype
.
handleRefreshEvent
=
function
(){
this
.
$
.
find
(
"
.refresh-panel
"
).
click
(
function
(){
var
b
=
a
(
this
).
closest
(
"
.panel
"
);
e
(
b
)})},
f
.
prototype
.
handleDraggable
=
function
(){
var
b
=
this
.
$
,
d
=
this
.
options
.
afterOrdered
;
this
.
$
.
addClass
(
"
dashboard-draggable
"
),
this
.
$
.
find
(
"
.panel-actions
"
).
mousedown
(
function
(
a
){
a
.
preventDefault
(),
a
.
stopPropagation
()}),
this
.
$
.
find
(
"
.panel-heading
"
).
mousedown
(
function
(
e
){
function
f
(
c
){
var
d
=
k
.
data
(
"
mouseOffset
"
);
k
.
css
({
left
:
c
.
pageX
-
d
.
x
,
top
:
c
.
pageY
-
d
.
y
}),
j
.
find
(
"
.dragging-in
"
).
removeClass
(
"
dragging-in
"
);
var
e
=!
1
;
j
.
children
().
each
(
function
(){
var
d
=
a
(
this
);
if
(
d
.
hasClass
(
"
dragging-col-holder
"
))
return
e
=!
0
,
!
0
;
var
f
=
d
.
children
(
"
.panel
"
),
g
=
f
.
offset
(),
h
=
f
.
width
(),
i
=
f
.
height
(),
k
=
g
.
left
,
l
=
g
.
top
,
m
=
c
.
pageX
,
o
=
c
.
pageY
;
if
(
m
>
k
&&
o
>
l
&&
k
+
h
>
m
&&
l
+
i
>
o
){{
j
.
find
(
"
.dragging-col
"
)}
return
d
.
addClass
(
"
dragging-in
"
),
e
?
n
.
insertAfter
(
d
):
n
.
insertBefore
(
d
),
b
.
addClass
(
"
dashboard-holding
"
),
!
1
}}),
c
.
preventDefault
()}
function
g
(
e
){
var
i
=
h
.
data
(
"
order
"
);
h
.
parent
().
insertAfter
(
n
);
var
l
=
0
,
m
=
{};
j
.
children
(
"
:not(.dragging-col-holder)
"
).
each
(
function
(){
var
b
=
a
(
this
).
children
(
"
.panel
"
);
b
.
data
(
"
order
"
,
++
l
),
m
[
b
.
attr
(
"
id
"
)]
=
l
,
b
.
parent
().
attr
(
"
data-order
"
,
l
)}),
i
!=
m
[
h
.
attr
(
"
id
"
)]
&&
(
j
.
data
(
"
orders
"
,
m
),
d
&&
a
.
isFunction
(
d
)
&&
d
(
m
)),
k
.
remove
(),
b
.
removeClass
(
"
dashboard-holding
"
),
b
.
find
(
"
.dragging-col
"
).
removeClass
(
"
dragging-col
"
),
b
.
find
(
"
.panel-dragging
"
).
removeClass
(
"
panel-dragging
"
),
j
.
find
(
"
.dragging-in
"
).
removeClass
(
"
dragging-in
"
),
b
.
removeClass
(
"
dashboard-dragging
"
),
a
(
c
).
unbind
(
"
mousemove
"
,
f
).
unbind
(
"
mouseup
"
,
g
),
e
.
preventDefault
()}
var
h
=
a
(
this
).
closest
(
"
.panel
"
),
i
=
h
.
parent
(),
j
=
h
.
closest
(
"
.row
"
),
k
=
h
.
clone
().
addClass
(
"
panel-dragging-shadow
"
),
l
=
h
.
offset
(),
m
=
b
.
offset
(),
n
=
j
.
find
(
"
.dragging-col-holder
"
);
n
.
length
||
(
n
=
a
(
"
<div class='dragging-col-holder'><div class='panel'></div></div>
"
).
addClass
(
j
.
children
().
attr
(
"
class
"
)).
removeClass
(
"
dragging-col
"
).
appendTo
(
j
)),
n
.
insertBefore
(
i
).
find
(
"
.panel
"
).
replaceWith
(
h
.
clone
().
addClass
(
"
panel-dragging panel-dragging-holder
"
)),
b
.
addClass
(
"
dashboard-dragging
"
),
h
.
addClass
(
"
panel-dragging
"
).
parent
().
addClass
(
"
dragging-col
"
),
k
.
css
({
left
:
l
.
left
-
m
.
left
,
top
:
l
.
top
-
m
.
top
,
width
:
h
.
width
(),
height
:
h
.
height
()}).
appendTo
(
b
).
data
(
"
mouseOffset
"
,{
x
:
e
.
pageX
-
l
.
left
+
m
.
left
,
y
:
e
.
pageY
-
l
.
top
+
m
.
top
}),
a
(
c
).
bind
(
"
mousemove
"
,
f
).
bind
(
"
mouseup
"
,
g
),
e
.
preventDefault
()})},
f
.
prototype
.
handlePanelPadding
=
function
(){
this
.
$
.
find
(
"
.panel-body > table, .panel-body > .list-group
"
).
closest
(
"
.panel-body
"
).
addClass
(
"
no-padding
"
)},
f
.
prototype
.
handlePanelHeight
=
function
(){
var
b
=
this
.
options
.
height
;
this
.
$
.
find
(
"
.row
"
).
each
(
function
(){
var
c
=
a
(
this
),
e
=
c
.
find
(
"
.panel
"
),
f
=
c
.
data
(
"
height
"
)
||
b
;
"
number
"
!=
typeof
f
&&
(
f
=
0
,
e
.
each
(
function
(){
f
=
d
.
max
(
f
,
a
(
this
).
innerHeight
())})),
e
.
each
(
function
(){
var
b
=
a
(
this
);
b
.
find
(
"
.panel-body
"
).
css
(
"
height
"
,
f
-
b
.
find
(
"
.panel-heading
"
).
outerHeight
()
-
2
)})})},
f
.
prototype
.
init
=
function
(){
this
.
handlePanelHeight
(),
this
.
handlePanelPadding
(),
this
.
handleRemoveEvent
(),
this
.
handleRefreshEvent
(),
this
.
draggable
&&
this
.
handleDraggable
();
var
b
=
0
;
this
.
$
.
find
(
"
.panel
"
).
each
(
function
(){
var
c
=
a
(
this
);
c
.
data
(
"
order
"
,
++
b
),
c
.
attr
(
"
id
"
)
||
c
.
attr
(
"
id
"
,
"
panel
"
+
b
),
c
.
attr
(
"
data-id
"
)
||
c
.
attr
(
"
data-id
"
,
b
),
e
(
c
)})},
a
.
fn
.
dashboard
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.dashboard
"
),
e
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.dashboard
"
,
d
=
new
f
(
this
,
e
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
.
fn
.
dashboard
.
Constructor
=
f
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
b
.
DEFAULTS
=
{
auto
:
!
1
,
foldicon
:
"
icon-chevron-right
"
},
b
.
prototype
.
getOptions
=
function
(
c
){
return
c
=
a
.
extend
({},
b
.
DEFAULTS
,
this
.
$
.
data
(),
c
)},
b
.
prototype
.
init
=
function
(){
var
a
=
this
.
$
.
children
(
"
.nav
"
);
a
.
find
(
"
.nav
"
).
closest
(
"
li
"
).
addClass
(
"
nav-parent
"
),
a
.
find
(
"
.nav > li.active
"
).
closest
(
"
li
"
).
addClass
(
"
active
"
),
a
.
find
(
"
.nav-parent > a
"
).
append
(
'
<i class="
'
+
this
.
options
.
foldicon
+
'
nav-parent-fold-icon"></i>
'
),
this
.
handleFold
()},
b
.
prototype
.
handleFold
=
function
(){
var
b
=
this
.
options
.
auto
,
c
=
this
.
$
;
this
.
$
.
find
(
"
.nav-parent > a
"
).
click
(
function
(
d
){
b
&&
(
c
.
find
(
"
.nav-parent.show
"
).
find
(
"
.nav
"
).
slideUp
(
function
(){
a
(
this
).
closest
(
"
.nav-parent
"
).
removeClass
(
"
show
"
)}),
c
.
find
(
"
.icon-rotate-90
"
).
removeClass
(
"
icon-rotate-90
"
));
var
e
=
a
(
this
).
closest
(
"
.nav-parent
"
);
return
e
.
hasClass
(
"
show
"
)?(
e
.
find
(
"
.icon-rotate-90
"
).
removeClass
(
"
icon-rotate-90
"
),
e
.
find
(
"
.nav
"
).
slideUp
(
function
(){
a
(
this
).
closest
(
"
.nav-parent
"
).
removeClass
(
"
show
"
)})):(
e
.
find
(
"
.nav-parent-fold-icon
"
).
addClass
(
"
icon-rotate-90
"
),
e
.
find
(
"
.nav
"
).
slideDown
(
function
(){
a
(
this
).
closest
(
"
.nav-parent
"
).
addClass
(
"
show
"
)})),
d
.
preventDefault
(),
!
1
})},
a
.
fn
.
menu
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
zui.menu
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
zui.menu
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
menu
.
Constructor
=
b
,
a
(
function
(){
a
(
'
[data-toggle="menu"]
'
).
menu
()})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
var
e
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
isTable
=
"
TABLE
"
===
this
.
$
[
0
].
tagName
,
this
.
isTable
?
this
.
id
=
"
datatable-
"
+
(
this
.
$
.
attr
(
"
id
"
)
||
a
.
uuid
()):(
this
.
$datatable
=
this
.
$
.
addClass
(
"
datatable
"
),
this
.
$
.
attr
(
"
id
"
)?
this
.
id
=
this
.
$
.
attr
(
"
id
"
):(
this
.
id
=
"
datatable-
"
+
a
.
uuid
(),
this
.
$
.
attr
(
"
id
"
,
this
.
id
))),
this
.
getOptions
(
c
),
this
.
load
(),
this
.
render
()};
e
.
DEFAULTS
=
{
fixedHeader
:
!
0
,
checkable
:
!
0
,
checkByClickRow
:
!
0
,
checkSingleByClickRow
:
!
0
,
sortable
:
!
0
,
fixedLeftWidth
:
"
30%
"
,
fixedRightWidth
:
"
30%
"
,
flexWidth
:
"
auto
"
,
flexHeadDrag
:
!
0
,
rowHover
:
!
0
,
colHover
:
!
0
,
checkedClass
:
"
active
"
},
e
.
prototype
.
getOptions
=
function
(
b
){
var
c
=
this
.
$
,
b
=
a
.
extend
({},
e
.
DEFAULTS
,
this
.
$
.
data
(),
b
);
b
.
tableClass
||
(
b
.
tableClass
=
""
,
c
.
hasClass
(
"
table-bordered
"
)
&&
(
b
.
tableClass
+=
"
table-bordered
"
),(
c
.
hasClass
(
"
table-hover
"
)
||
b
.
rowHover
)
&&
(
b
.
tableClass
+=
"
table-hover
"
),
c
.
hasClass
(
"
table-striped
"
)
&&
(
b
.
tableClass
+=
"
table-striped
"
)),
this
.
options
=
b
},
e
.
prototype
.
load
=
function
(){
var
b
=
this
.
options
.
data
,
c
=
this
.
options
,
d
=
this
.
$
;
if
(
!
b
){
if
(
!
this
.
isTable
)
throw
new
Error
(
"
No data avaliable!
"
);
b
=
{
cols
:[],
rows
:[]};
var
e
,
f
,
g
,
h
,
i
=
b
.
cols
,
j
=
b
.
rows
;
d
.
find
(
"
thead > tr:first
"
).
children
(
"
th
"
).
each
(
function
(){
e
=
a
(
this
),
i
.
push
(
a
.
extend
({
text
:
e
.
html
(),
flex
:
!
1
||
e
.
hasClass
(
"
flex-col
"
),
width
:
"
auto
"
,
cssClass
:
e
.
attr
(
"
class
"
),
css
:
e
.
attr
(
"
style
"
),
type
:
"
string
"
,
sort
:
!
e
.
hasClass
(
"
sort-disabled
"
)},
e
.
data
()))}),
d
.
find
(
"
tbody > tr
"
).
each
(
function
(){
f
=
a
(
this
),
h
=
a
.
extend
({
data
:[],
checked
:
!
1
,
cssClass
:
f
.
attr
(
"
class
"
),
css
:
f
.
attr
(
"
style
"
),
id
:
f
.
attr
(
"
id
"
)},
f
.
data
()),
f
.
children
(
"
td
"
).
each
(
function
(){
g
=
a
(
this
),
h
.
data
.
push
(
a
.
extend
({
cssClass
:
g
.
attr
(
"
class
"
),
css
:
g
.
attr
(
"
style
"
),
text
:
g
.
html
()},
g
.
data
()))}),
j
.
push
(
h
)})}
b
.
flexStart
=-
1
,
b
.
flexEnd
=-
1
;
var
i
=
b
.
cols
;
b
.
colsLength
=
i
.
length
;
for
(
var
k
=
0
;
k
<
i
.
length
;
++
k
){
var
l
=
i
[
k
];
l
.
flex
&&
(
b
.
flexStart
<
0
&&
(
b
.
flexStart
=
k
),
b
.
flexEnd
=
k
)}
if
(
0
===
b
.
flexStart
&&
b
.
flexEnd
===
i
.
length
&&
(
b
.
flexStart
=-
1
,
b
.
flexEnd
=-
1
),
b
.
flexArea
=
b
.
flexStart
>=
0
,
b
.
fixedRight
=
b
.
flexEnd
>=
0
&&
b
.
flexEnd
<
i
.
length
,
b
.
fixedLeft
=
b
.
flexStart
>
0
,
b
.
flexStart
<
0
&&
b
.
flexEnd
<
0
&&
(
b
.
fixedLeft
=!
0
,
b
.
flexStart
=
i
.
length
,
b
.
flexEnd
=
i
.
length
),
b
.
flexArea
&&
(
void
0
==
typeof
c
.
flexWidth
||
"
auto
"
==
c
.
flexWidth
)){
for
(
var
m
=
0
,
k
=
b
.
flexStart
;
k
<=
b
.
flexEnd
;
++
k
)
i
[
k
].
flex
=!
0
,
m
+=
i
[
k
].
width
;
c
.
flexWidth
=
m
}
this
.
data
=
b
},
e
.
prototype
.
html
=
function
(){
var
b
=!
a
(
"
#
"
+
this
.
id
).
empty
().
length
,
c
=
""
,
d
=
this
.
options
,
e
=
this
.
data
,
f
=
this
.
data
.
cols
,
g
=
""
,
h
=
""
,
i
=
""
,
j
=
this
.
data
.
rows
,
k
=
'
<div class="datatable-rows-span datatable-span {0}"><table class="table
'
+
d
.
tableClass
+
'
"><tbody>{1}</tbody></table>{2}</div>
'
,
l
=
'
<div class="datatable-head-span datatable-span {0}"><table class="table
'
+
d
.
tableClass
+
'
"><thead><tr>{1}</tr></thead></table>{2}</div>
'
;
b
?
c
+=
'
<div class="datatable
'
+
(
d
.
sortable
?
"
sortable
"
:
""
)
+
'
" id="
'
+
this
.
id
+
'
">
'
:
d
.
sortable
&&
this
.
$datatable
.
addClass
(
"
sortable
"
),
c
+=
'
<div class="datatable-head">
'
;
for
(
var
m
,
n
,
o
,
p
=
0
;
p
<
f
.
length
;
++
p
)
n
=
f
[
p
],
o
=
""
,
"
undefined
"
==
typeof
n
.
sort
?
n
.
sort
=!
0
:
"
down
"
===
n
.
sort
?
o
=
"
sort-down
"
:
"
up
"
===
n
.
sort
?
o
=
"
sort-up
"
:
n
.
sort
===!
1
&&
(
o
=
"
sort-disabled
"
),
m
=
'
<th class="
'
+
(
n
.
cssClass
||
""
)
+
"
"
+
(
n
.
colClass
||
""
)
+
"
"
+
o
+
'
" data-index="
'
+
p
+
'
" data-type="
'
+
n
.
type
+
'
" style="
'
+
n
.
css
+
'
">
'
+
n
.
text
+
"
</th>
"
,
0
==
p
&&
d
.
checkable
&&
(
m
=
'
<th data-index="check" class="check-all check-btn"><i class="icon-check-empty"></i></th>
'
+
m
),
p
<
e
.
flexStart
?
g
+=
m
:
p
>=
e
.
flexStart
&&
p
<=
e
.
flexEnd
?
i
+=
m
:
p
>
e
.
flexEnd
&&
(
h
+=
m
);
e
.
fixedLeft
&&
(
c
+=
l
.
format
(
"
fixed-left
"
,
g
,
""
)),
e
.
flexArea
&&
(
c
+=
l
.
format
(
"
flexarea
"
,
i
,
'
<div class="scrolled-shadow scrolled-in-shadow"></div><div class="scrolled-shadow scrolled-out-shadow"></div>
'
)),
e
.
fixedRight
&&
(
c
+=
l
.
format
(
"
fixed-right
"
,
h
,
""
)),
c
+=
"
</div>
"
,
c
+=
'
<div class="datatable-rows">
'
;
var
q
,
r
,
p
,
s
,
t
,
u
;
g
=
""
,
h
=
""
,
i
=
""
;
for
(
var
v
=
0
;
v
<
j
.
length
;
++
v
){
for
(
r
=
j
[
v
],
t
=
r
.
cssClass
||
""
,
r
.
checked
&&
(
t
+=
"
"
+
(
d
.
checkedClass
||
""
)),
"
undefined
"
==
typeof
r
.
id
&&
(
r
.
id
=
v
),
r
.
index
=
v
,
q
=
'
<tr class="
'
+
t
+
'
" data-index="
'
+
v
+
'
" data-id="
'
+
r
.
id
+
'
">
'
,
g
+=
q
,
h
+=
q
,
i
+=
q
,
p
=
0
;
p
<
r
.
data
.
length
;
++
p
)
u
=
r
.
data
[
p
],
a
.
isPlainObject
(
u
)
||
(
u
=
{
text
:
u
},
r
.
data
[
p
]
=
u
),
s
=
'
<td data-index="
'
+
p
+
'
" data-flex="false" data-type="
'
+
f
[
p
].
type
+
'
" class="
'
+
(
u
.
cssClass
||
""
)
+
"
"
+
(
f
[
p
].
colClass
||
""
)
+
'
" style="
'
+
(
u
.
css
||
""
)
+
'
">
'
+
u
.
text
+
"
</td>
"
,
0
==
p
&&
d
.
checkable
&&
(
s
=
'
<td data-index="check" class="check-row check-btn"><i class="icon-check-empty"></i></td>
'
+
s
),
p
<
e
.
flexStart
?
g
+=
s
:
p
>=
e
.
flexStart
&&
p
<=
e
.
flexEnd
?
i
+=
s
:
p
>
e
.
flexEnd
&&
(
h
+=
s
);
g
+=
"
</tr>
"
,
h
+=
"
</tr>
"
,
i
+=
"
</tr>
"
}
return
e
.
fixedLeft
&&
(
c
+=
k
.
format
(
"
fixed-left
"
,
g
,
""
)),
e
.
flexArea
&&
(
c
+=
k
.
format
(
"
flexarea
"
,
i
,
'
<div class="scrolled-shadow scrolled-in-shadow"></div><div class="scrolled-shadow scrolled-out-shadow"></div><div class="scroll-slide"><div class="bar"></div></div>
'
)),
e
.
fixedRight
&&
(
c
+=
k
.
format
(
"
fixed-right
"
,
h
,
""
)),
c
+=
"
</div>
"
,
b
&&
(
c
+=
"
</div>
"
),
c
},
e
.
prototype
.
render
=
function
(){
this
.
isTable
?(
this
.
$
.
attr
(
"
data-datatable-id
"
,
this
.
id
).
hide
(),
this
.
$
.
after
(
this
.
html
()),
this
.
$datatable
=
a
(
"
#
"
+
this
.
id
)):
this
.
$
.
html
(
this
.
html
()),
this
.
$dataSpans
=
this
.
$datatable
.
children
(
"
.datatable-head, .datatable-rows
"
).
find
(
"
.datatable-span
"
),
this
.
$rowsSpans
=
this
.
$datatable
.
children
(
"
.datatable-rows
"
).
children
(
"
.datatable-rows-span
"
),
this
.
$headSpans
=
this
.
$datatable
.
children
(
"
.datatable-head
"
).
children
(
"
.datatable-head-span
"
),
this
.
$cells
=
this
.
$dataSpans
.
find
(
"
td, th
"
),
this
.
$dataCells
=
this
.
$cells
.
filter
(
"
td
"
),
this
.
$headCells
=
this
.
$cells
.
filter
(
"
th
"
),
this
.
$rows
=
this
.
$rowsSpans
.
find
(
"
.table > tbody > tr
"
);
var
c
=
this
.
options
,
e
=
this
,
f
=
this
.
data
,
g
=
this
.
$cells
,
h
=
this
.
$dataCells
,
i
=
this
.
$headCells
,
j
=
this
.
$datatable
;
if
(
c
.
rowHover
){
var
k
=
"
hover
"
;
this
.
$rowsSpans
.
on
(
"
mouseenter
"
,
"
td
"
,
function
(){
h
.
filter
(
"
.
"
+
k
).
removeClass
(
k
),
e
.
$rows
.
filter
(
"
.
"
+
k
).
removeClass
(
k
),
e
.
$rows
.
filter
(
'
[data-index="
'
+
a
(
this
).
addClass
(
k
).
closest
(
"
tr
"
).
data
(
"
index
"
)
+
'
"]
'
).
addClass
(
k
)
}).
on
(
"
mouseleave
"
,
"
td
"
,
function
(){
h
.
filter
(
"
.
"
+
k
).
removeClass
(
k
),
e
.
$rows
.
filter
(
"
.
"
+
k
).
removeClass
(
k
)})}
if
(
c
.
colHover
){
var
l
=
"
col-hover
"
;
this
.
$headSpans
.
on
(
"
mouseenter
"
,
"
th
"
,
function
(){
g
.
filter
(
"
.
"
+
l
).
removeClass
(
l
),
g
.
filter
(
'
[data-index="
'
+
a
(
this
).
data
(
"
index
"
)
+
'
"]
'
).
addClass
(
l
)}).
on
(
"
mouseleave
"
,
"
th
"
,
function
(){
g
.
filter
(
"
.
"
+
l
).
removeClass
(
l
)})}
if
(
this
.
data
.
flexArea
){
var
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
=
j
.
find
(
"
.scroll-slide
"
),
u
=
j
.
find
(
"
.datatable-span.flexarea > .table
"
),
v
=
j
.
find
(
"
.datatable-rows-span.flexarea > .table
"
),
w
=
t
.
children
(
"
.bar
"
),
x
=
e
.
id
+
"
_scrollOffset
"
,
y
=
function
(
a
,
b
){
q
=
d
.
max
(
0
,
d
.
min
(
m
-
n
,
a
)),
p
!==
q
&&
(
b
||
j
.
addClass
(
"
scrolling
"
),
w
.
css
(
"
left
"
,
q
),
s
=
0
-
d
.
floor
((
o
-
m
)
*
q
/
(
m
-
n
)),
u
.
css
(
"
left
"
,
s
),
p
=
q
,
j
.
toggleClass
(
"
scrolled-in
"
,
q
>
2
).
toggleClass
(
"
scrolled-out
"
,
m
-
n
-
2
>
q
),
store
.
pageSet
(
x
,
q
))},
z
=
function
(){
m
=
t
.
width
(),
o
=
v
.
width
(),
n
=
d
.
floor
(
m
*
m
/
o
),
w
.
css
(
"
width
"
,
n
),
v
.
css
(
"
min-width
"
,
m
),
j
.
toggleClass
(
"
show-scroll-slide
"
,
o
>
m
),
r
||
m
===
n
||
(
r
=!
0
,
y
(
store
.
pageGet
(
x
,
0
),
!
0
))};
t
.
resize
(
z
),
v
.
resize
(
z
),
z
();
var
A
=
{
move
:
!
1
,
stopPropagation
:
!
0
,
drag
:
function
(
a
){
y
(
w
.
position
().
left
+
a
.
smallOffset
.
x
*
(
a
.
element
.
hasClass
(
"
bar
"
)?
1
:
-
1
))},
finish
:
function
(){
j
.
removeClass
(
"
scrolling
"
)}};
w
.
draggable
(
A
),
c
.
flexHeadDrag
&&
j
.
find
(
"
.datatable-head-span.flexarea
"
).
draggable
(
A
),
t
.
mousedown
(
function
(
a
){
var
b
=
a
.
pageX
-
t
.
offset
().
left
;
y
(
b
-
n
/
2
)})}
if
(
c
.
checkable
){
var
B
,
C
=
e
.
id
+
"
_
"
+
F
,
D
=
c
.
checkedClass
,
E
=
function
(){
var
b
=
e
.
$rowsSpans
.
first
().
find
(
"
.table > tbody > tr
"
),
c
=
b
.
filter
(
"
.
"
+
D
),
d
=
{
checkedAll
:
b
.
length
===
c
.
length
&&
c
.
length
>
0
,
checks
:
c
.
map
(
function
(){
return
B
=
a
(
this
).
data
(
"
id
"
)}).
toArray
()};
a
.
each
(
f
.
rows
,
function
(
b
,
c
){
c
.
checked
=
a
.
inArray
(
c
.
id
,
d
.
checks
)
>-
1
}),
e
.
$headSpans
.
find
(
"
.check-all
"
).
toggleClass
(
"
checked
"
,
d
.
checkedAll
),
store
.
pageSet
(
C
,
d
)};
this
.
$rowsSpans
.
on
(
"
click
"
,
c
.
checkByClickRow
?
"
tr
"
:
"
.check-row
"
,
function
(){
e
.
$rows
.
filter
(
'
[data-index="
'
+
a
(
this
).
closest
(
"
tr
"
).
data
(
"
index
"
)
+
'
"]
'
).
toggleClass
(
D
),
E
()}),
this
.
$headSpans
.
find
(
"
.check-all
"
).
click
(
function
(){
e
.
$rows
.
toggleClass
(
D
,
a
(
this
).
toggleClass
(
"
checked
"
).
hasClass
(
"
checked
"
)),
E
()});
var
F
=
store
.
pageGet
(
C
);
F
&&
(
this
.
$headSpans
.
find
(
"
.check-all
"
).
toggleClass
(
"
checked
"
,
F
.
checkedAll
),
F
.
checkedAll
?
e
.
$rows
.
addClass
(
D
):(
e
.
$rows
.
removeClass
(
D
),
a
.
each
(
F
.
checks
,
function
(
a
,
b
){
e
.
$rows
.
filter
(
'
[data-id="
'
+
b
+
'
"]
'
).
addClass
(
D
)})))}
if
(
c
.
fixedHeader
){
var
G
,
H
,
I
,
J
=
j
.
children
(
"
.datatable-head
"
),
K
=
c
.
fixedHeaderOffset
||
a
(
"
.navbar.navbar-fixed-top
"
).
height
()
||
0
,
L
=
function
(){
I
=
a
(
b
).
scrollTop
(),
G
=
j
.
offset
().
top
,
H
=
j
.
height
(),
j
.
toggleClass
(
"
head-fixed
"
,
I
>
G
&&
G
+
H
>
I
),
j
.
hasClass
(
"
head-fixed
"
)?
J
.
css
({
width
:
j
.
width
(),
top
:
K
}):
J
.
attr
(
"
style
"
,
""
)};
a
(
b
).
scroll
(
L
),
L
()}
if
(
c
.
sortable
){
var
M
,
N
;
this
.
$headSpans
.
on
(
"
click
"
,
"
th:not(.sort-disabled, .check-btn)
"
,
function
(){
M
=
a
(
this
),
N
=
M
.
hasClass
(
"
sort-down
"
),
i
.
removeClass
(
"
sort-up sort-down
"
),
M
.
addClass
(
N
?
"
sort-up
"
:
"
sort-down
"
),
e
.
sortTable
(
M
)})}
this
.
refresh
()},
e
.
prototype
.
sortTable
=
function
(
b
){
var
c
,
d
,
e
,
f
=
this
.
data
,
g
=
f
.
cols
,
h
=
f
.
rows
;
b
||
(
b
=
this
.
$headCells
.
find
(
"
.sort-up, .sort-down
"
).
first
()),
e
=
b
.
data
(
"
index
"
),
c
=
b
.
hasClass
(
"
sort-up
"
),
a
.
each
(
g
,
function
(
a
,
b
){
a
==
e
||
"
up
"
!==
b
.
sort
&&
"
down
"
!==
b
.
sort
?
a
==
e
&&
(
b
.
sort
=
c
?
"
up
"
:
"
down
"
,
d
=
b
.
type
):
b
.
sort
=!
0
});
var
i
,
j
,
k
;
h
.
sort
(
function
(
a
,
b
){
return
i
=
a
.
data
[
e
].
text
,
j
=
b
.
data
[
e
].
text
,
"
number
"
===
d
?(
i
=
parseFloat
(
i
),
j
=
parseFloat
(
j
)):
"
date
"
===
d
&&
(
i
=
Date
.
parse
(
i
),
j
=
Date
.
parse
(
j
)),
k
=
i
>
j
?
1
:
j
>
i
?
-
1
:
0
,
c
&&
(
k
=-
1
*
k
),
k
});
var
l
,
m
,
n
,
o
=
this
.
$rows
,
p
=
[];
a
.
each
(
h
,
function
(
b
,
c
){
l
=
o
.
filter
(
'
[data-index="
'
+
c
.
index
+
'
"]
'
),
l
.
each
(
function
(
b
){
n
=
a
(
this
),
m
=
p
[
b
],
m
?
m
.
after
(
n
):
n
.
parent
().
prepend
(
n
),
p
[
b
]
=
n
})})},
e
.
prototype
.
refresh
=
function
(){
var
a
=
this
.
$datatable
,
b
=
this
.
options
,
c
=
this
.
data
.
cols
;
a
.
find
(
"
.datatable-span.fixed-left
"
).
css
(
"
width
"
,
b
.
fixedLeftWidth
),
a
.
find
(
"
.datatable-span.fixed-right
"
).
css
(
"
width
"
,
b
.
fixedRightWidth
);
for
(
var
d
=
this
.
$cells
,
e
=
0
;
e
<
c
.
length
;
++
e
)
d
.
filter
(
'
[data-index="
'
+
e
+
'
"]
'
).
css
(
"
width
"
,
c
[
e
].
width
)},
a
.
fn
.
datatable
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.datatable
"
),
f
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.datatable
"
,
d
=
new
e
(
this
,
f
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
.
fn
.
datatable
.
Constructor
=
e
}(
jQuery
,
window
,
document
,
Math
),
function
(
a
,
b
){
"
use strict
"
;
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([
"
jquery
"
],
b
):
"
object
"
==
typeof
exports
?
module
.
exports
=
b
(
require
(
"
jquery
"
)):
a
.
bootbox
=
b
(
a
.
jQuery
)}(
this
,
function
a
(
b
,
c
){
"
use strict
"
;
function
d
(){
var
a
;
if
(
"
undefined
"
!=
typeof
config
&&
config
.
clientLang
)
a
=
config
.
clientLang
;
else
{
var
c
=
b
(
"
html
"
).
attr
(
"
lang
"
);
a
=
c
?
c
:
"
en
"
}
return
a
.
replace
(
"
-
"
,
"
_
"
).
toLowerCase
()}
function
e
(
a
){
var
b
=
r
[
p
.
locale
];
return
b
?
b
[
a
]:
r
.
en
[
a
]}
function
f
(
a
,
c
,
d
){
a
.
stopPropagation
(),
a
.
preventDefault
();
var
e
=
b
.
isFunction
(
d
)
&&
d
(
a
)
===!
1
;
e
||
c
.
modal
(
"
hide
"
)}
function
g
(
a
){
var
b
,
c
=
0
;
for
(
b
in
a
)
c
++
;
return
c
}
function
h
(
a
,
c
){
var
d
=
0
;
b
.
each
(
a
,
function
(
a
,
b
){
c
(
a
,
b
,
d
++
)})}
function
i
(
a
){
var
c
,
d
;
if
(
"
object
"
!=
typeof
a
)
throw
new
Error
(
"
Please supply an object of options
"
);
if
(
!
a
.
message
)
throw
new
Error
(
"
Please specify a message
"
);
return
a
=
b
.
extend
({},
p
,
a
),
a
.
buttons
||
(
a
.
buttons
=
{}),
a
.
backdrop
=
a
.
backdrop
?
"
static
"
:
!
1
,
c
=
a
.
buttons
,
d
=
g
(
c
),
h
(
c
,
function
(
a
,
e
){
if
(
b
.
isFunction
(
e
)
&&
(
e
=
c
[
a
]
=
{
callback
:
e
}),
"
object
"
!==
b
.
type
(
e
))
throw
new
Error
(
"
button with key
"
+
a
+
"
must be an object
"
);
e
.
label
||
(
e
.
label
=
a
),
e
.
className
||
(
e
.
className
=
1
==
d
||
d
>=
2
&&
"
confirm
"
===
a
?
"
btn-primary
"
:
"
btn-default
"
)}),
a
}
function
j
(
a
,
b
){
var
c
=
a
.
length
,
d
=
{};
if
(
1
>
c
||
c
>
2
)
throw
new
Error
(
"
Invalid argument length
"
);
return
2
===
c
||
"
string
"
==
typeof
a
[
0
]?(
d
[
b
[
0
]]
=
a
[
0
],
d
[
b
[
1
]]
=
a
[
1
]):
d
=
a
[
0
],
d
}
function
k
(
a
,
c
,
d
){
return
b
.
extend
(
!
0
,{},
a
,
j
(
c
,
d
))}
function
l
(
a
,
b
,
c
,
d
){
var
e
=
{
className
:
"
bootbox-
"
+
a
,
buttons
:
m
.
apply
(
null
,
b
)};
return
n
(
k
(
e
,
d
,
c
),
b
)}
function
m
(){
for
(
var
a
=
{},
b
=
0
,
c
=
arguments
.
length
;
c
>
b
;
b
++
){
var
d
=
arguments
[
b
],
f
=
d
.
toLowerCase
(),
g
=
d
.
toUpperCase
();
a
[
f
]
=
{
label
:
e
(
g
)}}
return
a
}
function
n
(
a
,
b
){
var
d
=
{};
return
h
(
b
,
function
(
a
,
b
){
d
[
b
]
=!
0
}),
h
(
a
.
buttons
,
function
(
a
){
if
(
d
[
a
]
===
c
)
throw
new
Error
(
"
button key
"
+
a
+
"
is not allowed (options are
"
+
b
.
join
(
"
\n
"
)
+
"
)
"
)}),
a
}
var
o
=
{
dialog
:
"
<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>
"
,
header
:
"
<div class='modal-header'><h4 class='modal-title'></h4></div>
"
,
footer
:
"
<div class='modal-footer'></div>
"
,
closeButton
:
"
<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>×</button>
"
,
form
:
"
<form class='bootbox-form'></form>
"
,
inputs
:{
text
:
"
<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />
"
,
textarea
:
"
<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>
"
,
email
:
"
<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />
"
,
select
:
"
<select class='bootbox-input bootbox-input-select form-control'></select>
"
,
checkbox
:
"
<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>
"
,
date
:
"
<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />
"
,
time
:
"
<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />
"
,
number
:
"
<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />
"
,
password
:
"
<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />
"
}},
p
=
{
locale
:
d
(),
backdrop
:
!
0
,
animate
:
!
0
,
className
:
null
,
closeButton
:
!
0
,
show
:
!
0
,
container
:
"
body
"
},
q
=
{};
q
.
alert
=
function
(){
var
a
;
if
(
a
=
l
(
"
alert
"
,[
"
ok
"
],[
"
message
"
,
"
callback
"
],
arguments
),
a
.
callback
&&!
b
.
isFunction
(
a
.
callback
))
throw
new
Error
(
"
alert requires callback property to be a function when provided
"
);
return
a
.
buttons
.
ok
.
callback
=
a
.
onEscape
=
function
(){
return
b
.
isFunction
(
a
.
callback
)?
a
.
callback
():
!
0
},
q
.
dialog
(
a
)},
q
.
confirm
=
function
(){
var
a
;
if
(
a
=
l
(
"
confirm
"
,[
"
confirm
"
,
"
cancel
"
],[
"
message
"
,
"
callback
"
],
arguments
),
a
.
buttons
.
cancel
.
callback
=
a
.
onEscape
=
function
(){
return
a
.
callback
(
!
1
)},
a
.
buttons
.
confirm
.
callback
=
function
(){
return
a
.
callback
(
!
0
)},
!
b
.
isFunction
(
a
.
callback
))
throw
new
Error
(
"
confirm requires a callback
"
);
return
q
.
dialog
(
a
)},
q
.
prompt
=
function
(){
var
a
,
d
,
e
,
f
,
g
,
i
,
j
;
f
=
b
(
o
.
form
),
d
=
{
className
:
"
bootbox-prompt
"
,
buttons
:
m
(
"
confirm
"
,
"
cancel
"
),
value
:
""
,
inputType
:
"
text
"
},
a
=
n
(
k
(
d
,
arguments
,[
"
title
"
,
"
callback
"
]),[
"
cancel
"
,
"
confirm
"
]),
i
=
a
.
show
===
c
?
!
0
:
a
.
show
;
var
l
=
[
"
date
"
,
"
time
"
,
"
number
"
],
p
=
document
.
createElement
(
"
input
"
);
if
(
p
.
setAttribute
(
"
type
"
,
a
.
inputType
),
l
[
a
.
inputType
]
&&
(
a
.
inputType
=
p
.
type
),
a
.
message
=
f
,
a
.
buttons
.
cancel
.
callback
=
a
.
onEscape
=
function
(){
return
a
.
callback
(
null
)},
a
.
buttons
.
confirm
.
callback
=
function
(){
var
c
;
switch
(
a
.
inputType
){
case
"
text
"
:
case
"
textarea
"
:
case
"
email
"
:
case
"
select
"
:
case
"
date
"
:
case
"
time
"
:
case
"
number
"
:
case
"
password
"
:
c
=
g
.
val
();
break
;
case
"
checkbox
"
:
var
d
=
g
.
find
(
"
input:checked
"
);
c
=
[],
h
(
d
,
function
(
a
,
d
){
c
.
push
(
b
(
d
).
val
())})}
return
a
.
callback
(
c
)},
a
.
show
=!
1
,
!
a
.
title
)
throw
new
Error
(
"
prompt requires a title
"
);
if
(
!
b
.
isFunction
(
a
.
callback
))
throw
new
Error
(
"
prompt requires a callback
"
);
if
(
!
o
.
inputs
[
a
.
inputType
])
throw
new
Error
(
"
invalid prompt type
"
);
switch
(
g
=
b
(
o
.
inputs
[
a
.
inputType
]),
a
.
inputType
){
case
"
text
"
:
case
"
textarea
"
:
case
"
email
"
:
case
"
date
"
:
case
"
time
"
:
case
"
number
"
:
case
"
password
"
:
g
.
val
(
a
.
value
);
break
;
case
"
select
"
:
var
r
=
{};
if
(
j
=
a
.
inputOptions
||
[],
!
j
.
length
)
throw
new
Error
(
"
prompt with select requires options
"
);
h
(
j
,
function
(
a
,
d
){
var
e
=
g
;
if
(
d
.
value
===
c
||
d
.
text
===
c
)
throw
new
Error
(
"
given options in wrong format
"
);
d
.
group
&&
(
r
[
d
.
group
]
||
(
r
[
d
.
group
]
=
b
(
"
<optgroup/>
"
).
attr
(
"
label
"
,
d
.
group
)),
e
=
r
[
d
.
group
]),
e
.
append
(
"
<option value='
"
+
d
.
value
+
"
'>
"
+
d
.
text
+
"
</option>
"
)}),
h
(
r
,
function
(
a
,
b
){
g
.
append
(
b
)}),
g
.
val
(
a
.
value
);
break
;
case
"
checkbox
"
:
var
s
=
b
.
isArray
(
a
.
value
)?
a
.
value
:[
a
.
value
];
if
(
j
=
a
.
inputOptions
||
[],
!
j
.
length
)
throw
new
Error
(
"
prompt with checkbox requires options
"
);
if
(
!
j
[
0
].
value
||!
j
[
0
].
text
)
throw
new
Error
(
"
given options in wrong format
"
);
g
=
b
(
"
<div/>
"
),
h
(
j
,
function
(
c
,
d
){
var
e
=
b
(
o
.
inputs
[
a
.
inputType
]);
e
.
find
(
"
input
"
).
attr
(
"
value
"
,
d
.
value
),
e
.
find
(
"
label
"
).
append
(
d
.
text
),
h
(
s
,
function
(
a
,
b
){
b
===
d
.
value
&&
e
.
find
(
"
input
"
).
prop
(
"
checked
"
,
!
0
)}),
g
.
append
(
e
)})}
return
a
.
placeholder
&&
g
.
attr
(
"
placeholder
"
,
a
.
placeholder
),
a
.
pattern
&&
g
.
attr
(
"
pattern
"
,
a
.
pattern
),
f
.
append
(
g
),
f
.
on
(
"
submit
"
,
function
(
a
){
a
.
preventDefault
(),
a
.
stopPropagation
(),
e
.
find
(
"
.btn-primary
"
).
click
()}),
e
=
q
.
dialog
(
a
),
e
.
off
(
"
shown.bs.modal
"
),
e
.
on
(
"
shown.bs.modal
"
,
function
(){
g
.
focus
()}),
i
===!
0
&&
e
.
modal
(
"
show
"
),
e
},
q
.
dialog
=
function
(
a
){
a
=
i
(
a
);
var
c
=
b
(
o
.
dialog
),
d
=
c
.
find
(
"
.modal-dialog
"
),
e
=
c
.
find
(
"
.modal-body
"
),
g
=
a
.
buttons
,
j
=
""
,
k
=
{
onEscape
:
a
.
onEscape
};
if
(
h
(
g
,
function
(
a
,
b
){
j
+=
"
<button data-bb-handler='
"
+
a
+
"
' type='button' class='btn
"
+
b
.
className
+
"
'>
"
+
b
.
label
+
"
</button>
"
,
k
[
a
]
=
b
.
callback
}),
e
.
find
(
"
.bootbox-body
"
).
html
(
a
.
message
),
a
.
animate
===!
0
&&
c
.
addClass
(
"
fade
"
),
a
.
className
&&
c
.
addClass
(
a
.
className
),
"
large
"
===
a
.
size
&&
d
.
addClass
(
"
modal-lg
"
),
"
small
"
===
a
.
size
&&
d
.
addClass
(
"
modal-sm
"
),
a
.
title
&&
e
.
before
(
o
.
header
),
a
.
closeButton
){
var
l
=
b
(
o
.
closeButton
);
a
.
title
?
c
.
find
(
"
.modal-header
"
).
prepend
(
l
):
l
.
css
(
"
margin-top
"
,
"
-10px
"
).
prependTo
(
e
)}
return
a
.
title
&&
c
.
find
(
"
.modal-title
"
).
html
(
a
.
title
),
j
.
length
&&
(
e
.
after
(
o
.
footer
),
c
.
find
(
"
.modal-footer
"
).
html
(
j
)),
c
.
on
(
"
hidden.bs.modal
"
,
function
(
a
){
a
.
target
===
this
&&
c
.
remove
()}),
c
.
on
(
"
shown.bs.modal
"
,
function
(){
c
.
find
(
"
.btn-primary:first
"
).
focus
()}),
c
.
on
(
"
escape.close.bb
"
,
function
(
a
){
k
.
onEscape
&&
f
(
a
,
c
,
k
.
onEscape
)}),
c
.
on
(
"
click
"
,
"
.modal-footer button
"
,
function
(
a
){
var
d
=
b
(
this
).
data
(
"
bb-handler
"
);
f
(
a
,
c
,
k
[
d
])}),
c
.
on
(
"
click
"
,
"
.bootbox-close-button
"
,
function
(
a
){
f
(
a
,
c
,
k
.
onEscape
)}),
c
.
on
(
"
keyup
"
,
function
(
a
){
27
===
a
.
which
&&
c
.
trigger
(
"
escape.close.bb
"
)}),
b
(
a
.
container
).
append
(
c
),
c
.
modal
({
backdrop
:
a
.
backdrop
,
keyboard
:
!
1
,
show
:
!
1
}),
a
.
show
&&
c
.
modal
(
"
show
"
),
c
},
q
.
setDefaults
=
function
(){
var
a
=
{};
2
===
arguments
.
length
?
a
[
arguments
[
0
]]
=
arguments
[
1
]:
a
=
arguments
[
0
],
b
.
extend
(
p
,
a
)},
q
.
hideAll
=
function
(){
b
(
"
.bootbox
"
).
modal
(
"
hide
"
)};
var
r
=
{
en
:{
OK
:
"
OK
"
,
CANCEL
:
"
Cancel
"
,
CONFIRM
:
"
OK
"
},
zh_cn
:{
OK
:
"
好的
"
,
CANCEL
:
"
取消
"
,
CONFIRM
:
"
确认
"
},
zh_tw
:{
OK
:
"
好的
"
,
CANCEL
:
"
取消
"
,
CONFIRM
:
"
確認
"
}};
return
q
.
init
=
function
(
c
){
return
a
(
c
||
b
)},
q
}),
+
function
(
a
,
b
){
"
use strict
"
;
function
c
(){
this
.
show
=
function
(
b
,
c
,
f
,
g
,
h
){
a
(
"
.messager
"
).
hide
(),
d
++
,
c
=
c
||
"
default
"
,
g
=
g
||
2
e3
,
h
=
h
||
"
body
"
,
f
=
f
||
"
top
"
;
var
i
=
a
(
e
.
format
({
message
:
b
,
type
:
c
,
placement
:
f
,
id
:
d
})).
appendTo
(
h
);
return
i
.
find
(
"
.close-messager
"
).
click
(
function
(){
a
(
this
).
closest
(
"
.messager
"
).
fadeOut
()}),(
"
top
"
==
f
||
"
bottom
"
==
f
)
&&
i
.
css
(
"
left
"
,(
a
(
h
).
width
()
-
i
.
width
()
-
50
)
/
2
),
i
.
fadeIn
(),
setTimeout
(
function
(){
a
(
"
#messager
"
+
d
).
fadeOut
(
function
(){
a
(
this
).
remove
()})},
g
),
i
},
this
.
primary
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
a
,
"
primary
"
,
b
,
c
,
d
)},
this
.
success
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
'
<i class="icon-ok-sign icon"></i>
'
+
a
,
"
success
"
,
b
,
c
,
d
)},
this
.
info
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
'
<i class="icon-info-sign icon"></i>
'
+
a
,
"
info
"
,
b
,
c
,
d
)},
this
.
warning
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
'
<i class="icon-warning-sign icon"></i>
'
+
a
,
"
warning
"
,
b
,
c
,
d
)},
this
.
danger
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
'
<i class="icon-exclamation-sign icon"></i>
'
+
a
,
"
danger
"
,
b
,
c
,
d
)},
this
.
important
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
a
,
"
important
"
,
b
,
c
,
d
)},
this
.
special
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
a
,
"
special
"
,
b
,
c
,
d
)}}
var
d
=
0
,
e
=
'
<div class="messager messager-{type} {placement}" id="messager{id}" style="display:none"><div class="messager-content">{message}</div><button class="close-messager">×</button></div>
'
,
f
=
new
c
;
b
.
messager
=
f
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
if
(
!
a
.
fn
.
droppable
)
throw
new
Error
(
"
droppable requires for boards
"
);
var
b
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
getLang
(),
this
.
init
()};
b
.
DEFAULTS
=
{
lang
:
"
zh-cn
"
,
langs
:{
"
zh-cn
"
:{
appendToTheEnd
:
"
移动到末尾
"
},
"
zh-tw
"
:{
appendToTheEnd
:
"
移动到末尾
"
},
en
:{
appendToTheEnd
:
"
Move to the end.
"
}}},
b
.
prototype
.
getOptions
=
function
(
c
){
return
c
=
a
.
extend
({},
b
.
DEFAULTS
,
this
.
$
.
data
(),
c
)},
b
.
prototype
.
getLang
=
function
(){
if
(
!
this
.
options
.
lang
){
if
(
"
undefined
"
!=
typeof
config
&&
config
.
clientLang
)
this
.
options
.
lang
=
config
.
clientLang
;
else
{
var
c
=
a
(
"
html
"
).
attr
(
"
lang
"
);
this
.
options
.
lang
=
c
?
c
:
"
en
"
}
this
.
options
.
lang
=
this
.
options
.
lang
.
replace
(
/-/
,
"
_
"
).
toLowerCase
()}
this
.
lang
=
this
.
options
.
langs
[
this
.
options
.
lang
]
||
this
.
options
.
langs
[
b
.
DEFAULTS
.
lang
]},
b
.
prototype
.
init
=
function
(){
var
b
=
1
,
c
=
this
.
lang
;
this
.
$
.
find
(
'
.board-item:not(".disable-drop"), .board:not(".disable-drop")
'
).
each
(
function
(){
var
d
=
a
(
this
);
d
.
attr
(
"
id
"
)?
d
.
attr
(
"
data-id
"
,
d
.
attr
(
"
id
"
)):
d
.
attr
(
"
data-id
"
)
||
d
.
attr
(
"
data-id
"
,
"
board
"
+
b
++
),
d
.
hasClass
(
"
board
"
)
&&
d
.
find
(
"
.board-list
"
).
append
(
'
<div class="board-item board-item-empty"><i class="icon-plus"></i> {appendToTheEnd}</div>
'
.
format
(
c
)).
append
(
'
<div class="board-item board-item-shadow"></div>
'
.
format
(
c
))}),
this
.
bind
()},
b
.
prototype
.
bind
=
function
(
b
){
var
c
=
this
.
$
,
d
=
this
.
options
;
"
undefined
"
==
typeof
b
&&
(
b
=
c
.
find
(
'
.board-item:not(".disable-drop, .board-item-shadow")
'
)),
b
.
droppable
({
target
:
'
.board-item:not(".disable-drop, .board-item-shadow")
'
,
flex
:
!
0
,
start
:
function
(
a
){
c
.
addClass
(
"
dragging
"
).
find
(
"
.board-item-shadow
"
).
height
(
a
.
element
.
outerHeight
())},
drag
:
function
(
a
){
if
(
c
.
find
(
"
.board.drop-in-empty
"
).
removeClass
(
"
drop-in-empty
"
),
a
.
isIn
){
var
b
=
a
.
target
.
closest
(
"
.board
"
).
addClass
(
"
drop-in
"
),
d
=
b
.
find
(
"
.board-item-shadow
"
),
e
=
a
.
target
;
c
.
addClass
(
"
drop-in
"
).
find
(
"
.board.drop-in
"
).
not
(
b
).
removeClass
(
"
drop-in
"
),
d
.
insertBefore
(
e
),
b
.
toggleClass
(
"
drop-in-empty
"
,
e
.
hasClass
(
"
board-item-empty
"
))}},
drop
:
function
(
b
){
b
.
isNew
&&
(
d
.
hasOwnProperty
(
"
drop
"
)
&&
a
.
isFunction
(
d
.
drop
)
&&
d
.
drop
(
b
),
b
.
element
.
insertBefore
(
b
.
target
))},
finish
:
function
(){
c
.
removeClass
(
"
dragging
"
).
removeClass
(
"
drop-in
"
).
find
(
"
.board.drop-in
"
).
removeClass
(
"
drop-in
"
)}})},
a
.
fn
.
boards
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
zui.boards
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
zui.boards
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
boards
.
Constructor
=
b
,
a
(
function
(){
a
(
'
[data-toggle="boards"]
'
).
boards
()})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
function
b
(
c
,
d
){
var
e
,
f
=
a
.
proxy
(
this
.
process
,
this
);
this
.
$element
=
a
(
a
(
c
).
is
(
"
body
"
)?
window
:
c
),
this
.
$body
=
a
(
"
body
"
),
this
.
$scrollElement
=
this
.
$element
.
on
(
"
scroll.bs.scroll-spy.data-api
"
,
f
),
this
.
options
=
a
.
extend
({},
b
.
DEFAULTS
,
d
),
this
.
selector
||
(
this
.
selector
=
(
this
.
options
.
target
||
(
e
=
a
(
c
).
attr
(
"
href
"
))
&&
e
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
""
)
||
""
)
+
"
.nav li > a
"
),
this
.
offsets
=
a
([]),
this
.
targets
=
a
([]),
this
.
activeTarget
=
null
,
this
.
refresh
(),
this
.
process
()}
b
.
DEFAULTS
=
{
offset
:
10
},
b
.
prototype
.
refresh
=
function
(){
var
b
=
this
.
$element
[
0
]
==
window
?
"
offset
"
:
"
position
"
;
this
.
offsets
=
a
([]),
this
.
targets
=
a
([]);{
var
c
=
this
;
this
.
$body
.
find
(
this
.
selector
).
map
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
target
"
)
||
d
.
attr
(
"
href
"
),
f
=
/^#./
.
test
(
e
)
&&
a
(
e
);
return
f
&&
f
.
length
&&
f
.
is
(
"
:visible
"
)
&&
[[
f
[
b
]().
top
+
(
!
a
.
isWindow
(
c
.
$scrollElement
.
get
(
0
))
&&
c
.
$scrollElement
.
scrollTop
()),
e
]]
||
null
}).
sort
(
function
(
a
,
b
){
return
a
[
0
]
-
b
[
0
]}).
each
(
function
(){
c
.
offsets
.
push
(
this
[
0
]),
c
.
targets
.
push
(
this
[
1
])})}},
b
.
prototype
.
process
=
function
(){
var
a
,
b
=
this
.
$scrollElement
.
scrollTop
()
+
this
.
options
.
offset
,
c
=
this
.
$scrollElement
[
0
].
scrollHeight
||
this
.
$body
[
0
].
scrollHeight
,
d
=
c
-
this
.
$scrollElement
.
height
(),
e
=
this
.
offsets
,
f
=
this
.
targets
,
g
=
this
.
activeTarget
;
if
(
b
>=
d
)
return
g
!=
(
a
=
f
.
last
()[
0
])
&&
this
.
activate
(
a
);
if
(
g
&&
b
<=
e
[
0
])
return
g
!=
(
a
=
f
[
0
])
&&
this
.
activate
(
a
);
for
(
a
=
e
.
length
;
a
--
;)
g
!=
f
[
a
]
&&
b
>=
e
[
a
]
&&
(
!
e
[
a
+
1
]
||
b
<=
e
[
a
+
1
])
&&
this
.
activate
(
f
[
a
])},
b
.
prototype
.
activate
=
function
(
b
){
this
.
activeTarget
=
b
,
a
(
this
.
selector
).
parentsUntil
(
this
.
options
.
target
,
"
.active
"
).
removeClass
(
"
active
"
);
var
c
=
this
.
selector
+
'
[data-target="
'
+
b
+
'
"],
'
+
this
.
selector
+
'
[href="
'
+
b
+
'
"]
'
,
d
=
a
(
c
).
parents
(
"
li
"
).
addClass
(
"
active
"
);
d
.
parent
(
"
.dropdown-menu
"
).
length
&&
(
d
=
d
.
closest
(
"
li.dropdown
"
).
addClass
(
"
active
"
)),
d
.
trigger
(
"
activate.bs.scrollspy
"
)};
var
c
=
a
.
fn
.
scrollspy
;
a
.
fn
.
scrollspy
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.scrollspy
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.scrollspy
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
scrollspy
.
Constructor
=
b
,
a
.
fn
.
scrollspy
.
noConflict
=
function
(){
return
a
.
fn
.
scrollspy
=
c
,
this
},
a
(
window
).
on
(
"
load
"
,
function
(){
a
(
'
[data-spy="scroll"]
'
).
each
(
function
(){
var
b
=
a
(
this
);
b
.
scrollspy
(
b
.
data
())})})}(
jQuery
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
var
e
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
initOptions
(
c
),
this
.
init
()};
e
.
DEFAULTS
=
{
coverColor
:
"
#000
"
,
coverOpacity
:.
6
,
fixedRatio
:
!
1
,
defaultWidth
:
128
,
defaultHeight
:
128
,
minWidth
:
48
,
minHeight
:
48
},
e
.
prototype
.
callEvent
=
function
(
b
,
c
){
return
a
.
callEvent
(
this
.
options
[
b
],
c
)},
e
.
prototype
.
initOptions
=
function
(
b
){
this
.
options
=
a
.
extend
({},
e
.
DEFAULTS
,
this
.
$
.
data
(),
b
),
this
.
options
.
coverOpacityIE
=
100
*
this
.
options
.
coverOpacity
,
this
.
clipWidth
=
this
.
options
.
defaultWidth
,
this
.
clipHeight
=
this
.
options
.
defaultHeight
},
e
.
prototype
.
init
=
function
(){
this
.
initDom
(),
this
.
initSize
(),
this
.
bindEvents
()},
e
.
prototype
.
initDom
=
function
(){
this
.
$canvas
=
this
.
$
.
children
(
"
.canvas
"
),
this
.
$img
=
this
.
$canvas
.
children
(
"
img
"
),
this
.
$actions
=
this
.
$
.
children
(
"
.actions
"
),
this
.
$btn
=
this
.
$
.
find
(
"
.img-cutter-submit
"
),
this
.
$preview
=
this
.
$
.
find
(
"
.img-cutter-preview
"
),
this
.
options
.
img
=
this
.
$img
.
attr
(
"
src
"
),
this
.
$canvas
.
append
(
'
<div class="cover" style="background: {coverColor}; opacity: {coverOpacity}; filter:alpha(opacity={coverOpacityIE});"></div><div class="controller" style="width: {defaultWidth}px; height: {defaultHeight}px"><div class="control" data-direction="top"></div><div class="control" data-direction="right"></div><div class="control" data-direction="bottom"></div><div class="control" data-direction="left"></div><div class="control" data-direction="top-left"></div><div class="control" data-direction="top-right"></div><div class="control" data-direction="bottom-left"></div><div class="control" data-direction="bottom-right"></div></div><div class="cliper"><img src="{img}"/></div>
'
.
format
(
this
.
options
)),
this
.
$cover
=
this
.
$canvas
.
children
(
"
.cover
"
),
this
.
$controller
=
this
.
$canvas
.
children
(
"
.controller
"
),
this
.
$cliper
=
this
.
$canvas
.
children
(
"
.cliper
"
),
this
.
$chipImg
=
this
.
$cliper
.
children
(
"
img
"
),
this
.
options
.
fixedRatio
&&
this
.
$
.
addClass
(
"
fixed-ratio
"
)},
e
.
prototype
.
initSize
=
function
(){
var
a
=
this
;
"
undefined
"
==
typeof
a
.
imgWidth
&&
imgReady
(
a
.
options
.
img
,
function
(){
a
.
imgWidth
=
this
.
width
,
a
.
imgHeight
=
this
.
height
,
a
.
callEvent
(
"
ready
"
)});
var
b
=
setInterval
(
function
(){
"
undefined
"
!=
typeof
a
.
imgWidth
&&
(
clearInterval
(
b
),
a
.
width
=
d
.
min
(
a
.
imgWidth
,
a
.
$
.
width
()),
a
.
$canvas
.
css
(
"
width
"
,
this
.
width
),
a
.
$cliper
.
css
(
"
width
"
,
this
.
width
),
a
.
height
=
a
.
$canvas
.
height
(),
"
undefined
"
==
typeof
a
.
left
&&
(
a
.
left
=
d
.
floor
((
a
.
width
-
a
.
$controller
.
width
())
/
2
),
a
.
top
=
d
.
floor
((
a
.
height
-
a
.
$controller
.
height
())
/
2
)),
a
.
refreshSize
())},
0
)},
e
.
prototype
.
refreshSize
=
function
(
a
){
var
b
=
this
.
options
;
this
.
clipWidth
=
d
.
max
(
b
.
minWidth
,
d
.
min
(
this
.
width
,
this
.
clipWidth
)),
this
.
clipHeight
=
d
.
max
(
b
.
minHeight
,
d
.
min
(
this
.
height
,
this
.
clipHeight
)),
b
.
fixedRatio
&&
(
a
&&
"
height
"
===
a
?(
this
.
clipWidth
=
d
.
max
(
b
.
minWidth
,
d
.
min
(
this
.
width
,
this
.
clipHeight
*
b
.
defaultWidth
/
b
.
defaultHeight
)),
this
.
clipHeight
=
this
.
clipWidth
*
b
.
defaultHeight
/
b
.
defaultWidth
):(
this
.
clipHeight
=
d
.
max
(
b
.
minHeight
,
d
.
min
(
this
.
height
,
this
.
clipWidth
*
b
.
defaultHeight
/
b
.
defaultWidth
)),
this
.
clipWidth
=
this
.
clipHeight
*
b
.
defaultWidth
/
b
.
defaultHeight
)),
this
.
left
=
d
.
min
(
this
.
width
-
this
.
clipWidth
,
d
.
max
(
0
,
this
.
left
)),
this
.
top
=
d
.
min
(
this
.
height
-
this
.
clipHeight
,
d
.
max
(
0
,
this
.
top
)),
this
.
right
=
this
.
left
+
this
.
clipWidth
,
this
.
bottom
=
this
.
top
+
this
.
clipHeight
,
this
.
$controller
.
css
({
left
:
this
.
left
,
top
:
this
.
top
,
width
:
this
.
clipWidth
,
height
:
this
.
clipHeight
}),
this
.
$cliper
.
css
(
"
clip
"
,
"
rect({0}px {1}px {2}px {3}px
"
.
format
(
this
.
top
,
this
.
left
+
this
.
clipWidth
,
this
.
top
+
this
.
clipHeight
,
this
.
left
)),
this
.
callEvent
(
"
change
"
,{
top
:
this
.
top
,
left
:
this
.
left
,
bottom
:
this
.
bottom
,
right
:
this
.
right
,
width
:
this
.
clipWidth
,
height
:
this
.
clipHeight
})},
e
.
prototype
.
bindEvents
=
function
(){
var
b
=
this
,
c
=
this
.
options
;
this
.
$
.
resize
(
a
.
proxy
(
this
.
initSize
,
this
)),
this
.
$btn
.
hover
(
function
(){
b
.
$
.
toggleClass
(
"
hover
"
)}).
click
(
function
(){
var
d
=
{
originWidth
:
b
.
imgWidth
,
originHeight
:
b
.
imgHeight
,
width
:
b
.
width
,
height
:
b
.
height
,
left
:
b
.
left
,
top
:
b
.
top
,
right
:
b
.
right
,
bottom
:
b
.
bottom
,
scaled
:
b
.
imgWidth
!=
b
.
width
||
b
.
imgHeight
!=
b
.
height
};
if
(
b
.
callEvent
(
"
before
"
,
d
)){
var
e
=
c
.
post
||
c
.
get
||
c
.
url
||
null
;
null
!=
e
&&
a
.
ajax
({
type
:
c
.
post
?
"
POST
"
:
"
GET
"
,
url
:
e
,
data
:
d
}).
done
(
function
(
a
){
b
.
callEvent
(
"
done
"
,
a
)}).
fail
(
function
(
a
){
b
.
callEvent
(
"
fail
"
,
a
)}).
always
(
function
(
a
){
b
.
callEvent
(
"
always
"
,
a
)})}}),
this
.
$controller
.
draggable
({
move
:
!
1
,
container
:
this
.
$canvas
,
drag
:
function
(
a
){
b
.
left
+=
a
.
smallOffset
.
x
,
b
.
top
+=
a
.
smallOffset
.
y
,
b
.
refreshSize
()}}),
this
.
$controller
.
children
(
"
.control
"
).
draggable
({
move
:
!
1
,
container
:
this
.
$canvas
,
stopPropagation
:
!
0
,
drag
:
function
(
a
){
var
e
=
a
.
element
.
data
(
"
direction
"
),
f
=
a
.
smallOffset
,
g
=!
1
;
switch
(
e
){
case
"
left
"
:
case
"
top-left
"
:
case
"
bottom-left
"
:
b
.
left
+=
f
.
x
,
b
.
left
=
d
.
min
(
b
.
right
-
c
.
minWidth
,
d
.
max
(
0
,
b
.
left
)),
b
.
clipWidth
=
b
.
right
-
b
.
left
;
break
;
case
"
right
"
:
case
"
top-right
"
:
case
"
bottom-right
"
:
b
.
clipWidth
+=
f
.
x
,
b
.
clipWidth
=
d
.
min
(
b
.
width
-
b
.
left
,
d
.
max
(
c
.
minWidth
,
b
.
clipWidth
))}
switch
(
e
){
case
"
top
"
:
case
"
top-left
"
:
case
"
top-right
"
:
b
.
top
+=
f
.
y
,
b
.
top
=
d
.
min
(
b
.
bottom
-
c
.
minHeight
,
d
.
max
(
0
,
b
.
top
)),
b
.
clipHeight
=
b
.
bottom
-
b
.
top
,
g
=!
0
;
break
;
case
"
bottom
"
:
case
"
bottom-left
"
:
case
"
bottom-right
"
:
b
.
clipHeight
+=
f
.
y
,
b
.
clipHeight
=
d
.
min
(
b
.
height
-
b
.
top
,
d
.
max
(
c
.
minHeight
,
b
.
clipHeight
)),
g
=!
0
}
b
.
refreshSize
(
g
)}})},
a
.
fn
.
imgCutter
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.imgCutter
"
),
f
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.imgCutter
"
,
d
=
new
e
(
this
,
f
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
.
fn
.
imgCutter
.
Constructor
=
e
,
a
(
function
(){
a
(
'
[data-toggle="imgCutter"]
'
).
imgCutter
()})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
b
.
DEFAULTS
=
{
trigger
:
"
toggle
"
,
selector
:
null
,
animate
:
"
slide
"
,
easing
:
"
linear
"
,
animateSpeed
:
"
fast
"
,
events
:
"
click
"
,
preventDefault
:
!
0
,
cancelBubble
:
!
0
,
target
:
null
},
b
.
prototype
.
getOptions
=
function
(
c
){
return
c
=
a
.
extend
({},
b
.
DEFAULTS
,
this
.
$
.
data
(),
c
)},
b
.
prototype
.
init
=
function
(){
this
.
bindEvents
()},
b
.
prototype
.
bindEvents
=
function
(){
var
b
=
this
.
options
;
if
(
this
.
bindTrigger
(
b
),
a
.
isArray
(
b
.
triggers
))
for
(
var
c
in
b
.
triggers
)
this
.
bindTrigger
(
a
.
extend
({},
b
,
b
.
triggers
[
c
]));
else
if
(
"
string
"
==
typeof
b
.
triggers
){
var
d
=
b
.
triggers
.
split
(
"
|
"
);
for
(
var
c
in
d
){
var
e
=
d
[
c
].
split
(
"
,
"
,
4
);
if
(
!
(
e
.
length
<
2
)){
var
f
=
{};
e
[
0
]
&&
(
f
.
events
=
e
[
0
]),
e
[
1
]
&&
(
f
.
trigger
=
e
[
1
]),
e
[
2
]
&&
(
f
.
target
=
e
[
2
]),
e
[
3
]
&&
(
f
.
data
=
e
[
3
]),
this
.
bindTrigger
(
a
.
extend
({},
b
,
f
))}}}},
b
.
prototype
.
bindTrigger
=
function
(
b
){
var
c
=
this
;
c
.
$
.
on
(
b
.
events
,
b
.
selector
,
function
(
d
){
var
e
=
b
.
target
&&
"
self
"
!=
b
.
target
?
a
(
b
.
target
):
c
.
$
,
f
=
{
event
:
d
,
element
:
this
,
target
:
e
,
options
:
b
};
if
(
a
.
callEvent
(
b
.
before
,
f
,
c
)){
if
(
a
.
isFunction
(
b
.
trigger
))
a
.
callEvent
(
b
.
trigger
,
f
,
c
);
else
{
var
g
=
b
.
trigger
;
switch
(
"
toggle
"
===
g
&&
(
g
=
e
.
hasClass
(
"
hide
"
)?
"
show
"
:
"
hide
"
),
g
){
case
"
toggle
"
:
e
.
toggle
();
break
;
case
"
show
"
:
var
h
=
{
duration
:
b
.
animateSpeed
,
easing
:
b
.
easing
};
e
.
removeClass
(
"
hide
"
),
"
slide
"
===
b
.
animate
?
e
.
slideDown
(
h
):
"
fade
"
===
b
.
animate
?
e
.
fadeIn
(
h
):
e
.
show
(
h
);
break
;
case
"
hide
"
:
var
h
=
{
duration
:
b
.
animateSpeed
,
easing
:
b
.
easing
,
complete
:
function
(){
e
.
addClass
(
"
hide
"
)}};
"
slide
"
===
b
.
animate
?
e
.
slideUp
(
h
):
"
fade
"
===
b
.
animate
?
e
.
fadeOut
(
h
):
e
.
hide
(
h
);
break
;
case
"
addClass
"
:
case
"
removeClass
"
:
case
"
toggleClass
"
:
e
[
g
](
b
.
data
)}}
a
.
callEvent
(
b
.
after
,
f
,
c
),
b
.
preventDefault
&&
d
.
preventDefault
(),
b
.
cancelBubble
&&
d
.
stopPropagation
()}})},
a
.
fn
.
autoTrigger
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
zui.autoTrigger
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
zui.autoTrigger
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
autoTrigger
.
Constructor
=
b
,
a
(
function
(){
a
(
'
[data-toggle="autoTrigger"]
'
).
autoTrigger
(),
a
(
'
[data-toggle="toggle"]
'
).
autoTrigger
(),
a
(
'
[data-toggle="show"]
'
).
autoTrigger
({
trigger
:
"
show
"
}),
a
(
'
[data-toggle="hide"]
'
).
autoTrigger
({
trigger
:
"
hide
"
}),
a
(
'
[data-toggle="addClass"]
'
).
autoTrigger
({
trigger
:
"
addClass
"
}),
a
(
'
[data-toggle="removeClass"]
'
).
autoTrigger
({
trigger
:
"
removeClass
"
}),
a
(
'
[data-toggle="toggleClass"]
'
).
autoTrigger
({
trigger
:
"
toggleClass
"
})})}(
jQuery
,
window
,
document
,
Math
);
\ No newline at end of file
return
clearTimeout
(
c
.
timeout
),
c
.
hoverState
=
"
out
"
,
c
.
options
.
delay
&&
c
.
options
.
delay
.
hide
?
void
(
c
.
timeout
=
setTimeout
(
function
(){
"
out
"
==
c
.
hoverState
&&
c
.
hide
()},
c
.
options
.
delay
.
hide
)):
c
.
hide
()},
b
.
prototype
.
show
=
function
(){
var
b
=
a
.
Event
(
"
show.bs.
"
+
this
.
type
);
if
(
this
.
hasContent
()
&&
this
.
enabled
){
if
(
this
.
$element
.
trigger
(
b
),
b
.
isDefaultPrevented
())
return
;
var
c
=
this
.
tip
();
this
.
setContent
(),
this
.
options
.
animation
&&
c
.
addClass
(
"
fade
"
);
var
d
=
"
function
"
==
typeof
this
.
options
.
placement
?
this
.
options
.
placement
.
call
(
this
,
c
[
0
],
this
.
$element
[
0
]):
this
.
options
.
placement
,
e
=
/
\s?
auto
?\s?
/i
,
f
=
e
.
test
(
d
);
f
&&
(
d
=
d
.
replace
(
e
,
""
)
||
"
top
"
),
c
.
detach
().
css
({
top
:
0
,
left
:
0
,
display
:
"
block
"
}).
addClass
(
d
),
this
.
options
.
container
?
c
.
appendTo
(
this
.
options
.
container
):
c
.
insertAfter
(
this
.
$element
);
var
g
=
this
.
getPosition
(),
h
=
c
[
0
].
offsetWidth
,
i
=
c
[
0
].
offsetHeight
;
if
(
f
){
var
j
=
this
.
$element
.
parent
(),
k
=
d
,
l
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
,
m
=
"
body
"
==
this
.
options
.
container
?
window
.
innerWidth
:
j
.
outerWidth
(),
n
=
"
body
"
==
this
.
options
.
container
?
window
.
innerHeight
:
j
.
outerHeight
(),
o
=
"
body
"
==
this
.
options
.
container
?
0
:
j
.
offset
().
left
;
d
=
"
bottom
"
==
d
&&
g
.
top
+
g
.
height
+
i
-
l
>
n
?
"
top
"
:
"
top
"
==
d
&&
g
.
top
-
l
-
i
<
0
?
"
bottom
"
:
"
right
"
==
d
&&
g
.
right
+
h
>
m
?
"
left
"
:
"
left
"
==
d
&&
g
.
left
-
h
<
o
?
"
right
"
:
d
,
c
.
removeClass
(
k
).
addClass
(
d
)}
var
p
=
this
.
getCalculatedOffset
(
d
,
g
,
h
,
i
);
this
.
applyPlacement
(
p
,
d
),
this
.
$element
.
trigger
(
"
shown.bs.
"
+
this
.
type
)}},
b
.
prototype
.
applyPlacement
=
function
(
a
,
b
){
var
c
,
d
=
this
.
tip
(),
e
=
d
[
0
].
offsetWidth
,
f
=
d
[
0
].
offsetHeight
,
g
=
parseInt
(
d
.
css
(
"
margin-top
"
),
10
),
h
=
parseInt
(
d
.
css
(
"
margin-left
"
),
10
);
isNaN
(
g
)
&&
(
g
=
0
),
isNaN
(
h
)
&&
(
h
=
0
),
a
.
top
=
a
.
top
+
g
,
a
.
left
=
a
.
left
+
h
,
d
.
offset
(
a
).
addClass
(
"
in
"
);
var
i
=
d
[
0
].
offsetWidth
,
j
=
d
[
0
].
offsetHeight
;
if
(
"
top
"
==
b
&&
j
!=
f
&&
(
c
=!
0
,
a
.
top
=
a
.
top
+
f
-
j
),
/bottom|top/
.
test
(
b
)){
var
k
=
0
;
a
.
left
<
0
&&
(
k
=-
2
*
a
.
left
,
a
.
left
=
0
,
d
.
offset
(
a
),
i
=
d
[
0
].
offsetWidth
,
j
=
d
[
0
].
offsetHeight
),
this
.
replaceArrow
(
k
-
e
+
i
,
i
,
"
left
"
)}
else
this
.
replaceArrow
(
j
-
f
,
j
,
"
top
"
);
c
&&
d
.
offset
(
a
)},
b
.
prototype
.
replaceArrow
=
function
(
a
,
b
,
c
){
this
.
arrow
().
css
(
c
,
a
?
50
*
(
1
-
a
/
b
)
+
"
%
"
:
""
)},
b
.
prototype
.
setContent
=
function
(){
var
a
=
this
.
tip
(),
b
=
this
.
getTitle
();
a
.
find
(
"
.tooltip-inner
"
)[
this
.
options
.
html
?
"
html
"
:
"
text
"
](
b
),
a
.
removeClass
(
"
fade in top bottom left right
"
)},
b
.
prototype
.
hide
=
function
(){
function
b
(){
"
in
"
!=
c
.
hoverState
&&
d
.
detach
()}
var
c
=
this
,
d
=
this
.
tip
(),
e
=
a
.
Event
(
"
hide.bs.
"
+
this
.
type
);
return
this
.
$element
.
trigger
(
e
),
e
.
isDefaultPrevented
()?
void
0
:(
d
.
removeClass
(
"
in
"
),
a
.
support
.
transition
&&
this
.
$tip
.
hasClass
(
"
fade
"
)?
d
.
one
(
a
.
support
.
transition
.
end
,
b
).
emulateTransitionEnd
(
150
):
b
(),
this
.
$element
.
trigger
(
"
hidden.bs.
"
+
this
.
type
),
this
)},
b
.
prototype
.
fixTitle
=
function
(){
var
a
=
this
.
$element
;(
a
.
attr
(
"
title
"
)
||
"
string
"
!=
typeof
a
.
attr
(
"
data-original-title
"
))
&&
a
.
attr
(
"
data-original-title
"
,
a
.
attr
(
"
title
"
)
||
""
).
attr
(
"
title
"
,
""
)},
b
.
prototype
.
hasContent
=
function
(){
return
this
.
getTitle
()},
b
.
prototype
.
getPosition
=
function
(){
var
b
=
this
.
$element
[
0
];
return
a
.
extend
({},
"
function
"
==
typeof
b
.
getBoundingClientRect
?
b
.
getBoundingClientRect
():{
width
:
b
.
offsetWidth
,
height
:
b
.
offsetHeight
},
this
.
$element
.
offset
())},
b
.
prototype
.
getCalculatedOffset
=
function
(
a
,
b
,
c
,
d
){
return
"
bottom
"
==
a
?{
top
:
b
.
top
+
b
.
height
,
left
:
b
.
left
+
b
.
width
/
2
-
c
/
2
}:
"
top
"
==
a
?{
top
:
b
.
top
-
d
,
left
:
b
.
left
+
b
.
width
/
2
-
c
/
2
}:
"
left
"
==
a
?{
top
:
b
.
top
+
b
.
height
/
2
-
d
/
2
,
left
:
b
.
left
-
c
}:{
top
:
b
.
top
+
b
.
height
/
2
-
d
/
2
,
left
:
b
.
left
+
b
.
width
}},
b
.
prototype
.
getTitle
=
function
(){
var
a
,
b
=
this
.
$element
,
c
=
this
.
options
;
return
a
=
b
.
attr
(
"
data-original-title
"
)
||
(
"
function
"
==
typeof
c
.
title
?
c
.
title
.
call
(
b
[
0
]):
c
.
title
)},
b
.
prototype
.
tip
=
function
(){
return
this
.
$tip
=
this
.
$tip
||
a
(
this
.
options
.
template
)},
b
.
prototype
.
arrow
=
function
(){
return
this
.
$arrow
=
this
.
$arrow
||
this
.
tip
().
find
(
"
.tooltip-arrow
"
)},
b
.
prototype
.
validate
=
function
(){
this
.
$element
[
0
].
parentNode
||
(
this
.
hide
(),
this
.
$element
=
null
,
this
.
options
=
null
)},
b
.
prototype
.
enable
=
function
(){
this
.
enabled
=!
0
},
b
.
prototype
.
disable
=
function
(){
this
.
enabled
=!
1
},
b
.
prototype
.
toggleEnabled
=
function
(){
this
.
enabled
=!
this
.
enabled
},
b
.
prototype
.
toggle
=
function
(
b
){
var
c
=
b
?
a
(
b
.
currentTarget
)[
this
.
type
](
this
.
getDelegateOptions
()).
data
(
"
bs.
"
+
this
.
type
):
this
;
c
.
tip
().
hasClass
(
"
in
"
)?
c
.
leave
(
c
):
c
.
enter
(
c
)},
b
.
prototype
.
destroy
=
function
(){
this
.
hide
().
$element
.
off
(
"
.
"
+
this
.
type
).
removeData
(
"
bs.
"
+
this
.
type
)};
var
c
=
a
.
fn
.
tooltip
;
a
.
fn
.
tooltip
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.tooltip
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.tooltip
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
tooltip
.
Constructor
=
b
,
a
.
fn
.
tooltip
.
noConflict
=
function
(){
return
a
.
fn
.
tooltip
=
c
,
this
}}(
window
.
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
a
,
b
){
this
.
init
(
"
popover
"
,
a
,
b
)};
if
(
!
a
.
fn
.
tooltip
)
throw
new
Error
(
"
Popover requires tooltip.js
"
);
b
.
DEFAULTS
=
a
.
extend
({},
a
.
fn
.
tooltip
.
Constructor
.
DEFAULTS
,{
placement
:
"
right
"
,
trigger
:
"
click
"
,
content
:
""
,
template
:
'
<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>
'
}),
b
.
prototype
=
a
.
extend
({},
a
.
fn
.
tooltip
.
Constructor
.
prototype
),
b
.
prototype
.
constructor
=
b
,
b
.
prototype
.
getDefaults
=
function
(){
return
b
.
DEFAULTS
},
b
.
prototype
.
setContent
=
function
(){
var
a
=
this
.
tip
(),
b
=
this
.
getTarget
();
if
(
b
)
return
b
.
find
(
"
.arrow
"
).
length
<
1
&&
a
.
addClass
(
"
no-arrow
"
),
void
a
.
html
(
b
.
html
());
var
c
=
this
.
getTitle
(),
d
=
this
.
getContent
();
a
.
find
(
"
.popover-title
"
)[
this
.
options
.
html
?
"
html
"
:
"
text
"
](
c
),
a
.
find
(
"
.popover-content
"
)[
this
.
options
.
html
?
"
html
"
:
"
text
"
](
d
),
a
.
removeClass
(
"
fade top bottom left right in
"
),
a
.
find
(
"
.popover-title
"
).
html
()
||
a
.
find
(
"
.popover-title
"
).
hide
()},
b
.
prototype
.
hasContent
=
function
(){
return
this
.
getTarget
()
||
this
.
getTitle
()
||
this
.
getContent
()},
b
.
prototype
.
getContent
=
function
(){
var
a
=
this
.
$element
,
b
=
this
.
options
;
return
a
.
attr
(
"
data-content
"
)
||
(
"
function
"
==
typeof
b
.
content
?
b
.
content
.
call
(
a
[
0
]):
b
.
content
)},
b
.
prototype
.
getTarget
=
function
(){
var
b
=
this
.
$element
,
c
=
this
.
options
,
d
=
b
.
attr
(
"
data-target
"
)
||
(
"
function
"
==
typeof
c
.
target
?
c
.
target
.
call
(
b
[
0
]):
c
.
target
);
return
d
?
"
$next
"
==
d
?
b
.
next
(
"
.popover
"
):
a
(
d
):
!
1
},
b
.
prototype
.
arrow
=
function
(){
return
this
.
$arrow
=
this
.
$arrow
||
this
.
tip
().
find
(
"
.arrow
"
)},
b
.
prototype
.
tip
=
function
(){
return
this
.
$tip
||
(
this
.
$tip
=
a
(
this
.
options
.
template
)),
this
.
$tip
};
var
c
=
a
.
fn
.
popover
;
a
.
fn
.
popover
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.popover
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.popover
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
popover
.
Constructor
=
b
,
a
.
fn
.
popover
.
noConflict
=
function
(){
return
a
.
fn
.
popover
=
c
,
this
}}(
window
.
jQuery
),
+
function
(
a
){
"
user strict
"
;
var
b
=
function
(
a
,
b
){
this
.
init
(
"
pager
"
,
a
,
b
)};
if
(
!
a
.
fn
.
tooltip
)
throw
new
Error
(
"
Popover requires tooltip.js
"
);
if
(
!
a
.
fn
.
popover
)
throw
new
Error
(
"
Popover requires popover.js
"
);
b
.
prototype
.
init
=
function
(
b
,
c
,
d
){
this
.
type
=
b
,
this
.
$element
=
a
(
c
),
this
.
options
=
d
,
this
.
computeIndex
(),
this
.
$element
.
popover
({
container
:
"
body
"
,
trigger
:
"
manual
"
,
html
:
!
0
,
template
:
'
<div class="popover pager-popover"><div class="arrow"></div><div class="popover-content"></div></div>
'
}).
on
(
"
click.
"
+
this
.
type
,
!
1
,
a
.
proxy
(
this
.
showPopover
,
this
))},
b
.
prototype
.
hidePopover
=
function
(){
var
b
=
this
.
$element
;
"
true
"
==
b
.
attr
(
"
data-safe-close
"
)?(
b
.
popover
(
"
hide
"
).
attr
(
"
data-safe-close
"
,
!
1
),
a
(
document
).
unbind
(
"
click
"
,
this
.
hidePopover
)):
b
.
attr
(
"
data-safe-close
"
,
!
0
)},
b
.
prototype
.
showPopover
=
function
(){
var
b
=
this
.
$element
;
b
.
attr
(
"
data-content
"
)
||
b
.
attr
(
"
data-content
"
,
"
<ul class='pager'>
"
+
this
.
setContent
(
this
.
getUrl
())
+
"
</ul>
"
),
b
.
popover
(
"
show
"
),
a
(
document
).
bind
(
"
click
"
,
a
.
proxy
(
this
.
hidePopover
,
this
))},
b
.
prototype
.
setContent
=
function
(
a
){
var
b
=
""
;
if
(
this
.
isRangeIndex
)
for
(
var
c
=
this
.
indexStart
;
c
<=
this
.
indexEnd
;
c
++
)
b
+=
"
<li><a href='
"
+
a
.
replace
(
"
%
"
,
c
)
+
"
'>
"
+
c
+
"
</a></li>
"
;
else
for
(
var
c
=
this
.
indexs
.
length
-
1
;
c
>=
0
;
c
--
){
var
d
=
this
.
indexs
[
c
];
b
+=
"
<li><a href='
"
+
a
.
replace
(
"
%
"
,
d
)
+
"
'>
"
+
d
+
"
</a></li>
"
}
return
b
},
b
.
prototype
.
getUrl
=
function
(){
var
a
=
this
.
$element
,
b
=
this
.
options
;
return
a
.
attr
(
"
data-url
"
)
||
a
.
attr
(
"
href
"
)
||
(
"
function
"
==
typeof
b
.
url
?
b
.
url
.
call
(
a
[
0
]):
b
.
url
)
||
"
?page=%
"
},
b
.
prototype
.
computeIndex
=
function
(){
var
a
=
this
.
$element
,
b
=
a
.
closest
(
"
li
"
),
c
=
this
.
options
,
d
=
a
.
attr
(
"
data-index
"
)
||
(
"
function
"
==
typeof
c
.
index
?
c
.
index
.
call
(
a
[
0
]):
c
.
index
)
||
b
.
prev
(
"
li
"
).
find
(
"
a
"
).
text
()
-
0
+
1
+
"
-
"
+
(
b
.
next
(
"
li
"
).
find
(
"
a
"
).
text
()
-
1
);
if
(
d
.
indexOf
(
"
-
"
)
>
0
){
this
.
isRangeIndex
=!
0
;
var
e
=
d
.
split
(
"
-
"
);
this
.
indexStart
=
e
[
0
]
-
0
,
this
.
indexEnd
=
e
[
1
]
-
0
,
this
.
indexCount
=
this
.
indexEnd
-
this
.
indexStart
}
else
this
.
indexs
=
d
.
split
(
"
,
"
),
this
.
indexCount
=
this
.
indexs
.
length
};
var
c
=
a
.
fn
.
pager
;
a
.
fn
.
pager
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.pager
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.pager
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
pager
.
Constructor
=
b
,
a
.
fn
.
pager
.
noConflict
=
function
(){
return
a
.
fn
.
pager
=
c
,
this
}}(
window
.
jQuery
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
){
this
.
element
=
a
(
b
)};
b
.
prototype
.
show
=
function
(){
var
b
=
this
.
element
,
c
=
b
.
closest
(
"
ul:not(.dropdown-menu)
"
),
d
=
b
.
attr
(
"
data-target
"
);
if
(
d
||
(
d
=
b
.
attr
(
"
href
"
),
d
=
d
&&
d
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
""
)),
!
b
.
parent
(
"
li
"
).
hasClass
(
"
active
"
)){
var
e
=
c
.
find
(
"
.active:last a
"
)[
0
],
f
=
a
.
Event
(
"
show.bs.tab
"
,{
relatedTarget
:
e
});
if
(
b
.
trigger
(
f
),
!
f
.
isDefaultPrevented
()){
var
g
=
a
(
d
);
this
.
activate
(
b
.
parent
(
"
li
"
),
c
),
this
.
activate
(
g
,
g
.
parent
(),
function
(){
b
.
trigger
({
type
:
"
shown.bs.tab
"
,
relatedTarget
:
e
})})}}},
b
.
prototype
.
activate
=
function
(
b
,
c
,
d
){
function
e
(){
f
.
removeClass
(
"
active
"
).
find
(
"
> .dropdown-menu > .active
"
).
removeClass
(
"
active
"
),
b
.
addClass
(
"
active
"
),
g
?(
b
[
0
].
offsetWidth
,
b
.
addClass
(
"
in
"
)):
b
.
removeClass
(
"
fade
"
),
b
.
parent
(
"
.dropdown-menu
"
)
&&
b
.
closest
(
"
li.dropdown
"
).
addClass
(
"
active
"
),
d
&&
d
()}
var
f
=
c
.
find
(
"
> .active
"
),
g
=
d
&&
a
.
support
.
transition
&&
f
.
hasClass
(
"
fade
"
);
g
?
f
.
one
(
a
.
support
.
transition
.
end
,
e
).
emulateTransitionEnd
(
150
):
e
(),
f
.
removeClass
(
"
in
"
)};
var
c
=
a
.
fn
.
tab
;
a
.
fn
.
tab
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.tab
"
);
e
||
d
.
data
(
"
bs.tab
"
,
e
=
new
b
(
this
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
tab
.
Constructor
=
b
,
a
.
fn
.
tab
.
noConflict
=
function
(){
return
a
.
fn
.
tab
=
c
,
this
},
a
(
document
).
on
(
"
click.bs.tab.data-api
"
,
'
[data-toggle="tab"], [data-toggle="pill"]
'
,
function
(
b
){
b
.
preventDefault
(),
a
(
this
).
tab
(
"
show
"
)})}(
window
.
jQuery
);
var
imgReady
=
function
(){
var
a
=
[],
b
=
null
,
c
=
function
(){
for
(
var
b
=
0
;
b
<
a
.
length
;
b
++
)
a
[
b
].
end
?
a
.
splice
(
b
--
,
1
):
a
[
b
]();
!
a
.
length
&&
d
()},
d
=
function
(){
clearInterval
(
b
),
b
=
null
};
return
function
(
d
,
e
,
f
,
g
){
var
h
,
i
,
j
,
k
,
l
,
m
=
new
Image
;
return
m
.
src
=
d
,
m
.
complete
?(
e
.
call
(
m
),
void
(
f
&&
f
.
call
(
m
))):(
i
=
m
.
width
,
j
=
m
.
height
,
m
.
onerror
=
function
(){
g
&&
g
.
call
(
m
),
h
.
end
=!
0
,
m
=
m
.
onload
=
m
.
onerror
=
null
},
h
=
function
(){
k
=
m
.
width
,
l
=
m
.
height
,(
k
!==
i
||
l
!==
j
||
k
*
l
>
1024
)
&&
(
e
.
call
(
m
),
h
.
end
=!
0
)},
h
(),
m
.
onload
=
function
(){
!
h
.
end
&&
h
(),
f
&&
f
.
call
(
m
),
m
=
m
.
onload
=
m
.
onerror
=
null
},
void
(
h
.
end
||
(
a
.
push
(
h
),
null
===
b
&&
(
b
=
setInterval
(
c
,
40
)))))}}();
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
if
(
!
a
.
fn
.
modalTrigger
)
throw
new
Error
(
"
modal & modalTrigger requires for lightbox
"
);
if
(
!
imgReady
)
throw
new
Error
(
"
imgReady requires for lightbox
"
);
var
e
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
e
.
DEFAULTS
=
{
modalTeamplate
:
'
<div class="icon-spinner icon-spin loader"></div><div class="modal-dialog"><button class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-remove"></i></button><button class="controller prev"><i class="icon icon-chevron-left"></i></button><button class="controller next"><i class="icon icon-chevron-right"></i></button><img class="lightbox-img" src="{image}" alt="" data-dismiss="modal" /><div class="caption"><div class="content">{caption}<div></div></div>
'
},
e
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
e
.
DEFAULTS
,
this
.
$
.
data
(),
b
),
b
.
image
||
(
b
.
image
=
this
.
$
.
attr
(
"
src
"
)
||
this
.
$
.
attr
(
"
href
"
)
||
this
.
$
.
find
(
"
img
"
).
attr
(
"
src
"
),
this
.
$
.
data
(
"
image
"
,
b
.
image
)),
b
},
e
.
prototype
.
init
=
function
(){
this
.
bindEvents
()},
e
.
prototype
.
initGroups
=
function
(){
var
b
=
this
.
$
.
data
(
"
groups
"
);
b
||
(
b
=
a
(
'
[data-toggle="lightbox"][data-group="
'
+
this
.
options
.
group
+
'
"], [data-lightbox-group="
'
+
this
.
options
.
group
+
'
"]
'
),
this
.
$
.
data
(
"
groups
"
,
b
),
b
.
each
(
function
(
b
){
a
(
this
).
attr
(
"
data-group-index
"
,
b
)})),
this
.
groups
=
b
,
this
.
groupIndex
=
parseInt
(
this
.
$
.
data
(
"
group-index
"
))},
e
.
prototype
.
bindEvents
=
function
(){
var
c
=
this
.
$
,
e
=
this
,
f
=
this
.
options
;
return
f
.
image
?
void
c
.
modalTrigger
({
type
:
"
custom
"
,
name
:
"
lightboxModal
"
,
position
:
"
center
"
,
custom
:
function
(
c
){
e
.
initGroups
();
var
g
=
c
.
modal
,
h
=
e
.
groups
,
i
=
e
.
groupIndex
;
g
.
addClass
(
"
modal-lightbox
"
).
html
(
f
.
modalTeamplate
.
format
(
f
)).
toggleClass
(
"
lightbox-with-caption
"
,
"
string
"
==
typeof
f
.
caption
).
removeClass
(
"
lightbox-full
"
).
data
(
"
group-index
"
,
i
);
var
j
=
g
.
find
(
"
.modal-dialog
"
),
k
=
a
(
b
).
width
();
imgReady
(
f
.
image
,
function
(){
j
.
css
({
width
:
d
.
min
(
k
,
this
.
width
)}),
k
<
this
.
width
+
30
&&
g
.
addClass
(
"
lightbox-full
"
),
c
.
ready
()}),
g
.
find
(
"
.prev
"
).
toggleClass
(
"
show
"
,
h
.
filter
(
'
[data-group-index="
'
+
(
i
-
1
)
+
'
"]
'
).
length
>
0
),
g
.
find
(
"
.next
"
).
toggleClass
(
"
show
"
,
h
.
filter
(
'
[data-group-index="
'
+
(
i
+
1
)
+
'
"]
'
).
length
>
0
),
g
.
find
(
"
.controller
"
).
click
(
function
(){
var
e
=
a
(
this
),
f
=
g
.
data
(
"
group-index
"
)
+
(
e
.
hasClass
(
"
prev
"
)?
-
1
:
1
),
i
=
h
.
filter
(
'
[data-group-index="
'
+
f
+
'
"]
'
);
if
(
i
.
length
){
var
l
=
i
.
data
(
"
image
"
),
m
=
i
.
data
(
"
caption
"
);
g
.
addClass
(
"
modal-loading
"
).
data
(
"
group-index
"
,
f
).
toggleClass
(
"
lightbox-with-caption
"
,
"
string
"
==
typeof
m
).
removeClass
(
"
lightbox-full
"
),
g
.
find
(
"
.lightbox-img
"
).
attr
(
"
src
"
,
l
),
k
=
a
(
b
).
width
(),
imgReady
(
l
,
function
(){
j
.
css
({
width
:
d
.
min
(
k
,
this
.
width
)}),
k
<
this
.
width
+
30
&&
g
.
addClass
(
"
lightbox-full
"
),
c
.
ready
()})}
return
g
.
find
(
"
.prev
"
).
toggleClass
(
"
show
"
,
h
.
filter
(
'
[data-group-index="
'
+
(
f
-
1
)
+
'
"]
'
).
length
>
0
),
g
.
find
(
"
.next
"
).
toggleClass
(
"
show
"
,
h
.
filter
(
'
[data-group-index="
'
+
(
f
+
1
)
+
'
"]
'
).
length
>
0
),
!
1
})}}):
!
1
},
a
.
fn
.
lightbox
=
function
(
b
){
var
c
=
"
group
"
+
(
new
Date
).
getTime
();
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
f
=
"
object
"
==
typeof
b
&&
b
;
"
object
"
==
typeof
f
&&
f
.
group
?
d
.
attr
(
"
data-lightbox-group
"
,
f
.
group
):
d
.
data
(
"
group
"
)?
d
.
attr
(
"
data-lightbox-group
"
,
d
.
data
(
"
group
"
)):
d
.
attr
(
"
data-lightbox-group
"
,
c
),
d
.
data
(
"
group
"
,
d
.
data
(
"
lightbox-group
"
));
var
g
=
d
.
data
(
"
zui.lightbox
"
);
g
||
d
.
data
(
"
zui.lightbox
"
,
g
=
new
e
(
this
,
f
)),
"
string
"
==
typeof
b
&&
g
[
b
]()})},
a
.
fn
.
lightbox
.
Constructor
=
e
,
a
(
function
(){
a
(
'
[data-toggle="lightbox"]
'
).
lightbox
()})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
,
c
){
"
use strict
"
;
var
d
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
d
.
DEFAULTS
=
{
container
:
"
body
"
,
move
:
!
0
},
d
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
d
.
DEFAULTS
,
this
.
$
.
data
(),
b
)},
d
.
prototype
.
init
=
function
(){
this
.
handleMouseEvents
()},
d
.
prototype
.
handleMouseEvents
=
function
(){
var
b
=
this
.
$
,
d
=
this
.
options
;
b
.
mousedown
(
function
(
e
){
function
f
(
c
){
o
=!
0
;
var
e
=
c
.
pageX
,
f
=
c
.
pageY
,
g
=
{
left
:
e
-
m
.
x
,
top
:
f
-
m
.
y
};
b
.
removeClass
(
"
drag-ready
"
).
addClass
(
"
dragging
"
),
d
.
move
&&
b
.
css
(
g
),
d
.
hasOwnProperty
(
"
drag
"
)
&&
a
.
isFunction
(
d
.
drag
)
&&
d
.
drag
({
event
:
c
,
element
:
b
,
startOffset
:
m
,
pos
:
g
,
offset
:{
x
:
e
-
l
.
x
,
y
:
f
-
l
.
y
},
smallOffset
:{
x
:
e
-
n
.
x
,
y
:
f
-
n
.
y
}}),
n
.
x
=
e
,
n
.
y
=
f
,
d
.
stopPropagation
&&
c
.
stopPropagation
()}
function
g
(
e
){
if
(
a
(
c
).
unbind
(
"
mousemove
"
,
f
).
unbind
(
"
mouseup
"
,
g
),
!
o
)
return
void
b
.
removeClass
(
"
drag-ready
"
);
var
h
=
{
left
:
e
.
pageX
-
m
.
x
,
top
:
e
.
pageY
-
m
.
y
};
b
.
removeClass
(
"
drag-ready
"
).
removeClass
(
"
dragging
"
),
d
.
move
&&
b
.
css
(
h
),
d
.
hasOwnProperty
(
"
finish
"
)
&&
a
.
isFunction
(
d
.
finish
)
&&
d
.
finish
({
event
:
e
,
element
:
b
,
pos
:
h
,
offset
:{
x
:
e
.
pageX
-
l
.
x
,
y
:
e
.
pageY
-
l
.
y
},
smallOffset
:{
x
:
e
.
pageX
-
n
.
x
,
y
:
e
.
pageY
-
n
.
y
}}),
e
.
preventDefault
(),
d
.
stopPropagation
&&
e
.
stopPropagation
()}
if
(
d
.
hasOwnProperty
(
"
before
"
)
&&
a
.
isFunction
(
d
.
before
)){
var
h
=
d
.
before
({
event
:
e
,
element
:
b
});
if
(
void
0
!=
h
&&!
h
)
return
}
var
i
=
a
(
d
.
container
),
j
=
b
.
offset
(),
k
=
i
.
offset
(),
l
=
{
x
:
e
.
pageX
,
y
:
e
.
pageY
},
m
=
{
x
:
e
.
pageX
-
j
.
left
+
k
.
left
,
y
:
e
.
pageY
-
j
.
top
+
k
.
top
},
n
=
a
.
extend
({},
l
),
o
=!
1
;
b
.
addClass
(
"
drag-ready
"
),
a
(
c
).
bind
(
"
mousemove
"
,
f
).
bind
(
"
mouseup
"
,
g
),
e
.
preventDefault
(),
d
.
stopPropagation
&&
e
.
stopPropagation
()})},
a
.
fn
.
draggable
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
e
=
c
.
data
(
"
zui.draggable
"
),
f
=
"
object
"
==
typeof
b
&&
b
;
e
||
c
.
data
(
"
zui.draggable
"
,
e
=
new
d
(
this
,
f
)),
"
string
"
==
typeof
b
&&
e
[
b
]()})},
a
.
fn
.
draggable
.
Constructor
=
d
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
var
e
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
e
.
DEFAULTS
=
{
container
:
"
body
"
,
flex
:
!
1
,
deviation
:
5
,
sensorOffsetX
:
0
,
sensorOffsetY
:
0
,
nested
:
!
1
},
e
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
e
.
DEFAULTS
,
this
.
$
.
data
(),
b
)},
e
.
prototype
.
callEvent
=
function
(
b
,
c
){
return
a
.
callEvent
(
this
.
options
[
b
],
c
,
this
)},
e
.
prototype
.
init
=
function
(){
this
.
handleMouseEvents
()},
e
.
prototype
.
handleMouseEvents
=
function
(){
var
b
=
this
.
$
,
e
=
this
,
f
=
this
.
options
;
this
.
$triggerTarget
=
f
.
trigger
?(
a
.
isFunction
(
f
.
trigger
)?
f
.
trigger
(
b
):
b
.
find
(
f
.
trigger
)).
first
():
b
,
this
.
$triggerTarget
.
on
(
"
mousedown
"
,
function
(
g
){
function
h
(
c
){
var
g
=
{
left
:
c
.
pageX
,
top
:
c
.
pageY
};
if
(
!
(
d
.
abs
(
g
.
left
-
s
.
left
)
<
f
.
deviation
&&
d
.
abs
(
g
.
top
-
s
.
top
)
<
f
.
deviation
)){
if
(
null
==
n
){
var
h
=
o
.
css
(
"
position
"
);
"
absolute
"
!=
h
&&
"
relative
"
!=
h
&&
"
fixed
"
!=
h
&&
(
k
=
h
,
o
.
css
(
"
position
"
,
"
relative
"
)),
n
=
b
.
clone
().
removeClass
(
"
drag-from
"
).
addClass
(
"
drag-shadow
"
).
css
({
position
:
"
absolute
"
,
width
:
b
.
outerWidth
(),
transition
:
"
none
"
}).
appendTo
(
o
),
b
.
addClass
(
"
dragging
"
),
e
.
callEvent
(
"
start
"
,{
event
:
c
,
element
:
b
})}
var
i
=
{
left
:
g
.
left
-
u
.
left
,
top
:
g
.
top
-
u
.
top
},
j
=
{
left
:
i
.
left
-
t
.
left
,
top
:
i
.
top
-
t
.
top
};
n
.
css
(
j
);{({
left
:
g
.
left
-
v
.
left
,
top
:
g
.
top
-
v
.
top
})}
v
.
left
=
g
.
left
,
v
.
top
=
g
.
top
;
var
r
=!
1
;
p
=!
1
,
f
.
flex
||
l
.
removeClass
(
"
drop-to
"
);
var
w
=
null
;
if
(
l
.
each
(
function
(){
var
b
=
a
(
this
),
c
=
b
.
offset
(),
d
=
b
.
width
(),
e
=
b
.
height
(),
h
=
c
.
left
+
f
.
sensorOffsetX
,
i
=
c
.
top
+
f
.
sensorOffsetY
;
return
g
.
left
>
h
&&
g
.
top
>
i
&&
g
.
left
<
h
+
d
&&
g
.
top
<
i
+
e
&&
(
w
&&
w
.
removeClass
(
"
drop-to
"
),
w
=
b
,
!
f
.
nested
)?
!
1
:
void
0
}),
w
){
p
=!
0
;
var
x
=
w
.
data
(
"
id
"
);
b
.
data
(
"
id
"
)
!=
x
&&
(
q
=!
1
),(
null
==
m
||
m
.
data
(
"
id
"
)
!=
x
&&!
q
)
&&
(
r
=!
0
),
m
=
w
,
f
.
flex
&&
l
.
removeClass
(
"
drop-to
"
),
m
.
addClass
(
"
drop-to
"
)}
f
.
flex
?
null
!=
m
&&
m
.
length
&&
(
p
=!
0
):(
b
.
toggleClass
(
"
drop-in
"
,
p
),
n
.
toggleClass
(
"
drop-in
"
,
p
)),
e
.
callEvent
(
"
drag
"
,{
event
:
c
,
isIn
:
p
,
target
:
m
,
element
:
b
,
isNew
:
r
,
selfTarget
:
q
,
clickOffset
:
u
,
offset
:
i
,
position
:{
left
:
i
.
left
-
t
.
left
,
top
:
i
.
top
-
t
.
top
},
mouseOffset
:
g
})}}
function
i
(
d
){
if
(
k
&&
o
.
css
(
"
position
"
,
k
),
null
==
n
)
return
b
.
removeClass
(
"
drag-from
"
),
void
a
(
c
).
unbind
(
"
mousemove
"
,
h
).
unbind
(
"
mouseup
"
,
i
);
p
||
(
m
=
null
);
var
f
=!
0
,
g
=
{
left
:
d
.
pageX
,
top
:
d
.
pageY
},
j
=
{
left
:
g
.
left
-
u
.
left
,
top
:
g
.
top
-
u
.
top
},
r
=
{
left
:
g
.
left
-
v
.
left
,
top
:
g
.
top
-
v
.
top
};
v
.
left
=
g
.
left
,
v
.
top
=
g
.
top
;
var
s
=
{
event
:
d
,
isIn
:
p
,
target
:
m
,
element
:
b
,
isNew
:
!
q
&&
null
!=
m
,
selfTarget
:
q
,
offset
:
j
,
mouseOffset
:
g
,
position
:{
left
:
j
.
left
-
t
.
left
,
top
:
j
.
top
-
t
.
top
},
lastMouseOffset
:
v
,
moveOffset
:
r
};
f
=
e
.
callEvent
(
"
beforeDrop
"
,
s
),
f
&&
p
&&
e
.
callEvent
(
"
drop
"
,
s
),
a
(
c
).
unbind
(
"
mousemove
"
,
h
).
unbind
(
"
mouseup
"
,
i
),
l
.
removeClass
(
"
drop-to
"
),
b
.
removeClass
(
"
dragging
"
).
removeClass
(
"
drag-from
"
),
n
.
remove
(),
e
.
callEvent
(
"
finish
"
,
s
),
d
.
preventDefault
()}
if
(
f
.
hasOwnProperty
(
"
before
"
)
&&
a
.
isFunction
(
f
.
before
)){
var
j
=
f
.
before
({
event
:
g
,
element
:
b
});
if
(
void
0
!=
j
&&!
j
)
return
}
var
k
,
l
=
a
.
isFunction
(
f
.
target
)?
f
.
target
(
b
):
a
(
f
.
target
),
m
=
null
,
n
=
null
,
o
=
a
(
f
.
container
).
first
(),
p
=!
1
,
q
=!
0
,
r
=
b
.
offset
(),
s
=
{
left
:
g
.
pageX
,
top
:
g
.
pageY
},
t
=
o
.
offset
(),
u
=
({
left
:
r
.
left
-
t
.
left
,
top
:
r
.
top
-
t
.
top
},{
left
:
s
.
left
-
r
.
left
,
top
:
s
.
top
-
r
.
top
}),
v
=
{
left
:
s
.
left
,
top
:
s
.
top
};
b
.
addClass
(
"
drag-from
"
),
a
(
c
).
bind
(
"
mousemove
"
,
h
).
bind
(
"
mouseup
"
,
i
),
g
.
preventDefault
()})},
e
.
prototype
.
reset
=
function
(){
this
.
$triggerTarget
.
off
(
"
mousedown
"
),
this
.
handleMouseEvents
()},
a
.
fn
.
droppable
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.droppable
"
),
f
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.droppable
"
,
d
=
new
e
(
this
,
f
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
.
fn
.
droppable
.
Constructor
=
e
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
b
.
DEFAULTS
=
{
list
:
"
li, div
"
,
dragCssClass
:
"
invisible
"
},
b
.
prototype
.
getOptions
=
function
(
c
){
return
c
=
a
.
extend
({},
b
.
DEFAULTS
,
this
.
$
.
data
(),
c
)},
b
.
prototype
.
init
=
function
(){
this
.
bindEventToList
(
this
.
$
.
children
(
this
.
options
.
selector
))},
b
.
prototype
.
reset
=
function
(){
var
b
=
this
,
c
=
0
,
d
=
this
.
$
.
children
(
this
.
options
.
selector
);
d
.
each
(
function
(){
var
e
=
a
(
this
);
e
.
data
(
"
zui.droppable
"
)?(
e
.
data
(
"
zui.droppable
"
).
options
.
target
=
d
,
e
.
droppable
(
"
reset
"
)):
b
.
bindEventToList
(
e
),
a
(
this
).
attr
(
"
data-order
"
,
++
c
)})},
b
.
prototype
.
bindEventToList
=
function
(
b
){
function
c
(
b
){
var
c
=
0
;
b
.
each
(
function
(){
a
(
this
).
attr
(
"
data-order
"
,
++
c
)})}
var
d
=
this
.
$
,
e
=
this
.
options
;
c
(
b
),
b
.
droppable
({
trigger
:
e
.
trigger
,
target
:
d
.
children
(
e
.
selector
),
container
:
d
,
flex
:
!
0
,
start
:
function
(
a
){
e
.
dragCssClass
&&
a
.
element
.
addClass
(
e
.
dragCssClass
)},
drag
:
function
(
b
){
if
(
b
.
isIn
){
var
f
=
b
.
element
,
g
=
b
.
target
,
h
=
f
.
attr
(
"
data-order
"
),
i
=
g
.
attr
(
"
data-order
"
);
if
(
h
==
i
)
return
;
h
>
i
?
g
.
before
(
f
):
g
.
after
(
f
);
var
j
=
d
.
children
(
e
.
selector
);
c
(
j
),
a
.
callEvent
(
e
.
order
,{
list
:
j
,
element
:
f
})}},
finish
:
function
(
b
){
e
.
dragCssClass
&&
b
.
element
.
removeClass
(
e
.
dragCssClass
),
a
.
callEvent
(
e
.
finish
,{
list
:
d
.
children
(
e
.
selector
),
element
:
b
.
element
})}})},
a
.
fn
.
sortable
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
zui.sortable
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
?
"
object
"
==
typeof
c
&&
e
.
reset
():
d
.
data
(
"
zui.sortable
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
sortable
.
Constructor
=
b
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
function
e
(
b
){
var
c
=
b
.
data
(
"
url
"
);
c
&&
(
b
.
addClass
(
"
panel-loading
"
).
find
(
"
.panel-heading .icon-refresh,.panel-heading .icon-repeat
"
).
addClass
(
"
icon-spin
"
),
a
.
ajax
({
url
:
c
,
dataType
:
"
html
"
}).
done
(
function
(
a
){
b
.
find
(
"
.panel-body
"
).
html
(
a
)}).
fail
(
function
(){
b
.
addClass
(
"
panel-error
"
)}).
always
(
function
(){
b
.
removeClass
(
"
panel-loading
"
),
b
.
find
(
"
.panel-heading .icon-refresh,.panel-heading .icon-repeat
"
).
removeClass
(
"
icon-spin
"
)}))}
var
f
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
draggable
=
this
.
$
.
hasClass
(
"
dashboard-draggable
"
)
||
this
.
options
.
draggable
,
this
.
init
()};
f
.
DEFAULTS
=
{
height
:
360
},
f
.
prototype
.
getOptions
=
function
(
b
){
return
b
=
a
.
extend
({},
f
.
DEFAULTS
,
this
.
$
.
data
(),
b
)},
f
.
prototype
.
handleRemoveEvent
=
function
(){
var
b
=
this
.
options
.
afterPanelRemoved
,
c
=
this
.
options
.
panelRemovingTip
;
this
.
$
.
find
(
"
.remove-panel
"
).
click
(
function
(){
var
d
=
a
(
this
).
closest
(
"
.panel
"
),
e
=
d
.
data
(
"
name
"
)
||
d
.
find
(
"
.panel-heading
"
).
text
().
replace
(
"
\n
"
,
""
).
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
""
),
f
=
d
.
attr
(
"
data-id
"
);(
void
0
==
c
||
confirm
(
c
.
format
(
e
)))
&&
(
d
.
parent
().
remove
(),
b
&&
a
.
isFunction
(
b
)
&&
b
(
f
))})},
f
.
prototype
.
handleRefreshEvent
=
function
(){
this
.
$
.
find
(
"
.refresh-panel
"
).
click
(
function
(){
var
b
=
a
(
this
).
closest
(
"
.panel
"
);
e
(
b
)})},
f
.
prototype
.
handleDraggable
=
function
(){
var
b
=
this
.
$
,
d
=
this
.
options
.
afterOrdered
;
this
.
$
.
addClass
(
"
dashboard-draggable
"
),
this
.
$
.
find
(
"
.panel-actions
"
).
mousedown
(
function
(
a
){
a
.
preventDefault
(),
a
.
stopPropagation
()}),
this
.
$
.
find
(
"
.panel-heading
"
).
mousedown
(
function
(
e
){
function
f
(
c
){
var
d
=
k
.
data
(
"
mouseOffset
"
);
k
.
css
({
left
:
c
.
pageX
-
d
.
x
,
top
:
c
.
pageY
-
d
.
y
}),
j
.
find
(
"
.dragging-in
"
).
removeClass
(
"
dragging-in
"
);
var
e
=!
1
;
j
.
children
().
each
(
function
(){
var
d
=
a
(
this
);
if
(
d
.
hasClass
(
"
dragging-col-holder
"
))
return
e
=!
0
,
!
0
;
var
f
=
d
.
children
(
"
.panel
"
),
g
=
f
.
offset
(),
h
=
f
.
width
(),
i
=
f
.
height
(),
k
=
g
.
left
,
l
=
g
.
top
,
m
=
c
.
pageX
,
o
=
c
.
pageY
;
if
(
m
>
k
&&
o
>
l
&&
k
+
h
>
m
&&
l
+
i
>
o
){{
j
.
find
(
"
.dragging-col
"
)}
return
d
.
addClass
(
"
dragging-in
"
),
e
?
n
.
insertAfter
(
d
):
n
.
insertBefore
(
d
),
b
.
addClass
(
"
dashboard-holding
"
),
!
1
}}),
c
.
preventDefault
()}
function
g
(
e
){
var
i
=
h
.
data
(
"
order
"
);
h
.
parent
().
insertAfter
(
n
);
var
l
=
0
,
m
=
{};
j
.
children
(
"
:not(.dragging-col-holder)
"
).
each
(
function
(){
var
b
=
a
(
this
).
children
(
"
.panel
"
);
b
.
data
(
"
order
"
,
++
l
),
m
[
b
.
attr
(
"
id
"
)]
=
l
,
b
.
parent
().
attr
(
"
data-order
"
,
l
)}),
i
!=
m
[
h
.
attr
(
"
id
"
)]
&&
(
j
.
data
(
"
orders
"
,
m
),
d
&&
a
.
isFunction
(
d
)
&&
d
(
m
)),
k
.
remove
(),
b
.
removeClass
(
"
dashboard-holding
"
),
b
.
find
(
"
.dragging-col
"
).
removeClass
(
"
dragging-col
"
),
b
.
find
(
"
.panel-dragging
"
).
removeClass
(
"
panel-dragging
"
),
j
.
find
(
"
.dragging-in
"
).
removeClass
(
"
dragging-in
"
),
b
.
removeClass
(
"
dashboard-dragging
"
),
a
(
c
).
unbind
(
"
mousemove
"
,
f
).
unbind
(
"
mouseup
"
,
g
),
e
.
preventDefault
()}
var
h
=
a
(
this
).
closest
(
"
.panel
"
),
i
=
h
.
parent
(),
j
=
h
.
closest
(
"
.row
"
),
k
=
h
.
clone
().
addClass
(
"
panel-dragging-shadow
"
),
l
=
h
.
offset
(),
m
=
b
.
offset
(),
n
=
j
.
find
(
"
.dragging-col-holder
"
);
n
.
length
||
(
n
=
a
(
"
<div class='dragging-col-holder'><div class='panel'></div></div>
"
).
addClass
(
j
.
children
().
attr
(
"
class
"
)).
removeClass
(
"
dragging-col
"
).
appendTo
(
j
)),
n
.
insertBefore
(
i
).
find
(
"
.panel
"
).
replaceWith
(
h
.
clone
().
addClass
(
"
panel-dragging panel-dragging-holder
"
)),
b
.
addClass
(
"
dashboard-dragging
"
),
h
.
addClass
(
"
panel-dragging
"
).
parent
().
addClass
(
"
dragging-col
"
),
k
.
css
({
left
:
l
.
left
-
m
.
left
,
top
:
l
.
top
-
m
.
top
,
width
:
h
.
width
(),
height
:
h
.
height
()}).
appendTo
(
b
).
data
(
"
mouseOffset
"
,{
x
:
e
.
pageX
-
l
.
left
+
m
.
left
,
y
:
e
.
pageY
-
l
.
top
+
m
.
top
}),
a
(
c
).
bind
(
"
mousemove
"
,
f
).
bind
(
"
mouseup
"
,
g
),
e
.
preventDefault
()})},
f
.
prototype
.
handlePanelPadding
=
function
(){
this
.
$
.
find
(
"
.panel-body > table, .panel-body > .list-group
"
).
closest
(
"
.panel-body
"
).
addClass
(
"
no-padding
"
)},
f
.
prototype
.
handlePanelHeight
=
function
(){
var
b
=
this
.
options
.
height
;
this
.
$
.
find
(
"
.row
"
).
each
(
function
(){
var
c
=
a
(
this
),
e
=
c
.
find
(
"
.panel
"
),
f
=
c
.
data
(
"
height
"
)
||
b
;
"
number
"
!=
typeof
f
&&
(
f
=
0
,
e
.
each
(
function
(){
f
=
d
.
max
(
f
,
a
(
this
).
innerHeight
())})),
e
.
each
(
function
(){
var
b
=
a
(
this
);
b
.
find
(
"
.panel-body
"
).
css
(
"
height
"
,
f
-
b
.
find
(
"
.panel-heading
"
).
outerHeight
()
-
2
)})})},
f
.
prototype
.
init
=
function
(){
this
.
handlePanelHeight
(),
this
.
handlePanelPadding
(),
this
.
handleRemoveEvent
(),
this
.
handleRefreshEvent
(),
this
.
draggable
&&
this
.
handleDraggable
();
var
b
=
0
;
this
.
$
.
find
(
"
.panel
"
).
each
(
function
(){
var
c
=
a
(
this
);
c
.
data
(
"
order
"
,
++
b
),
c
.
attr
(
"
id
"
)
||
c
.
attr
(
"
id
"
,
"
panel
"
+
b
),
c
.
attr
(
"
data-id
"
)
||
c
.
attr
(
"
data-id
"
,
b
),
e
(
c
)})},
a
.
fn
.
dashboard
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.dashboard
"
),
e
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.dashboard
"
,
d
=
new
f
(
this
,
e
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
.
fn
.
dashboard
.
Constructor
=
f
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
b
.
DEFAULTS
=
{
auto
:
!
1
,
foldicon
:
"
icon-chevron-right
"
},
b
.
prototype
.
getOptions
=
function
(
c
){
return
c
=
a
.
extend
({},
b
.
DEFAULTS
,
this
.
$
.
data
(),
c
)},
b
.
prototype
.
init
=
function
(){
var
a
=
this
.
$
.
children
(
"
.nav
"
);
a
.
find
(
"
.nav
"
).
closest
(
"
li
"
).
addClass
(
"
nav-parent
"
),
a
.
find
(
"
.nav > li.active
"
).
closest
(
"
li
"
).
addClass
(
"
active
"
),
a
.
find
(
"
.nav-parent > a
"
).
append
(
'
<i class="
'
+
this
.
options
.
foldicon
+
'
nav-parent-fold-icon"></i>
'
),
this
.
handleFold
()},
b
.
prototype
.
handleFold
=
function
(){
var
b
=
this
.
options
.
auto
,
c
=
this
.
$
;
this
.
$
.
find
(
"
.nav-parent > a
"
).
click
(
function
(
d
){
b
&&
(
c
.
find
(
"
.nav-parent.show
"
).
find
(
"
.nav
"
).
slideUp
(
function
(){
a
(
this
).
closest
(
"
.nav-parent
"
).
removeClass
(
"
show
"
)}),
c
.
find
(
"
.icon-rotate-90
"
).
removeClass
(
"
icon-rotate-90
"
));
var
e
=
a
(
this
).
closest
(
"
.nav-parent
"
);
return
e
.
hasClass
(
"
show
"
)?(
e
.
find
(
"
.icon-rotate-90
"
).
removeClass
(
"
icon-rotate-90
"
),
e
.
find
(
"
.nav
"
).
slideUp
(
function
(){
a
(
this
).
closest
(
"
.nav-parent
"
).
removeClass
(
"
show
"
)})):(
e
.
find
(
"
.nav-parent-fold-icon
"
).
addClass
(
"
icon-rotate-90
"
),
e
.
find
(
"
.nav
"
).
slideDown
(
function
(){
a
(
this
).
closest
(
"
.nav-parent
"
).
addClass
(
"
show
"
)})),
d
.
preventDefault
(),
!
1
})},
a
.
fn
.
menu
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
zui.menu
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
zui.menu
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
menu
.
Constructor
=
b
,
a
(
function
(){
a
(
'
[data-toggle="menu"]
'
).
menu
()})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
var
e
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
isTable
=
"
TABLE
"
===
this
.
$
[
0
].
tagName
,
this
.
isTable
?
this
.
id
=
"
datatable-
"
+
(
this
.
$
.
attr
(
"
id
"
)
||
a
.
uuid
()):(
this
.
$datatable
=
this
.
$
.
addClass
(
"
datatable
"
),
this
.
$
.
attr
(
"
id
"
)?
this
.
id
=
this
.
$
.
attr
(
"
id
"
):(
this
.
id
=
"
datatable-
"
+
a
.
uuid
(),
this
.
$
.
attr
(
"
id
"
,
this
.
id
))),
this
.
getOptions
(
c
),
this
.
load
(),
this
.
render
()};
e
.
DEFAULTS
=
{
fixedHeader
:
!
0
,
checkable
:
!
0
,
checkByClickRow
:
!
0
,
checkSingleByClickRow
:
!
0
,
sortable
:
!
0
,
fixedLeftWidth
:
"
30%
"
,
fixedRightWidth
:
"
30%
"
,
flexWidth
:
"
auto
"
,
flexHeadDrag
:
!
0
,
rowHover
:
!
0
,
colHover
:
!
0
,
checkedClass
:
"
active
"
},
e
.
prototype
.
getOptions
=
function
(
b
){
var
c
=
this
.
$
,
b
=
a
.
extend
({},
e
.
DEFAULTS
,
this
.
$
.
data
(),
b
);
b
.
tableClass
||
(
b
.
tableClass
=
""
,
c
.
hasClass
(
"
table-bordered
"
)
&&
(
b
.
tableClass
+=
"
table-bordered
"
),(
c
.
hasClass
(
"
table-hover
"
)
||
b
.
rowHover
)
&&
(
b
.
tableClass
+=
"
table-hover
"
),
c
.
hasClass
(
"
table-striped
"
)
&&
(
b
.
tableClass
+=
"
table-striped
"
)),
this
.
options
=
b
},
e
.
prototype
.
load
=
function
(){
var
b
=
this
.
options
.
data
,
c
=
this
.
options
,
d
=
this
.
$
;
if
(
!
b
){
if
(
!
this
.
isTable
)
throw
new
Error
(
"
No data avaliable!
"
);
b
=
{
cols
:[],
rows
:[]};
var
e
,
f
,
g
,
h
,
i
=
b
.
cols
,
j
=
b
.
rows
;
d
.
find
(
"
thead > tr:first
"
).
children
(
"
th
"
).
each
(
function
(){
e
=
a
(
this
),
i
.
push
(
a
.
extend
({
text
:
e
.
html
(),
flex
:
!
1
||
e
.
hasClass
(
"
flex-col
"
),
width
:
"
auto
"
,
cssClass
:
e
.
attr
(
"
class
"
),
css
:
e
.
attr
(
"
style
"
),
type
:
"
string
"
,
sort
:
!
e
.
hasClass
(
"
sort-disabled
"
)},
e
.
data
()))}),
d
.
find
(
"
tbody > tr
"
).
each
(
function
(){
f
=
a
(
this
),
h
=
a
.
extend
({
data
:[],
checked
:
!
1
,
cssClass
:
f
.
attr
(
"
class
"
),
css
:
f
.
attr
(
"
style
"
),
id
:
f
.
attr
(
"
id
"
)},
f
.
data
()),
f
.
children
(
"
td
"
).
each
(
function
(){
g
=
a
(
this
),
h
.
data
.
push
(
a
.
extend
({
cssClass
:
g
.
attr
(
"
class
"
),
css
:
g
.
attr
(
"
style
"
),
text
:
g
.
html
()},
g
.
data
()))}),
j
.
push
(
h
)})}
b
.
flexStart
=-
1
,
b
.
flexEnd
=-
1
;
var
i
=
b
.
cols
;
b
.
colsLength
=
i
.
length
;
for
(
var
k
=
0
;
k
<
i
.
length
;
++
k
){
var
l
=
i
[
k
];
l
.
flex
&&
(
b
.
flexStart
<
0
&&
(
b
.
flexStart
=
k
),
b
.
flexEnd
=
k
)}
if
(
0
===
b
.
flexStart
&&
b
.
flexEnd
===
i
.
length
&&
(
b
.
flexStart
=-
1
,
b
.
flexEnd
=-
1
),
b
.
flexArea
=
b
.
flexStart
>=
0
,
b
.
fixedRight
=
b
.
flexEnd
>=
0
&&
b
.
flexEnd
<
i
.
length
,
b
.
fixedLeft
=
b
.
flexStart
>
0
,
b
.
flexStart
<
0
&&
b
.
flexEnd
<
0
&&
(
b
.
fixedLeft
=!
0
,
b
.
flexStart
=
i
.
length
,
b
.
flexEnd
=
i
.
length
),
b
.
flexArea
&&
(
void
0
==
typeof
c
.
flexWidth
||
"
auto
"
==
c
.
flexWidth
)){
for
(
var
m
=
0
,
k
=
b
.
flexStart
;
k
<=
b
.
flexEnd
;
++
k
)
i
[
k
].
flex
=!
0
,
m
+=
i
[
k
].
width
;
c
.
flexWidth
=
m
}
this
.
data
=
b
},
e
.
prototype
.
html
=
function
(){
var
b
=!
a
(
"
#
"
+
this
.
id
).
empty
().
length
,
c
=
""
,
d
=
this
.
options
,
e
=
this
.
data
,
f
=
this
.
data
.
cols
,
g
=
""
,
h
=
""
,
i
=
""
,
j
=
this
.
data
.
rows
,
k
=
'
<div class="datatable-rows-span datatable-span {0}"><table class="table
'
+
d
.
tableClass
+
'
"><tbody>{1}</tbody></table>{2}</div>
'
,
l
=
'
<div class="datatable-head-span datatable-span {0}"><table class="table
'
+
d
.
tableClass
+
'
"><thead><tr>{1}</tr></thead></table>{2}</div>
'
;
b
?
c
+=
'
<div class="datatable
'
+
(
d
.
sortable
?
"
sortable
"
:
""
)
+
'
" id="
'
+
this
.
id
+
'
">
'
:
d
.
sortable
&&
this
.
$datatable
.
addClass
(
"
sortable
"
),
c
+=
'
<div class="datatable-head">
'
;
for
(
var
m
,
n
,
o
,
p
=
0
;
p
<
f
.
length
;
++
p
)
n
=
f
[
p
],
o
=
""
,
"
undefined
"
==
typeof
n
.
sort
?
n
.
sort
=!
0
:
"
down
"
===
n
.
sort
?
o
=
"
sort-down
"
:
"
up
"
===
n
.
sort
?
o
=
"
sort-up
"
:
n
.
sort
===!
1
&&
(
o
=
"
sort-disabled
"
),
m
=
'
<th class="
'
+
(
n
.
cssClass
||
""
)
+
"
"
+
(
n
.
colClass
||
""
)
+
"
"
+
o
+
'
" data-index="
'
+
p
+
'
" data-type="
'
+
n
.
type
+
'
" style="
'
+
n
.
css
+
'
">
'
+
n
.
text
+
"
</th>
"
,
0
==
p
&&
d
.
checkable
&&
(
m
=
'
<th data-index="check" class="check-all check-btn"><i class="icon-check-empty"></i></th>
'
+
m
),
p
<
e
.
flexStart
?
g
+=
m
:
p
>=
e
.
flexStart
&&
p
<=
e
.
flexEnd
?
i
+=
m
:
p
>
e
.
flexEnd
&&
(
h
+=
m
);
e
.
fixedLeft
&&
(
c
+=
l
.
format
(
"
fixed-left
"
,
g
,
""
)),
e
.
flexArea
&&
(
c
+=
l
.
format
(
"
flexarea
"
,
i
,
'
<div class="scrolled-shadow scrolled-in-shadow"></div><div class="scrolled-shadow scrolled-out-shadow"></div>
'
)),
e
.
fixedRight
&&
(
c
+=
l
.
format
(
"
fixed-right
"
,
h
,
""
)),
c
+=
"
</div>
"
,
c
+=
'
<div class="datatable-rows">
'
;
var
q
,
r
,
p
,
s
,
t
,
u
;
g
=
""
,
h
=
""
,
i
=
""
;
for
(
var
v
=
0
;
v
<
j
.
length
;
++
v
){
for
(
r
=
j
[
v
],
t
=
r
.
cssClass
||
""
,
r
.
checked
&&
(
t
+=
"
"
+
(
d
.
checkedClass
||
""
)),
"
undefined
"
==
typeof
r
.
id
&&
(
r
.
id
=
v
),
r
.
index
=
v
,
q
=
'
<tr class="
'
+
t
+
'
" data-index="
'
+
v
+
'
" data-id="
'
+
r
.
id
+
'
">
'
,
g
+=
q
,
h
+=
q
,
i
+=
q
,
p
=
0
;
p
<
r
.
data
.
length
;
++
p
)
u
=
r
.
data
[
p
],
a
.
isPlainObject
(
u
)
||
(
u
=
{
text
:
u
},
r
.
data
[
p
]
=
u
),
s
=
'
<td data-index="
'
+
p
+
'
" data-flex="false" data-type="
'
+
f
[
p
].
type
+
'
" class="
'
+
(
u
.
cssClass
||
""
)
+
"
"
+
(
f
[
p
].
colClass
||
""
)
+
'
" style="
'
+
(
u
.
css
||
""
)
+
'
">
'
+
u
.
text
+
"
</td>
"
,
0
==
p
&&
d
.
checkable
&&
(
s
=
'
<td data-index="check" class="check-row check-btn"><i class="icon-check-empty"></i></td>
'
+
s
),
p
<
e
.
flexStart
?
g
+=
s
:
p
>=
e
.
flexStart
&&
p
<=
e
.
flexEnd
?
i
+=
s
:
p
>
e
.
flexEnd
&&
(
h
+=
s
);
g
+=
"
</tr>
"
,
h
+=
"
</tr>
"
,
i
+=
"
</tr>
"
}
return
e
.
fixedLeft
&&
(
c
+=
k
.
format
(
"
fixed-left
"
,
g
,
""
)),
e
.
flexArea
&&
(
c
+=
k
.
format
(
"
flexarea
"
,
i
,
'
<div class="scrolled-shadow scrolled-in-shadow"></div><div class="scrolled-shadow scrolled-out-shadow"></div><div class="scroll-slide"><div class="bar"></div></div>
'
)),
e
.
fixedRight
&&
(
c
+=
k
.
format
(
"
fixed-right
"
,
h
,
""
)),
c
+=
"
</div>
"
,
b
&&
(
c
+=
"
</div>
"
),
c
},
e
.
prototype
.
render
=
function
(){
this
.
isTable
?(
this
.
$
.
attr
(
"
data-datatable-id
"
,
this
.
id
).
hide
(),
this
.
$
.
after
(
this
.
html
()),
this
.
$datatable
=
a
(
"
#
"
+
this
.
id
)):
this
.
$
.
html
(
this
.
html
()),
this
.
$dataSpans
=
this
.
$datatable
.
children
(
"
.datatable-head, .datatable-rows
"
).
find
(
"
.datatable-span
"
),
this
.
$rowsSpans
=
this
.
$datatable
.
children
(
"
.datatable-rows
"
).
children
(
"
.datatable-rows-span
"
),
this
.
$headSpans
=
this
.
$datatable
.
children
(
"
.datatable-head
"
).
children
(
"
.datatable-head-span
"
),
this
.
$cells
=
this
.
$dataSpans
.
find
(
"
td, th
"
),
this
.
$dataCells
=
this
.
$cells
.
filter
(
"
td
"
),
this
.
$headCells
=
this
.
$cells
.
filter
(
"
th
"
),
this
.
$rows
=
this
.
$rowsSpans
.
find
(
"
.table > tbody > tr
"
);
var
c
=
this
.
options
,
e
=
this
,
f
=
this
.
data
,
g
=
this
.
$cells
,
h
=
this
.
$dataCells
,
i
=
(
this
.
$headCells
,
this
.
$datatable
);
if
(
c
.
rowHover
){
var
j
=
"
hover
"
;
this
.
$rowsSpans
.
on
(
"
mouseenter
"
,
"
td
"
,
function
(){
h
.
filter
(
"
.
"
+
j
).
removeClass
(
j
),
e
.
$rows
.
filter
(
"
.
"
+
j
).
removeClass
(
j
),
e
.
$rows
.
filter
(
'
[data-index="
'
+
a
(
this
).
addClass
(
j
).
closest
(
"
tr
"
).
data
(
"
index
"
)
+
'
"]
'
).
addClass
(
j
)
}).
on
(
"
mouseleave
"
,
"
td
"
,
function
(){
h
.
filter
(
"
.
"
+
j
).
removeClass
(
j
),
e
.
$rows
.
filter
(
"
.
"
+
j
).
removeClass
(
j
)})}
if
(
c
.
colHover
){
var
k
=
"
col-hover
"
;
this
.
$headSpans
.
on
(
"
mouseenter
"
,
"
th
"
,
function
(){
g
.
filter
(
"
.
"
+
k
).
removeClass
(
k
),
g
.
filter
(
'
[data-index="
'
+
a
(
this
).
data
(
"
index
"
)
+
'
"]
'
).
addClass
(
k
)}).
on
(
"
mouseleave
"
,
"
th
"
,
function
(){
g
.
filter
(
"
.
"
+
k
).
removeClass
(
k
)})}
if
(
this
.
data
.
flexArea
){
var
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
=
i
.
find
(
"
.scroll-slide
"
),
t
=
i
.
find
(
"
.datatable-span.flexarea > .table
"
),
u
=
i
.
find
(
"
.datatable-rows-span.flexarea > .table
"
),
v
=
s
.
children
(
"
.bar
"
),
w
=
e
.
id
+
"
_scrollOffset
"
,
x
=
function
(
a
,
b
){
p
=
d
.
max
(
0
,
d
.
min
(
l
-
m
,
a
)),
o
!==
p
&&
(
b
||
i
.
addClass
(
"
scrolling
"
),
v
.
css
(
"
left
"
,
p
),
r
=
0
-
d
.
floor
((
n
-
l
)
*
p
/
(
l
-
m
)),
t
.
css
(
"
left
"
,
r
),
o
=
p
,
i
.
toggleClass
(
"
scrolled-in
"
,
p
>
2
).
toggleClass
(
"
scrolled-out
"
,
l
-
m
-
2
>
p
),
store
.
pageSet
(
w
,
p
))},
y
=
function
(){
l
=
s
.
width
(),
n
=
u
.
width
(),
m
=
d
.
floor
(
l
*
l
/
n
),
v
.
css
(
"
width
"
,
m
),
u
.
css
(
"
min-width
"
,
l
),
i
.
toggleClass
(
"
show-scroll-slide
"
,
n
>
l
),
q
||
l
===
m
||
(
q
=!
0
,
x
(
store
.
pageGet
(
w
,
0
),
!
0
))};
s
.
resize
(
y
),
u
.
resize
(
y
),
y
();
var
z
=
{
move
:
!
1
,
stopPropagation
:
!
0
,
drag
:
function
(
a
){
x
(
v
.
position
().
left
+
a
.
smallOffset
.
x
*
(
a
.
element
.
hasClass
(
"
bar
"
)?
1
:
-
1
))},
finish
:
function
(){
i
.
removeClass
(
"
scrolling
"
)}};
v
.
draggable
(
z
),
c
.
flexHeadDrag
&&
i
.
find
(
"
.datatable-head-span.flexarea
"
).
draggable
(
z
),
s
.
mousedown
(
function
(
a
){
var
b
=
a
.
pageX
-
s
.
offset
().
left
;
x
(
b
-
m
/
2
)})}
if
(
c
.
checkable
){
var
A
,
B
=
e
.
id
+
"
_
"
+
E
,
C
=
c
.
checkedClass
,
D
=
function
(){
var
b
=
e
.
$rowsSpans
.
first
().
find
(
"
.table > tbody > tr
"
),
c
=
b
.
filter
(
"
.
"
+
C
),
d
=
{
checkedAll
:
b
.
length
===
c
.
length
&&
c
.
length
>
0
,
checks
:
c
.
map
(
function
(){
return
A
=
a
(
this
).
data
(
"
id
"
)}).
toArray
()};
a
.
each
(
f
.
rows
,
function
(
b
,
c
){
c
.
checked
=
a
.
inArray
(
c
.
id
,
d
.
checks
)
>-
1
}),
e
.
$headSpans
.
find
(
"
.check-all
"
).
toggleClass
(
"
checked
"
,
d
.
checkedAll
),
store
.
pageSet
(
B
,
d
)};
this
.
$rowsSpans
.
on
(
"
click
"
,
c
.
checkByClickRow
?
"
tr
"
:
"
.check-row
"
,
function
(){
e
.
$rows
.
filter
(
'
[data-index="
'
+
a
(
this
).
closest
(
"
tr
"
).
data
(
"
index
"
)
+
'
"]
'
).
toggleClass
(
C
),
D
()}),
this
.
$headSpans
.
find
(
"
.check-all
"
).
click
(
function
(){
e
.
$rows
.
toggleClass
(
C
,
a
(
this
).
toggleClass
(
"
checked
"
).
hasClass
(
"
checked
"
)),
D
()});
var
E
=
store
.
pageGet
(
B
);
E
&&
(
this
.
$headSpans
.
find
(
"
.check-all
"
).
toggleClass
(
"
checked
"
,
E
.
checkedAll
),
E
.
checkedAll
?
e
.
$rows
.
addClass
(
C
):(
e
.
$rows
.
removeClass
(
C
),
a
.
each
(
E
.
checks
,
function
(
a
,
b
){
e
.
$rows
.
filter
(
'
[data-id="
'
+
b
+
'
"]
'
).
addClass
(
C
)})))}
if
(
c
.
fixedHeader
){
var
F
,
G
,
H
,
I
=
i
.
children
(
"
.datatable-head
"
),
J
=
c
.
fixedHeaderOffset
||
a
(
"
.navbar.navbar-fixed-top
"
).
height
()
||
0
,
K
=
function
(){
H
=
a
(
b
).
scrollTop
(),
F
=
i
.
offset
().
top
,
G
=
i
.
height
(),
i
.
toggleClass
(
"
head-fixed
"
,
H
>
F
&&
F
+
G
>
H
),
i
.
hasClass
(
"
head-fixed
"
)?
I
.
css
({
width
:
i
.
width
(),
top
:
J
}):
I
.
attr
(
"
style
"
,
""
)};
a
(
b
).
scroll
(
K
),
K
()}
if
(
c
.
sortable
){
this
.
$headSpans
.
on
(
"
click
"
,
"
th:not(.sort-disabled, .check-btn)
"
,
function
(){
e
.
sortTable
(
a
(
this
))})}
this
.
refresh
()},
e
.
prototype
.
sortTable
=
function
(
b
){
var
c
=
self
.
id
+
"
_datatableSorter
"
,
d
=
store
.
pageGet
(
c
);
if
(
b
||
(
b
=
d
?
this
.
$headCells
.
filter
(
'
[data-index="
'
+
d
.
index
+
'
"]
'
).
addClass
(
"
sort-
"
+
d
.
type
):
this
.
$headCells
.
filter
(
"
.sort-up, .sort-down
"
).
first
()),
b
.
length
){
var
e
,
f
,
g
,
h
=
this
.
data
,
i
=
h
.
cols
,
j
=
h
.
rows
,
k
=
this
.
$headCells
;
e
=!
b
.
hasClass
(
"
sort-up
"
),
k
.
removeClass
(
"
sort-up sort-down
"
),
b
.
addClass
(
e
?
"
sort-up
"
:
"
sort-down
"
),
g
=
b
.
data
(
"
index
"
),
e
=
b
.
hasClass
(
"
sort-up
"
),
a
.
each
(
i
,
function
(
a
,
b
){
a
==
g
||
"
up
"
!==
b
.
sort
&&
"
down
"
!==
b
.
sort
?
a
==
g
&&
(
b
.
sort
=
e
?
"
up
"
:
"
down
"
,
f
=
b
.
type
):
b
.
sort
=!
0
});
var
l
,
m
,
n
;
j
.
sort
(
function
(
a
,
b
){
return
l
=
a
.
data
[
g
].
text
,
m
=
b
.
data
[
g
].
text
,
"
number
"
===
f
?(
l
=
parseFloat
(
l
),
m
=
parseFloat
(
m
)):
"
date
"
===
f
&&
(
l
=
Date
.
parse
(
l
),
m
=
Date
.
parse
(
m
)),
n
=
l
>
m
?
1
:
m
>
l
?
-
1
:
0
,
e
&&
(
n
=-
1
*
n
),
n
});
var
o
,
p
,
q
,
r
=
this
.
$rows
,
s
=
[];
a
.
each
(
j
,
function
(
b
,
c
){
o
=
r
.
filter
(
'
[data-index="
'
+
c
.
index
+
'
"]
'
),
o
.
each
(
function
(
b
){
q
=
a
(
this
),
p
=
s
[
b
],
p
?
p
.
after
(
q
):
q
.
parent
().
prepend
(
q
),
s
[
b
]
=
q
})}),
store
.
pageSet
(
c
,{
index
:
g
,
type
:
e
?
"
up
"
:
"
down
"
})}},
e
.
prototype
.
refresh
=
function
(){
var
a
=
this
.
$datatable
,
b
=
this
.
options
,
c
=
this
.
data
.
cols
;
a
.
find
(
"
.datatable-span.fixed-left
"
).
css
(
"
width
"
,
b
.
fixedLeftWidth
),
a
.
find
(
"
.datatable-span.fixed-right
"
).
css
(
"
width
"
,
b
.
fixedRightWidth
);
for
(
var
d
=
this
.
$cells
,
e
=
0
;
e
<
c
.
length
;
++
e
)
d
.
filter
(
'
[data-index="
'
+
e
+
'
"]
'
).
css
(
"
width
"
,
c
[
e
].
width
);
this
.
sortTable
()},
a
.
fn
.
datatable
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.datatable
"
),
f
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.datatable
"
,
d
=
new
e
(
this
,
f
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
.
fn
.
datatable
.
Constructor
=
e
}(
jQuery
,
window
,
document
,
Math
),
function
(
a
,
b
){
"
use strict
"
;
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([
"
jquery
"
],
b
):
"
object
"
==
typeof
exports
?
module
.
exports
=
b
(
require
(
"
jquery
"
)):
a
.
bootbox
=
b
(
a
.
jQuery
)}(
this
,
function
a
(
b
,
c
){
"
use strict
"
;
function
d
(){
var
a
;
if
(
"
undefined
"
!=
typeof
config
&&
config
.
clientLang
)
a
=
config
.
clientLang
;
else
{
var
c
=
b
(
"
html
"
).
attr
(
"
lang
"
);
a
=
c
?
c
:
"
en
"
}
return
a
.
replace
(
"
-
"
,
"
_
"
).
toLowerCase
()}
function
e
(
a
){
var
b
=
r
[
p
.
locale
];
return
b
?
b
[
a
]:
r
.
en
[
a
]}
function
f
(
a
,
c
,
d
){
a
.
stopPropagation
(),
a
.
preventDefault
();
var
e
=
b
.
isFunction
(
d
)
&&
d
(
a
)
===!
1
;
e
||
c
.
modal
(
"
hide
"
)}
function
g
(
a
){
var
b
,
c
=
0
;
for
(
b
in
a
)
c
++
;
return
c
}
function
h
(
a
,
c
){
var
d
=
0
;
b
.
each
(
a
,
function
(
a
,
b
){
c
(
a
,
b
,
d
++
)})}
function
i
(
a
){
var
c
,
d
;
if
(
"
object
"
!=
typeof
a
)
throw
new
Error
(
"
Please supply an object of options
"
);
if
(
!
a
.
message
)
throw
new
Error
(
"
Please specify a message
"
);
return
a
=
b
.
extend
({},
p
,
a
),
a
.
buttons
||
(
a
.
buttons
=
{}),
a
.
backdrop
=
a
.
backdrop
?
"
static
"
:
!
1
,
c
=
a
.
buttons
,
d
=
g
(
c
),
h
(
c
,
function
(
a
,
e
){
if
(
b
.
isFunction
(
e
)
&&
(
e
=
c
[
a
]
=
{
callback
:
e
}),
"
object
"
!==
b
.
type
(
e
))
throw
new
Error
(
"
button with key
"
+
a
+
"
must be an object
"
);
e
.
label
||
(
e
.
label
=
a
),
e
.
className
||
(
e
.
className
=
1
==
d
||
d
>=
2
&&
"
confirm
"
===
a
?
"
btn-primary
"
:
"
btn-default
"
)}),
a
}
function
j
(
a
,
b
){
var
c
=
a
.
length
,
d
=
{};
if
(
1
>
c
||
c
>
2
)
throw
new
Error
(
"
Invalid argument length
"
);
return
2
===
c
||
"
string
"
==
typeof
a
[
0
]?(
d
[
b
[
0
]]
=
a
[
0
],
d
[
b
[
1
]]
=
a
[
1
]):
d
=
a
[
0
],
d
}
function
k
(
a
,
c
,
d
){
return
b
.
extend
(
!
0
,{},
a
,
j
(
c
,
d
))}
function
l
(
a
,
b
,
c
,
d
){
var
e
=
{
className
:
"
bootbox-
"
+
a
,
buttons
:
m
.
apply
(
null
,
b
)};
return
n
(
k
(
e
,
d
,
c
),
b
)}
function
m
(){
for
(
var
a
=
{},
b
=
0
,
c
=
arguments
.
length
;
c
>
b
;
b
++
){
var
d
=
arguments
[
b
],
f
=
d
.
toLowerCase
(),
g
=
d
.
toUpperCase
();
a
[
f
]
=
{
label
:
e
(
g
)}}
return
a
}
function
n
(
a
,
b
){
var
d
=
{};
return
h
(
b
,
function
(
a
,
b
){
d
[
b
]
=!
0
}),
h
(
a
.
buttons
,
function
(
a
){
if
(
d
[
a
]
===
c
)
throw
new
Error
(
"
button key
"
+
a
+
"
is not allowed (options are
"
+
b
.
join
(
"
\n
"
)
+
"
)
"
)}),
a
}
var
o
=
{
dialog
:
"
<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>
"
,
header
:
"
<div class='modal-header'><h4 class='modal-title'></h4></div>
"
,
footer
:
"
<div class='modal-footer'></div>
"
,
closeButton
:
"
<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>×</button>
"
,
form
:
"
<form class='bootbox-form'></form>
"
,
inputs
:{
text
:
"
<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />
"
,
textarea
:
"
<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>
"
,
email
:
"
<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />
"
,
select
:
"
<select class='bootbox-input bootbox-input-select form-control'></select>
"
,
checkbox
:
"
<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>
"
,
date
:
"
<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />
"
,
time
:
"
<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />
"
,
number
:
"
<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />
"
,
password
:
"
<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />
"
}},
p
=
{
locale
:
d
(),
backdrop
:
!
0
,
animate
:
!
0
,
className
:
null
,
closeButton
:
!
0
,
show
:
!
0
,
container
:
"
body
"
},
q
=
{};
q
.
alert
=
function
(){
var
a
;
if
(
a
=
l
(
"
alert
"
,[
"
ok
"
],[
"
message
"
,
"
callback
"
],
arguments
),
a
.
callback
&&!
b
.
isFunction
(
a
.
callback
))
throw
new
Error
(
"
alert requires callback property to be a function when provided
"
);
return
a
.
buttons
.
ok
.
callback
=
a
.
onEscape
=
function
(){
return
b
.
isFunction
(
a
.
callback
)?
a
.
callback
():
!
0
},
q
.
dialog
(
a
)},
q
.
confirm
=
function
(){
var
a
;
if
(
a
=
l
(
"
confirm
"
,[
"
confirm
"
,
"
cancel
"
],[
"
message
"
,
"
callback
"
],
arguments
),
a
.
buttons
.
cancel
.
callback
=
a
.
onEscape
=
function
(){
return
a
.
callback
(
!
1
)},
a
.
buttons
.
confirm
.
callback
=
function
(){
return
a
.
callback
(
!
0
)},
!
b
.
isFunction
(
a
.
callback
))
throw
new
Error
(
"
confirm requires a callback
"
);
return
q
.
dialog
(
a
)},
q
.
prompt
=
function
(){
var
a
,
d
,
e
,
f
,
g
,
i
,
j
;
f
=
b
(
o
.
form
),
d
=
{
className
:
"
bootbox-prompt
"
,
buttons
:
m
(
"
confirm
"
,
"
cancel
"
),
value
:
""
,
inputType
:
"
text
"
},
a
=
n
(
k
(
d
,
arguments
,[
"
title
"
,
"
callback
"
]),[
"
cancel
"
,
"
confirm
"
]),
i
=
a
.
show
===
c
?
!
0
:
a
.
show
;
var
l
=
[
"
date
"
,
"
time
"
,
"
number
"
],
p
=
document
.
createElement
(
"
input
"
);
if
(
p
.
setAttribute
(
"
type
"
,
a
.
inputType
),
l
[
a
.
inputType
]
&&
(
a
.
inputType
=
p
.
type
),
a
.
message
=
f
,
a
.
buttons
.
cancel
.
callback
=
a
.
onEscape
=
function
(){
return
a
.
callback
(
null
)},
a
.
buttons
.
confirm
.
callback
=
function
(){
var
c
;
switch
(
a
.
inputType
){
case
"
text
"
:
case
"
textarea
"
:
case
"
email
"
:
case
"
select
"
:
case
"
date
"
:
case
"
time
"
:
case
"
number
"
:
case
"
password
"
:
c
=
g
.
val
();
break
;
case
"
checkbox
"
:
var
d
=
g
.
find
(
"
input:checked
"
);
c
=
[],
h
(
d
,
function
(
a
,
d
){
c
.
push
(
b
(
d
).
val
())})}
return
a
.
callback
(
c
)},
a
.
show
=!
1
,
!
a
.
title
)
throw
new
Error
(
"
prompt requires a title
"
);
if
(
!
b
.
isFunction
(
a
.
callback
))
throw
new
Error
(
"
prompt requires a callback
"
);
if
(
!
o
.
inputs
[
a
.
inputType
])
throw
new
Error
(
"
invalid prompt type
"
);
switch
(
g
=
b
(
o
.
inputs
[
a
.
inputType
]),
a
.
inputType
){
case
"
text
"
:
case
"
textarea
"
:
case
"
email
"
:
case
"
date
"
:
case
"
time
"
:
case
"
number
"
:
case
"
password
"
:
g
.
val
(
a
.
value
);
break
;
case
"
select
"
:
var
r
=
{};
if
(
j
=
a
.
inputOptions
||
[],
!
j
.
length
)
throw
new
Error
(
"
prompt with select requires options
"
);
h
(
j
,
function
(
a
,
d
){
var
e
=
g
;
if
(
d
.
value
===
c
||
d
.
text
===
c
)
throw
new
Error
(
"
given options in wrong format
"
);
d
.
group
&&
(
r
[
d
.
group
]
||
(
r
[
d
.
group
]
=
b
(
"
<optgroup/>
"
).
attr
(
"
label
"
,
d
.
group
)),
e
=
r
[
d
.
group
]),
e
.
append
(
"
<option value='
"
+
d
.
value
+
"
'>
"
+
d
.
text
+
"
</option>
"
)}),
h
(
r
,
function
(
a
,
b
){
g
.
append
(
b
)}),
g
.
val
(
a
.
value
);
break
;
case
"
checkbox
"
:
var
s
=
b
.
isArray
(
a
.
value
)?
a
.
value
:[
a
.
value
];
if
(
j
=
a
.
inputOptions
||
[],
!
j
.
length
)
throw
new
Error
(
"
prompt with checkbox requires options
"
);
if
(
!
j
[
0
].
value
||!
j
[
0
].
text
)
throw
new
Error
(
"
given options in wrong format
"
);
g
=
b
(
"
<div/>
"
),
h
(
j
,
function
(
c
,
d
){
var
e
=
b
(
o
.
inputs
[
a
.
inputType
]);
e
.
find
(
"
input
"
).
attr
(
"
value
"
,
d
.
value
),
e
.
find
(
"
label
"
).
append
(
d
.
text
),
h
(
s
,
function
(
a
,
b
){
b
===
d
.
value
&&
e
.
find
(
"
input
"
).
prop
(
"
checked
"
,
!
0
)}),
g
.
append
(
e
)})}
return
a
.
placeholder
&&
g
.
attr
(
"
placeholder
"
,
a
.
placeholder
),
a
.
pattern
&&
g
.
attr
(
"
pattern
"
,
a
.
pattern
),
f
.
append
(
g
),
f
.
on
(
"
submit
"
,
function
(
a
){
a
.
preventDefault
(),
a
.
stopPropagation
(),
e
.
find
(
"
.btn-primary
"
).
click
()}),
e
=
q
.
dialog
(
a
),
e
.
off
(
"
shown.bs.modal
"
),
e
.
on
(
"
shown.bs.modal
"
,
function
(){
g
.
focus
()}),
i
===!
0
&&
e
.
modal
(
"
show
"
),
e
},
q
.
dialog
=
function
(
a
){
a
=
i
(
a
);
var
c
=
b
(
o
.
dialog
),
d
=
c
.
find
(
"
.modal-dialog
"
),
e
=
c
.
find
(
"
.modal-body
"
),
g
=
a
.
buttons
,
j
=
""
,
k
=
{
onEscape
:
a
.
onEscape
};
if
(
h
(
g
,
function
(
a
,
b
){
j
+=
"
<button data-bb-handler='
"
+
a
+
"
' type='button' class='btn
"
+
b
.
className
+
"
'>
"
+
b
.
label
+
"
</button>
"
,
k
[
a
]
=
b
.
callback
}),
e
.
find
(
"
.bootbox-body
"
).
html
(
a
.
message
),
a
.
animate
===!
0
&&
c
.
addClass
(
"
fade
"
),
a
.
className
&&
c
.
addClass
(
a
.
className
),
"
large
"
===
a
.
size
&&
d
.
addClass
(
"
modal-lg
"
),
"
small
"
===
a
.
size
&&
d
.
addClass
(
"
modal-sm
"
),
a
.
title
&&
e
.
before
(
o
.
header
),
a
.
closeButton
){
var
l
=
b
(
o
.
closeButton
);
a
.
title
?
c
.
find
(
"
.modal-header
"
).
prepend
(
l
):
l
.
css
(
"
margin-top
"
,
"
-10px
"
).
prependTo
(
e
)}
return
a
.
title
&&
c
.
find
(
"
.modal-title
"
).
html
(
a
.
title
),
j
.
length
&&
(
e
.
after
(
o
.
footer
),
c
.
find
(
"
.modal-footer
"
).
html
(
j
)),
c
.
on
(
"
hidden.bs.modal
"
,
function
(
a
){
a
.
target
===
this
&&
c
.
remove
()}),
c
.
on
(
"
shown.bs.modal
"
,
function
(){
c
.
find
(
"
.btn-primary:first
"
).
focus
()}),
c
.
on
(
"
escape.close.bb
"
,
function
(
a
){
k
.
onEscape
&&
f
(
a
,
c
,
k
.
onEscape
)}),
c
.
on
(
"
click
"
,
"
.modal-footer button
"
,
function
(
a
){
var
d
=
b
(
this
).
data
(
"
bb-handler
"
);
f
(
a
,
c
,
k
[
d
])}),
c
.
on
(
"
click
"
,
"
.bootbox-close-button
"
,
function
(
a
){
f
(
a
,
c
,
k
.
onEscape
)}),
c
.
on
(
"
keyup
"
,
function
(
a
){
27
===
a
.
which
&&
c
.
trigger
(
"
escape.close.bb
"
)}),
b
(
a
.
container
).
append
(
c
),
c
.
modal
({
backdrop
:
a
.
backdrop
,
keyboard
:
!
1
,
show
:
!
1
}),
a
.
show
&&
c
.
modal
(
"
show
"
),
c
},
q
.
setDefaults
=
function
(){
var
a
=
{};
2
===
arguments
.
length
?
a
[
arguments
[
0
]]
=
arguments
[
1
]:
a
=
arguments
[
0
],
b
.
extend
(
p
,
a
)},
q
.
hideAll
=
function
(){
b
(
"
.bootbox
"
).
modal
(
"
hide
"
)};
var
r
=
{
en
:{
OK
:
"
OK
"
,
CANCEL
:
"
Cancel
"
,
CONFIRM
:
"
OK
"
},
zh_cn
:{
OK
:
"
好的
"
,
CANCEL
:
"
取消
"
,
CONFIRM
:
"
确认
"
},
zh_tw
:{
OK
:
"
好的
"
,
CANCEL
:
"
取消
"
,
CONFIRM
:
"
確認
"
}};
return
q
.
init
=
function
(
c
){
return
a
(
c
||
b
)},
q
}),
+
function
(
a
,
b
){
"
use strict
"
;
function
c
(){
this
.
show
=
function
(
b
,
c
,
f
,
g
,
h
){
a
(
"
.messager
"
).
hide
(),
d
++
,
c
=
c
||
"
default
"
,
g
=
g
||
2
e3
,
h
=
h
||
"
body
"
,
f
=
f
||
"
top
"
;
var
i
=
a
(
e
.
format
({
message
:
b
,
type
:
c
,
placement
:
f
,
id
:
d
})).
appendTo
(
h
);
return
i
.
find
(
"
.close-messager
"
).
click
(
function
(){
a
(
this
).
closest
(
"
.messager
"
).
fadeOut
()}),(
"
top
"
==
f
||
"
bottom
"
==
f
)
&&
i
.
css
(
"
left
"
,(
a
(
h
).
width
()
-
i
.
width
()
-
50
)
/
2
),
i
.
fadeIn
(),
setTimeout
(
function
(){
a
(
"
#messager
"
+
d
).
fadeOut
(
function
(){
a
(
this
).
remove
()})},
g
),
i
},
this
.
primary
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
a
,
"
primary
"
,
b
,
c
,
d
)},
this
.
success
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
'
<i class="icon-ok-sign icon"></i>
'
+
a
,
"
success
"
,
b
,
c
,
d
)},
this
.
info
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
'
<i class="icon-info-sign icon"></i>
'
+
a
,
"
info
"
,
b
,
c
,
d
)},
this
.
warning
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
'
<i class="icon-warning-sign icon"></i>
'
+
a
,
"
warning
"
,
b
,
c
,
d
)},
this
.
danger
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
'
<i class="icon-exclamation-sign icon"></i>
'
+
a
,
"
danger
"
,
b
,
c
,
d
)},
this
.
important
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
a
,
"
important
"
,
b
,
c
,
d
)},
this
.
special
=
function
(
a
,
b
,
c
,
d
){
return
this
.
show
(
a
,
"
special
"
,
b
,
c
,
d
)}}
var
d
=
0
,
e
=
'
<div class="messager messager-{type} {placement}" id="messager{id}" style="display:none"><div class="messager-content">{message}</div><button class="close-messager">×</button></div>
'
,
f
=
new
c
;
b
.
messager
=
f
}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
if
(
!
a
.
fn
.
droppable
)
throw
new
Error
(
"
droppable requires for boards
"
);
var
b
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
getLang
(),
this
.
init
()};
b
.
DEFAULTS
=
{
lang
:
"
zh-cn
"
,
langs
:{
"
zh-cn
"
:{
appendToTheEnd
:
"
移动到末尾
"
},
"
zh-tw
"
:{
appendToTheEnd
:
"
移动到末尾
"
},
en
:{
appendToTheEnd
:
"
Move to the end.
"
}}},
b
.
prototype
.
getOptions
=
function
(
c
){
return
c
=
a
.
extend
({},
b
.
DEFAULTS
,
this
.
$
.
data
(),
c
)},
b
.
prototype
.
getLang
=
function
(){
if
(
!
this
.
options
.
lang
){
if
(
"
undefined
"
!=
typeof
config
&&
config
.
clientLang
)
this
.
options
.
lang
=
config
.
clientLang
;
else
{
var
c
=
a
(
"
html
"
).
attr
(
"
lang
"
);
this
.
options
.
lang
=
c
?
c
:
"
en
"
}
this
.
options
.
lang
=
this
.
options
.
lang
.
replace
(
/-/
,
"
_
"
).
toLowerCase
()}
this
.
lang
=
this
.
options
.
langs
[
this
.
options
.
lang
]
||
this
.
options
.
langs
[
b
.
DEFAULTS
.
lang
]},
b
.
prototype
.
init
=
function
(){
var
b
=
1
,
c
=
this
.
lang
;
this
.
$
.
find
(
'
.board-item:not(".disable-drop"), .board:not(".disable-drop")
'
).
each
(
function
(){
var
d
=
a
(
this
);
d
.
attr
(
"
id
"
)?
d
.
attr
(
"
data-id
"
,
d
.
attr
(
"
id
"
)):
d
.
attr
(
"
data-id
"
)
||
d
.
attr
(
"
data-id
"
,
"
board
"
+
b
++
),
d
.
hasClass
(
"
board
"
)
&&
d
.
find
(
"
.board-list
"
).
append
(
'
<div class="board-item board-item-empty"><i class="icon-plus"></i> {appendToTheEnd}</div>
'
.
format
(
c
)).
append
(
'
<div class="board-item board-item-shadow"></div>
'
.
format
(
c
))}),
this
.
bind
()},
b
.
prototype
.
bind
=
function
(
b
){
var
c
=
this
.
$
,
d
=
this
.
options
;
"
undefined
"
==
typeof
b
&&
(
b
=
c
.
find
(
'
.board-item:not(".disable-drop, .board-item-shadow")
'
)),
b
.
droppable
({
target
:
'
.board-item:not(".disable-drop, .board-item-shadow")
'
,
flex
:
!
0
,
start
:
function
(
a
){
c
.
addClass
(
"
dragging
"
).
find
(
"
.board-item-shadow
"
).
height
(
a
.
element
.
outerHeight
())},
drag
:
function
(
a
){
if
(
c
.
find
(
"
.board.drop-in-empty
"
).
removeClass
(
"
drop-in-empty
"
),
a
.
isIn
){
var
b
=
a
.
target
.
closest
(
"
.board
"
).
addClass
(
"
drop-in
"
),
d
=
b
.
find
(
"
.board-item-shadow
"
),
e
=
a
.
target
;
c
.
addClass
(
"
drop-in
"
).
find
(
"
.board.drop-in
"
).
not
(
b
).
removeClass
(
"
drop-in
"
),
d
.
insertBefore
(
e
),
b
.
toggleClass
(
"
drop-in-empty
"
,
e
.
hasClass
(
"
board-item-empty
"
))}},
drop
:
function
(
b
){
b
.
isNew
&&
(
d
.
hasOwnProperty
(
"
drop
"
)
&&
a
.
isFunction
(
d
.
drop
)
&&
d
.
drop
(
b
),
b
.
element
.
insertBefore
(
b
.
target
))},
finish
:
function
(){
c
.
removeClass
(
"
dragging
"
).
removeClass
(
"
drop-in
"
).
find
(
"
.board.drop-in
"
).
removeClass
(
"
drop-in
"
)}})},
a
.
fn
.
boards
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
zui.boards
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
zui.boards
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
boards
.
Constructor
=
b
,
a
(
function
(){
a
(
'
[data-toggle="boards"]
'
).
boards
()})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
function
b
(
c
,
d
){
var
e
,
f
=
a
.
proxy
(
this
.
process
,
this
);
this
.
$element
=
a
(
a
(
c
).
is
(
"
body
"
)?
window
:
c
),
this
.
$body
=
a
(
"
body
"
),
this
.
$scrollElement
=
this
.
$element
.
on
(
"
scroll.bs.scroll-spy.data-api
"
,
f
),
this
.
options
=
a
.
extend
({},
b
.
DEFAULTS
,
d
),
this
.
selector
||
(
this
.
selector
=
(
this
.
options
.
target
||
(
e
=
a
(
c
).
attr
(
"
href
"
))
&&
e
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
""
)
||
""
)
+
"
.nav li > a
"
),
this
.
offsets
=
a
([]),
this
.
targets
=
a
([]),
this
.
activeTarget
=
null
,
this
.
refresh
(),
this
.
process
()}
b
.
DEFAULTS
=
{
offset
:
10
},
b
.
prototype
.
refresh
=
function
(){
var
b
=
this
.
$element
[
0
]
==
window
?
"
offset
"
:
"
position
"
;
this
.
offsets
=
a
([]),
this
.
targets
=
a
([]);{
var
c
=
this
;
this
.
$body
.
find
(
this
.
selector
).
map
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
target
"
)
||
d
.
attr
(
"
href
"
),
f
=
/^#./
.
test
(
e
)
&&
a
(
e
);
return
f
&&
f
.
length
&&
f
.
is
(
"
:visible
"
)
&&
[[
f
[
b
]().
top
+
(
!
a
.
isWindow
(
c
.
$scrollElement
.
get
(
0
))
&&
c
.
$scrollElement
.
scrollTop
()),
e
]]
||
null
}).
sort
(
function
(
a
,
b
){
return
a
[
0
]
-
b
[
0
]}).
each
(
function
(){
c
.
offsets
.
push
(
this
[
0
]),
c
.
targets
.
push
(
this
[
1
])})}},
b
.
prototype
.
process
=
function
(){
var
a
,
b
=
this
.
$scrollElement
.
scrollTop
()
+
this
.
options
.
offset
,
c
=
this
.
$scrollElement
[
0
].
scrollHeight
||
this
.
$body
[
0
].
scrollHeight
,
d
=
c
-
this
.
$scrollElement
.
height
(),
e
=
this
.
offsets
,
f
=
this
.
targets
,
g
=
this
.
activeTarget
;
if
(
b
>=
d
)
return
g
!=
(
a
=
f
.
last
()[
0
])
&&
this
.
activate
(
a
);
if
(
g
&&
b
<=
e
[
0
])
return
g
!=
(
a
=
f
[
0
])
&&
this
.
activate
(
a
);
for
(
a
=
e
.
length
;
a
--
;)
g
!=
f
[
a
]
&&
b
>=
e
[
a
]
&&
(
!
e
[
a
+
1
]
||
b
<=
e
[
a
+
1
])
&&
this
.
activate
(
f
[
a
])},
b
.
prototype
.
activate
=
function
(
b
){
this
.
activeTarget
=
b
,
a
(
this
.
selector
).
parentsUntil
(
this
.
options
.
target
,
"
.active
"
).
removeClass
(
"
active
"
);
var
c
=
this
.
selector
+
'
[data-target="
'
+
b
+
'
"],
'
+
this
.
selector
+
'
[href="
'
+
b
+
'
"]
'
,
d
=
a
(
c
).
parents
(
"
li
"
).
addClass
(
"
active
"
);
d
.
parent
(
"
.dropdown-menu
"
).
length
&&
(
d
=
d
.
closest
(
"
li.dropdown
"
).
addClass
(
"
active
"
)),
d
.
trigger
(
"
activate.bs.scrollspy
"
)};
var
c
=
a
.
fn
.
scrollspy
;
a
.
fn
.
scrollspy
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
bs.scrollspy
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
bs.scrollspy
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
scrollspy
.
Constructor
=
b
,
a
.
fn
.
scrollspy
.
noConflict
=
function
(){
return
a
.
fn
.
scrollspy
=
c
,
this
},
a
(
window
).
on
(
"
load
"
,
function
(){
a
(
'
[data-spy="scroll"]
'
).
each
(
function
(){
var
b
=
a
(
this
);
b
.
scrollspy
(
b
.
data
())})})}(
jQuery
),
+
function
(
a
,
b
,
c
,
d
){
"
use strict
"
;
var
e
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
initOptions
(
c
),
this
.
init
()};
e
.
DEFAULTS
=
{
coverColor
:
"
#000
"
,
coverOpacity
:.
6
,
fixedRatio
:
!
1
,
defaultWidth
:
128
,
defaultHeight
:
128
,
minWidth
:
48
,
minHeight
:
48
},
e
.
prototype
.
callEvent
=
function
(
b
,
c
){
return
a
.
callEvent
(
this
.
options
[
b
],
c
)},
e
.
prototype
.
initOptions
=
function
(
b
){
this
.
options
=
a
.
extend
({},
e
.
DEFAULTS
,
this
.
$
.
data
(),
b
),
this
.
options
.
coverOpacityIE
=
100
*
this
.
options
.
coverOpacity
,
this
.
clipWidth
=
this
.
options
.
defaultWidth
,
this
.
clipHeight
=
this
.
options
.
defaultHeight
},
e
.
prototype
.
init
=
function
(){
this
.
initDom
(),
this
.
initSize
(),
this
.
bindEvents
()},
e
.
prototype
.
initDom
=
function
(){
this
.
$canvas
=
this
.
$
.
children
(
"
.canvas
"
),
this
.
$img
=
this
.
$canvas
.
children
(
"
img
"
),
this
.
$actions
=
this
.
$
.
children
(
"
.actions
"
),
this
.
$btn
=
this
.
$
.
find
(
"
.img-cutter-submit
"
),
this
.
$preview
=
this
.
$
.
find
(
"
.img-cutter-preview
"
),
this
.
options
.
img
=
this
.
$img
.
attr
(
"
src
"
),
this
.
$canvas
.
append
(
'
<div class="cover" style="background: {coverColor}; opacity: {coverOpacity}; filter:alpha(opacity={coverOpacityIE});"></div><div class="controller" style="width: {defaultWidth}px; height: {defaultHeight}px"><div class="control" data-direction="top"></div><div class="control" data-direction="right"></div><div class="control" data-direction="bottom"></div><div class="control" data-direction="left"></div><div class="control" data-direction="top-left"></div><div class="control" data-direction="top-right"></div><div class="control" data-direction="bottom-left"></div><div class="control" data-direction="bottom-right"></div></div><div class="cliper"><img src="{img}"/></div>
'
.
format
(
this
.
options
)),
this
.
$cover
=
this
.
$canvas
.
children
(
"
.cover
"
),
this
.
$controller
=
this
.
$canvas
.
children
(
"
.controller
"
),
this
.
$cliper
=
this
.
$canvas
.
children
(
"
.cliper
"
),
this
.
$chipImg
=
this
.
$cliper
.
children
(
"
img
"
),
this
.
options
.
fixedRatio
&&
this
.
$
.
addClass
(
"
fixed-ratio
"
)},
e
.
prototype
.
initSize
=
function
(){
var
a
=
this
;
"
undefined
"
==
typeof
a
.
imgWidth
&&
imgReady
(
a
.
options
.
img
,
function
(){
a
.
imgWidth
=
this
.
width
,
a
.
imgHeight
=
this
.
height
,
a
.
callEvent
(
"
ready
"
)});
var
b
=
setInterval
(
function
(){
"
undefined
"
!=
typeof
a
.
imgWidth
&&
(
clearInterval
(
b
),
a
.
width
=
d
.
min
(
a
.
imgWidth
,
a
.
$
.
width
()),
a
.
$canvas
.
css
(
"
width
"
,
this
.
width
),
a
.
$cliper
.
css
(
"
width
"
,
this
.
width
),
a
.
height
=
a
.
$canvas
.
height
(),
"
undefined
"
==
typeof
a
.
left
&&
(
a
.
left
=
d
.
floor
((
a
.
width
-
a
.
$controller
.
width
())
/
2
),
a
.
top
=
d
.
floor
((
a
.
height
-
a
.
$controller
.
height
())
/
2
)),
a
.
refreshSize
())},
0
)},
e
.
prototype
.
refreshSize
=
function
(
a
){
var
b
=
this
.
options
;
this
.
clipWidth
=
d
.
max
(
b
.
minWidth
,
d
.
min
(
this
.
width
,
this
.
clipWidth
)),
this
.
clipHeight
=
d
.
max
(
b
.
minHeight
,
d
.
min
(
this
.
height
,
this
.
clipHeight
)),
b
.
fixedRatio
&&
(
a
&&
"
height
"
===
a
?(
this
.
clipWidth
=
d
.
max
(
b
.
minWidth
,
d
.
min
(
this
.
width
,
this
.
clipHeight
*
b
.
defaultWidth
/
b
.
defaultHeight
)),
this
.
clipHeight
=
this
.
clipWidth
*
b
.
defaultHeight
/
b
.
defaultWidth
):(
this
.
clipHeight
=
d
.
max
(
b
.
minHeight
,
d
.
min
(
this
.
height
,
this
.
clipWidth
*
b
.
defaultHeight
/
b
.
defaultWidth
)),
this
.
clipWidth
=
this
.
clipHeight
*
b
.
defaultWidth
/
b
.
defaultHeight
)),
this
.
left
=
d
.
min
(
this
.
width
-
this
.
clipWidth
,
d
.
max
(
0
,
this
.
left
)),
this
.
top
=
d
.
min
(
this
.
height
-
this
.
clipHeight
,
d
.
max
(
0
,
this
.
top
)),
this
.
right
=
this
.
left
+
this
.
clipWidth
,
this
.
bottom
=
this
.
top
+
this
.
clipHeight
,
this
.
$controller
.
css
({
left
:
this
.
left
,
top
:
this
.
top
,
width
:
this
.
clipWidth
,
height
:
this
.
clipHeight
}),
this
.
$cliper
.
css
(
"
clip
"
,
"
rect({0}px {1}px {2}px {3}px
"
.
format
(
this
.
top
,
this
.
left
+
this
.
clipWidth
,
this
.
top
+
this
.
clipHeight
,
this
.
left
)),
this
.
callEvent
(
"
change
"
,{
top
:
this
.
top
,
left
:
this
.
left
,
bottom
:
this
.
bottom
,
right
:
this
.
right
,
width
:
this
.
clipWidth
,
height
:
this
.
clipHeight
})},
e
.
prototype
.
bindEvents
=
function
(){
var
b
=
this
,
c
=
this
.
options
;
this
.
$
.
resize
(
a
.
proxy
(
this
.
initSize
,
this
)),
this
.
$btn
.
hover
(
function
(){
b
.
$
.
toggleClass
(
"
hover
"
)}).
click
(
function
(){
var
d
=
{
originWidth
:
b
.
imgWidth
,
originHeight
:
b
.
imgHeight
,
width
:
b
.
width
,
height
:
b
.
height
,
left
:
b
.
left
,
top
:
b
.
top
,
right
:
b
.
right
,
bottom
:
b
.
bottom
,
scaled
:
b
.
imgWidth
!=
b
.
width
||
b
.
imgHeight
!=
b
.
height
};
if
(
b
.
callEvent
(
"
before
"
,
d
)){
var
e
=
c
.
post
||
c
.
get
||
c
.
url
||
null
;
null
!=
e
&&
a
.
ajax
({
type
:
c
.
post
?
"
POST
"
:
"
GET
"
,
url
:
e
,
data
:
d
}).
done
(
function
(
a
){
b
.
callEvent
(
"
done
"
,
a
)}).
fail
(
function
(
a
){
b
.
callEvent
(
"
fail
"
,
a
)}).
always
(
function
(
a
){
b
.
callEvent
(
"
always
"
,
a
)})}}),
this
.
$controller
.
draggable
({
move
:
!
1
,
container
:
this
.
$canvas
,
drag
:
function
(
a
){
b
.
left
+=
a
.
smallOffset
.
x
,
b
.
top
+=
a
.
smallOffset
.
y
,
b
.
refreshSize
()}}),
this
.
$controller
.
children
(
"
.control
"
).
draggable
({
move
:
!
1
,
container
:
this
.
$canvas
,
stopPropagation
:
!
0
,
drag
:
function
(
a
){
var
e
=
a
.
element
.
data
(
"
direction
"
),
f
=
a
.
smallOffset
,
g
=!
1
;
switch
(
e
){
case
"
left
"
:
case
"
top-left
"
:
case
"
bottom-left
"
:
b
.
left
+=
f
.
x
,
b
.
left
=
d
.
min
(
b
.
right
-
c
.
minWidth
,
d
.
max
(
0
,
b
.
left
)),
b
.
clipWidth
=
b
.
right
-
b
.
left
;
break
;
case
"
right
"
:
case
"
top-right
"
:
case
"
bottom-right
"
:
b
.
clipWidth
+=
f
.
x
,
b
.
clipWidth
=
d
.
min
(
b
.
width
-
b
.
left
,
d
.
max
(
c
.
minWidth
,
b
.
clipWidth
))}
switch
(
e
){
case
"
top
"
:
case
"
top-left
"
:
case
"
top-right
"
:
b
.
top
+=
f
.
y
,
b
.
top
=
d
.
min
(
b
.
bottom
-
c
.
minHeight
,
d
.
max
(
0
,
b
.
top
)),
b
.
clipHeight
=
b
.
bottom
-
b
.
top
,
g
=!
0
;
break
;
case
"
bottom
"
:
case
"
bottom-left
"
:
case
"
bottom-right
"
:
b
.
clipHeight
+=
f
.
y
,
b
.
clipHeight
=
d
.
min
(
b
.
height
-
b
.
top
,
d
.
max
(
c
.
minHeight
,
b
.
clipHeight
)),
g
=!
0
}
b
.
refreshSize
(
g
)}})},
a
.
fn
.
imgCutter
=
function
(
b
){
return
this
.
each
(
function
(){
var
c
=
a
(
this
),
d
=
c
.
data
(
"
zui.imgCutter
"
),
f
=
"
object
"
==
typeof
b
&&
b
;
d
||
c
.
data
(
"
zui.imgCutter
"
,
d
=
new
e
(
this
,
f
)),
"
string
"
==
typeof
b
&&
d
[
b
]()})},
a
.
fn
.
imgCutter
.
Constructor
=
e
,
a
(
function
(){
a
(
'
[data-toggle="imgCutter"]
'
).
imgCutter
()})}(
jQuery
,
window
,
document
,
Math
),
+
function
(
a
){
"
use strict
"
;
var
b
=
function
(
b
,
c
){
this
.
$
=
a
(
b
),
this
.
options
=
this
.
getOptions
(
c
),
this
.
init
()};
b
.
DEFAULTS
=
{
trigger
:
"
toggle
"
,
selector
:
null
,
animate
:
"
slide
"
,
easing
:
"
linear
"
,
animateSpeed
:
"
fast
"
,
events
:
"
click
"
,
preventDefault
:
!
0
,
cancelBubble
:
!
0
,
target
:
null
},
b
.
prototype
.
getOptions
=
function
(
c
){
return
c
=
a
.
extend
({},
b
.
DEFAULTS
,
this
.
$
.
data
(),
c
)},
b
.
prototype
.
init
=
function
(){
this
.
bindEvents
()},
b
.
prototype
.
bindEvents
=
function
(){
var
b
=
this
.
options
;
if
(
this
.
bindTrigger
(
b
),
a
.
isArray
(
b
.
triggers
))
for
(
var
c
in
b
.
triggers
)
this
.
bindTrigger
(
a
.
extend
({},
b
,
b
.
triggers
[
c
]));
else
if
(
"
string
"
==
typeof
b
.
triggers
){
var
d
=
b
.
triggers
.
split
(
"
|
"
);
for
(
var
c
in
d
){
var
e
=
d
[
c
].
split
(
"
,
"
,
4
);
if
(
!
(
e
.
length
<
2
)){
var
f
=
{};
e
[
0
]
&&
(
f
.
events
=
e
[
0
]),
e
[
1
]
&&
(
f
.
trigger
=
e
[
1
]),
e
[
2
]
&&
(
f
.
target
=
e
[
2
]),
e
[
3
]
&&
(
f
.
data
=
e
[
3
]),
this
.
bindTrigger
(
a
.
extend
({},
b
,
f
))}}}},
b
.
prototype
.
bindTrigger
=
function
(
b
){
var
c
=
this
;
c
.
$
.
on
(
b
.
events
,
b
.
selector
,
function
(
d
){
var
e
=
b
.
target
&&
"
self
"
!=
b
.
target
?
a
(
b
.
target
):
c
.
$
,
f
=
{
event
:
d
,
element
:
this
,
target
:
e
,
options
:
b
};
if
(
a
.
callEvent
(
b
.
before
,
f
,
c
)){
if
(
a
.
isFunction
(
b
.
trigger
))
a
.
callEvent
(
b
.
trigger
,
f
,
c
);
else
{
var
g
=
b
.
trigger
;
switch
(
"
toggle
"
===
g
&&
(
g
=
e
.
hasClass
(
"
hide
"
)?
"
show
"
:
"
hide
"
),
g
){
case
"
toggle
"
:
e
.
toggle
();
break
;
case
"
show
"
:
var
h
=
{
duration
:
b
.
animateSpeed
,
easing
:
b
.
easing
};
e
.
removeClass
(
"
hide
"
),
"
slide
"
===
b
.
animate
?
e
.
slideDown
(
h
):
"
fade
"
===
b
.
animate
?
e
.
fadeIn
(
h
):
e
.
show
(
h
);
break
;
case
"
hide
"
:
var
h
=
{
duration
:
b
.
animateSpeed
,
easing
:
b
.
easing
,
complete
:
function
(){
e
.
addClass
(
"
hide
"
)}};
"
slide
"
===
b
.
animate
?
e
.
slideUp
(
h
):
"
fade
"
===
b
.
animate
?
e
.
fadeOut
(
h
):
e
.
hide
(
h
);
break
;
case
"
addClass
"
:
case
"
removeClass
"
:
case
"
toggleClass
"
:
e
[
g
](
b
.
data
)}}
a
.
callEvent
(
b
.
after
,
f
,
c
),
b
.
preventDefault
&&
d
.
preventDefault
(),
b
.
cancelBubble
&&
d
.
stopPropagation
()}})},
a
.
fn
.
autoTrigger
=
function
(
c
){
return
this
.
each
(
function
(){
var
d
=
a
(
this
),
e
=
d
.
data
(
"
zui.autoTrigger
"
),
f
=
"
object
"
==
typeof
c
&&
c
;
e
||
d
.
data
(
"
zui.autoTrigger
"
,
e
=
new
b
(
this
,
f
)),
"
string
"
==
typeof
c
&&
e
[
c
]()})},
a
.
fn
.
autoTrigger
.
Constructor
=
b
,
a
(
function
(){
a
(
'
[data-toggle="autoTrigger"]
'
).
autoTrigger
(),
a
(
'
[data-toggle="toggle"]
'
).
autoTrigger
(),
a
(
'
[data-toggle="show"]
'
).
autoTrigger
({
trigger
:
"
show
"
}),
a
(
'
[data-toggle="hide"]
'
).
autoTrigger
({
trigger
:
"
hide
"
}),
a
(
'
[data-toggle="addClass"]
'
).
autoTrigger
({
trigger
:
"
addClass
"
}),
a
(
'
[data-toggle="removeClass"]
'
).
autoTrigger
({
trigger
:
"
removeClass
"
}),
a
(
'
[data-toggle="toggleClass"]
'
).
autoTrigger
({
trigger
:
"
toggleClass
"
})})}(
jQuery
,
window
,
document
,
Math
);
\ No newline at end of file
src/js/datatable.js
浏览文件 @
c3e47472
...
...
@@ -560,11 +560,7 @@
var
$th
,
sortdown
;
this
.
$headSpans
.
on
(
'
click
'
,
'
th:not(.sort-disabled, .check-btn)
'
,
function
()
{
$th
=
$
(
this
);
sortdown
=
$th
.
hasClass
(
'
sort-down
'
);
$headCells
.
removeClass
(
'
sort-up sort-down
'
);
$th
.
addClass
(
sortdown
?
'
sort-up
'
:
'
sort-down
'
);
self
.
sortTable
(
$th
);
self
.
sortTable
(
$
(
this
));
});
}
...
...
@@ -573,17 +569,39 @@
DataTable
.
prototype
.
sortTable
=
function
(
$th
)
{
var
sorterStoreName
=
self
.
id
+
'
_
'
+
'
datatableSorter
'
;
var
sorter
=
store
.
pageGet
(
sorterStoreName
);
if
(
!
$th
)
{
if
(
sorter
)
{
$th
=
this
.
$headCells
.
filter
(
'
[data-index="
'
+
sorter
.
index
+
'
"]
'
).
addClass
(
'
sort-
'
+
sorter
.
type
);
}
else
{
$th
=
this
.
$headCells
.
filter
(
'
.sort-up, .sort-down
'
).
first
();
}
}
if
(
!
$th
.
length
)
{
return
;
}
var
data
=
this
.
data
;
var
cols
=
data
.
cols
,
rows
=
data
.
rows
,
$headCells
=
this
.
$headCells
,
sortUp
,
type
,
sortCol
,
index
;
if
(
!
$th
)
{
$th
=
this
.
$headCells
.
find
(
'
.sort-up, .sort-down
'
).
first
(
);
}
sortUp
=
!
$th
.
hasClass
(
'
sort-up
'
);
$headCells
.
removeClass
(
'
sort-up sort-down
'
);
$th
.
addClass
(
sortUp
?
'
sort-up
'
:
'
sort-down
'
);
index
=
$th
.
data
(
'
index
'
);
sortUp
=
$th
.
hasClass
(
'
sort-up
'
);
...
...
@@ -644,6 +662,9 @@
lastRows
[
rIdx
]
=
$r
;
});
});
// save sort with local storage
store
.
pageSet
(
sorterStoreName
,
{
index
:
index
,
type
:
sortUp
?
'
up
'
:
'
down
'
});
}
DataTable
.
prototype
.
refresh
=
function
()
...
...
@@ -660,6 +681,8 @@
{
$cells
.
filter
(
'
[data-index="
'
+
i
+
'
"]
'
).
css
(
'
width
'
,
cols
[
i
].
width
);
}
this
.
sortTable
();
}
$
.
fn
.
datatable
=
function
(
option
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录