切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Karson
4 years ago
提交
dfd326a6e17ebdf1701abafd459a18c1b8a73f11
1 个父辈
ebb5d344
修复多选全部移除后输入框的宽度BUG
优化SelectPage初始化样式
隐藏空白字符变更
内嵌
并排对比
正在显示
8 个修改的文件
包含
168 行增加
和
1 行删除
public/assets/css/backend.css
public/assets/css/backend.min.css
public/assets/css/frontend.css
public/assets/css/frontend.min.css
public/assets/js/require-backend.min.js
public/assets/js/require-frontend.min.js
public/assets/less/backend.less
public/assets/less/frontend.less
public/assets/css/backend.css
查看文件 @
dfd326a
...
...
@@ -173,6 +173,24 @@ select.selectpicker[multiple] option {
}
}
}
input
.selectpage
{
color
:
transparent
;
pointer-events
:
none
;
}
.sp_container
input
.selectpage
{
color
:
inherit
;
pointer-events
:
inherit
;
padding-left
:
12px
;
padding-right
:
12px
;
}
.sp_container
.sp_element_box
input
.selectpage
{
padding-left
:
0
;
padding-right
:
0
;
}
.sp_container
.sp_element_box
li
:first-child
input
.selectpage
{
padding-left
:
9px
;
padding-right
:
9px
;
}
.img-center
{
margin
:
0
auto
;
display
:
inline
;
...
...
public/assets/css/backend.min.css
查看文件 @
dfd326a
此 diff 太大无法显示。
public/assets/css/frontend.css
查看文件 @
dfd326a
...
...
@@ -89,6 +89,63 @@ body {
.input-group
>
.msg-box.n-right
{
position
:
absolute
;
}
.bootstrap-select
.status
{
background
:
#f0f0f0
;
clear
:
both
;
color
:
#999
;
font-size
:
12px
;
font-weight
:
500
;
line-height
:
1
;
margin-bottom
:
-5px
;
padding
:
10px
20px
;
}
select
.bs-select-hidden
,
select
.selectpicker
{
display
:
inherit
!important
;
max-height
:
31px
;
overflow
:
hidden
;
}
select
.bs-select-hidden
[
multiple
],
select
.selectpicker
[
multiple
]
{
height
:
31px
;
padding
:
0
;
background
:
#f4f4f4
;
}
select
.bs-select-hidden
[
multiple
]
option
,
select
.selectpicker
[
multiple
]
option
{
color
:
#f4f4f4
;
zoom
:
1
;
filter
:
alpha
(
opacity
=
0
);
-webkit-opacity
:
0
;
-moz-opacity
:
0
;
opacity
:
0
;
}
@media
not
all
and
(
min-resolution
:
0.001dpcm
)
{
@supports
(
-webkit-appearance
:
none
)
{
select
.bs-select-hidden
[
multiple
],
select
.selectpicker
[
multiple
]
{
visibility
:
hidden
;
}
}
}
input
.selectpage
{
color
:
transparent
;
pointer-events
:
none
;
}
.sp_container
input
.selectpage
{
color
:
inherit
;
pointer-events
:
inherit
;
padding-left
:
12px
;
padding-right
:
12px
;
}
.sp_container
.sp_element_box
input
.selectpage
{
padding-left
:
0
;
padding-right
:
0
;
}
.sp_container
.sp_element_box
li
:first-child
input
.selectpage
{
padding-left
:
9px
;
padding-right
:
9px
;
}
/*修复radio和checkbox样式对齐*/
.radio
>
label
,
.checkbox
>
label
{
...
...
public/assets/css/frontend.min.css
查看文件 @
dfd326a
此 diff 太大无法显示。
public/assets/js/require-backend.min.js
查看文件 @
dfd326a
此 diff 太大无法显示。
public/assets/js/require-frontend.min.js
查看文件 @
dfd326a
...
...
@@ -14,4 +14,4 @@ c=c?c:Config.upload.uploadurl,c=Fast.api.fixurl(c);var y=!1,v=Config.upload.chun
t
(
".selectpage"
,
e
).
size
()
>
0
&&
(
require
([
"selectpage"
],
function
(){
t
(
".selectpage"
,
e
).
selectPage
({
eAjaxSuccess
:
function
(
t
){
return
t
.
list
=
"undefined"
!=
typeof
t
.
rows
?
t
.
rows
:
"undefined"
!=
typeof
t
.
list
?
t
.
list
:[],
t
.
totalRow
=
"undefined"
!=
typeof
t
.
total
?
t
.
total
:
"undefined"
!=
typeof
t
.
totalRow
?
t
.
totalRow
:
t
.
list
.
length
,
t
}})}),
t
(
document
).
on
(
"change"
,
".sp_hidden"
,
function
(){
t
(
this
).
trigger
(
"validate"
)}),
t
(
document
).
on
(
"change"
,
".sp_input"
,
function
(){
t
(
this
).
closest
(
".sp_container"
).
find
(
".sp_hidden"
).
trigger
(
"change"
)}),
t
(
e
).
on
(
"reset"
,
function
(){
setTimeout
(
function
(){
t
(
".selectpage"
,
e
).
selectPageClear
()},
1
)}))},
cxselect
:
function
(
e
){
t
(
"[data-toggle='cxselect']"
,
e
).
size
()
>
0
&&
require
([
"cxselect"
],
function
(){
t
.
cxSelect
.
defaults
.
jsonName
=
"name"
,
t
.
cxSelect
.
defaults
.
jsonValue
=
"value"
,
t
.
cxSelect
.
defaults
.
jsonSpace
=
"data"
,
t
(
"[data-toggle='cxselect']"
,
e
).
cxSelect
()})},
citypicker
:
function
(
e
){
t
(
"[data-toggle='city-picker']"
,
e
).
size
()
>
0
&&
require
([
"citypicker"
],
function
(){
t
(
e
).
on
(
"reset"
,
function
(){
setTimeout
(
function
(){
t
(
"[data-toggle='city-picker']"
).
citypicker
(
"refresh"
)},
1
)})})},
datetimepicker
:
function
(
e
){
t
(
".datetimepicker"
,
e
).
size
()
>
0
&&
require
([
"bootstrap-datetimepicker"
],
function
(){
var
n
=
{
format
:
"YYYY-MM-DD HH:mm:ss"
,
icons
:{
time
:
"fa fa-clock-o"
,
date
:
"fa fa-calendar"
,
up
:
"fa fa-chevron-up"
,
down
:
"fa fa-chevron-down"
,
previous
:
"fa fa-chevron-left"
,
next
:
"fa fa-chevron-right"
,
today
:
"fa fa-history"
,
clear
:
"fa fa-trash"
,
close
:
"fa fa-remove"
},
showTodayButton
:
!
0
,
showClose
:
!
0
};
t
(
".datetimepicker"
,
e
).
parent
().
css
(
"position"
,
"relative"
),
t
(
".datetimepicker"
,
e
).
datetimepicker
(
n
).
on
(
"dp.change"
,
function
(
e
){
t
(
this
,
document
).
trigger
(
"changed"
)})})},
daterangepicker
:
function
(
e
){
t
(
".datetimerange"
,
e
).
size
()
>
0
&&
require
([
"bootstrap-daterangepicker"
],
function
(){
var
n
=
{};
n
[
__
(
"Today"
)]
=
[
Moment
().
startOf
(
"day"
),
Moment
().
endOf
(
"day"
)],
n
[
__
(
"Yesterday"
)]
=
[
Moment
().
subtract
(
1
,
"days"
).
startOf
(
"day"
),
Moment
().
subtract
(
1
,
"days"
).
endOf
(
"day"
)],
n
[
__
(
"Last 7 Days"
)]
=
[
Moment
().
subtract
(
6
,
"days"
).
startOf
(
"day"
),
Moment
().
endOf
(
"day"
)],
n
[
__
(
"Last 30 Days"
)]
=
[
Moment
().
subtract
(
29
,
"days"
).
startOf
(
"day"
),
Moment
().
endOf
(
"day"
)],
n
[
__
(
"This Month"
)]
=
[
Moment
().
startOf
(
"month"
),
Moment
().
endOf
(
"month"
)],
n
[
__
(
"Last Month"
)]
=
[
Moment
().
subtract
(
1
,
"month"
).
startOf
(
"month"
),
Moment
().
subtract
(
1
,
"month"
).
endOf
(
"month"
)];
var
i
=
{
timePicker
:
!
1
,
autoUpdateInput
:
!
1
,
timePickerSeconds
:
!
0
,
timePicker24Hour
:
!
0
,
autoApply
:
!
0
,
locale
:{
format
:
"YYYY-MM-DD HH:mm:ss"
,
customRangeLabel
:
__
(
"Custom Range"
),
applyLabel
:
__
(
"Apply"
),
cancelLabel
:
__
(
"Clear"
)},
ranges
:
n
},
o
=
function
(
e
,
n
){
t
(
this
.
element
).
val
(
e
.
format
(
this
.
locale
.
format
)
+
" - "
+
n
.
format
(
this
.
locale
.
format
)),
t
(
this
.
element
).
trigger
(
"blur"
)};
t
(
".datetimerange"
,
e
).
each
(
function
(){
var
e
=
"function"
==
typeof
t
(
this
).
data
(
"callback"
)?
t
(
this
).
data
(
"callback"
):
o
;
t
(
this
).
on
(
"apply.daterangepicker"
,
function
(
t
,
n
){
e
.
call
(
n
,
n
.
startDate
,
n
.
endDate
)}),
t
(
this
).
on
(
"cancel.daterangepicker"
,
function
(
e
,
n
){
t
(
this
).
val
(
""
).
trigger
(
"blur"
)}),
t
(
this
).
daterangepicker
(
t
.
extend
(
!
0
,
i
,
t
(
this
).
data
()),
e
)})})},
plupload
:
function
(
t
){
o
.
events
.
faupload
(
t
)},
faupload
:
function
(
e
){
t
(
".plupload,.faupload"
,
e
).
size
()
>
0
&&
n
.
api
.
upload
(
t
(
".plupload,.faupload"
,
e
))},
faselect
:
function
(
e
){
t
(
".faselect,.fachoose"
,
e
).
size
()
>
0
&&
t
(
".faselect,.fachoose"
,
e
).
on
(
"click"
,
function
(){
var
e
=
this
,
n
=!!
t
(
this
).
data
(
"multiple"
)
&&
t
(
this
).
data
(
"multiple"
),
i
=
t
(
this
).
data
(
"mimetype"
)?
t
(
this
).
data
(
"mimetype"
):
""
,
o
=
t
(
this
).
data
(
"admin-id"
)?
t
(
this
).
data
(
"admin-id"
):
""
,
a
=
t
(
this
).
data
(
"user-id"
)?
t
(
this
).
data
(
"user-id"
):
""
,
r
=
t
(
this
).
data
(
"url"
)?
t
(
this
).
data
(
"url"
):
"undefined"
!=
typeof
Backend
?
"general/attachment/select"
:
"user/attachment"
;
return
parent
.
Fast
.
api
.
open
(
r
+
"?element_id="
+
t
(
this
).
attr
(
"id"
)
+
"&multiple="
+
n
+
"&mimetype="
+
i
+
"&admin_id="
+
o
+
"&user_id="
+
a
,
__
(
"Choose"
),{
callback
:
function
(
n
){
var
i
=
t
(
"#"
+
t
(
e
).
attr
(
"id"
)),
o
=
t
(
i
).
data
(
"maxcount"
),
a
=
t
(
i
).
data
(
"input-id"
)?
t
(
i
).
data
(
"input-id"
):
""
;
if
(
o
=
"undefined"
!=
typeof
o
?
o
:
0
,
a
&&
n
.
multiple
){
var
r
=
[],
s
=
t
(
"#"
+
a
),
l
=
t
.
trim
(
s
.
val
());
""
!==
l
&&
r
.
push
(
s
.
val
()),
r
.
push
(
n
.
url
);
var
c
=
r
.
join
(
","
);
if
(
o
>
0
){
var
d
=
""
===
l
?
0
:
l
.
split
(
/
\,
/
).
length
,
u
=
""
!==
n
.
url
?
n
.
url
.
split
(
/
\,
/
):[],
p
=
o
-
d
;
if
(
u
.
length
>
p
)
return
Toastr
.
error
(
__
(
"You can choose up to %d file%s"
,
p
)),
!
1
}
s
.
val
(
c
).
trigger
(
"change"
).
trigger
(
"validate"
)}
else
t
(
"#"
+
a
).
val
(
n
.
url
).
trigger
(
"change"
).
trigger
(
"validate"
)}}),
!
1
})},
fieldlist
:
function
(
e
){
t
(
".fieldlist"
,
e
).
size
()
>
0
&&
require
([
"dragsort"
,
"template"
],
function
(
n
,
i
){
var
a
=
function
(
n
){
var
i
=
{},
o
=
t
(
"textarea[name='"
+
n
+
"']"
,
e
),
a
=
t
(
".fieldlist[data-name='"
+
n
+
"']"
),
r
=
a
.
data
(
"template"
);
t
.
each
(
t
(
"input,select,textarea"
,
a
).
serializeArray
(),
function
(
t
,
e
){
var
n
=
/
\[(\w
+
)\]\[(\w
+
)\]
$/g
,
o
=
n
.
exec
(
e
.
name
);
return
!
o
||
(
o
[
1
]
=
"x"
+
parseInt
(
o
[
1
]),
"undefined"
==
typeof
i
[
o
[
1
]]
&&
(
i
[
o
[
1
]]
=
{}),
void
(
i
[
o
[
1
]][
o
[
2
]]
=
e
.
value
))});
var
s
=
r
?[]:{};
t
.
each
(
i
,
function
(
t
,
e
){
e
&&
(
r
?
s
.
push
(
e
):
""
!=
e
.
key
&&
(
s
[
e
.
key
]
=
e
.
value
))}),
o
.
val
(
JSON
.
stringify
(
s
))};
t
(
document
).
on
(
"change keyup changed"
,
".fieldlist input,.fieldlist textarea,.fieldlist select"
,
function
(){
a
(
t
(
this
).
closest
(
".fieldlist"
).
data
(
"name"
))}),
t
(
".fieldlist"
,
e
).
on
(
"click"
,
".btn-append,.append"
,
function
(
e
,
n
){
var
a
=
t
(
this
).
closest
(
".fieldlist"
),
r
=
a
.
data
(
"tag"
)
||
"dd"
,
s
=
a
.
data
(
"index"
),
l
=
a
.
data
(
"name"
),
c
=
a
.
data
(
"template"
),
d
=
a
.
data
();
s
=
s
?
parseInt
(
s
):
0
,
a
.
data
(
"index"
,
s
+
1
),
n
=
n
?
n
:{};
var
u
=
{
index
:
s
,
name
:
l
,
data
:
d
,
row
:
n
},
p
=
c
?
i
(
c
,
u
):
i
.
render
(
o
.
config
.
fieldlisttpl
,
u
);
t
(
p
).
insertBefore
(
t
(
r
+
":last"
,
a
)),
t
(
this
).
trigger
(
"fa.event.appendfieldlist"
,
t
(
this
).
closest
(
r
).
prev
())}),
t
(
".fieldlist"
,
e
).
on
(
"click"
,
".btn-remove"
,
function
(){
var
e
=
t
(
this
).
closest
(
".fieldlist"
),
n
=
e
.
data
(
"tag"
)
||
"dd"
;
t
(
this
).
closest
(
n
).
remove
(),
a
(
e
.
data
(
"name"
))}),
t
(
".fieldlist"
,
e
).
each
(
function
(){
var
n
=
this
,
i
=
t
(
this
).
data
(
"tag"
)
||
"dd"
;
t
(
this
).
dragsort
({
itemSelector
:
i
,
dragSelector
:
".btn-dragsort"
,
dragEnd
:
function
(){
a
(
t
(
this
).
closest
(
".fieldlist"
).
data
(
"name"
))},
placeHolderTemplate
:
t
(
"<"
+
i
+
"/>"
)});
var
o
=
t
(
"textarea[name='"
+
t
(
this
).
data
(
"name"
)
+
"']"
,
e
);
if
(
""
==
o
.
val
())
return
!
0
;
var
r
=
t
(
this
).
data
(
"template"
),
s
=
{};
try
{
s
=
JSON
.
parse
(
o
.
val
())}
catch
(
t
){}
t
.
each
(
s
,
function
(
e
,
i
){
t
(
".btn-append,.append"
,
n
).
trigger
(
"click"
,
r
?
i
:{
key
:
e
,
value
:
i
})})})})},
switcher
:
function
(
e
){
e
.
on
(
"click"
,
"[data-toggle='switcher']"
,
function
(){
if
(
t
(
this
).
hasClass
(
"disabled"
))
return
!
1
;
var
e
=
t
.
proxy
(
function
(){
var
e
=
t
(
this
).
prev
(
"input"
);
if
(
e
=
t
(
this
).
data
(
"input-id"
)?
t
(
"#"
+
t
(
this
).
data
(
"input-id"
)):
e
,
e
.
size
()
>
0
){
var
n
=
t
(
this
).
data
(
"yes"
),
i
=
t
(
this
).
data
(
"no"
);
e
.
val
()
==
n
?(
e
.
val
(
i
),
t
(
"i"
,
this
).
addClass
(
"fa-flip-horizontal text-gray"
)):(
e
.
val
(
n
),
t
(
"i"
,
this
).
removeClass
(
"fa-flip-horizontal text-gray"
)),
e
.
trigger
(
"change"
)}},
this
);
return
"undefined"
!=
typeof
t
(
this
).
data
(
"confirm"
)?
Layer
.
confirm
(
t
(
this
).
data
(
"confirm"
),
function
(
t
){
e
(),
Layer
.
close
(
t
)}):
e
(),
!
1
})},
bindevent
:
function
(
t
){},
slider
:
function
(
e
){
t
(
".slider"
,
e
).
size
()
>
0
&&
require
([
"bootstrap-slider"
],
function
(){
t
(
".slider"
).
removeClass
(
"hidden"
).
css
(
"width"
,
function
(
e
,
n
){
return
t
(
this
).
parents
(
".form-control"
).
width
()}).
slider
().
on
(
"slide"
,
function
(
e
){
var
n
=
t
(
this
).
data
();
"undefined"
!=
typeof
n
.
unit
&&
t
(
this
).
parents
(
".form-control"
).
siblings
(
".value"
).
text
(
e
.
value
+
n
.
unit
)})})}},
api
:
{
submit
:
function
(
e
,
n
,
i
,
o
){
if
(
0
===
e
.
size
())
return
Toastr
.
error
(
"表单未初始化完成,无法提交"
),
!
1
;
if
(
"function"
==
typeof
o
&&!
1
===
o
.
call
(
e
,
n
,
i
))
return
!
1
;
var
a
=
e
.
attr
(
"method"
)?
e
.
attr
(
"method"
).
toUpperCase
():
"GET"
;
a
=!
a
||
"GET"
!==
a
&&
"POST"
!==
a
?
"GET"
:
a
,
url
=
e
.
attr
(
"action"
),
url
=
url
?
url
:
location
.
href
;
var
r
=
{},
s
=
t
(
"[name$='[]']"
,
e
);
if
(
s
.
size
()
>
0
){
var
l
=
e
.
serializeArray
().
map
(
function
(
e
){
return
t
(
e
).
prop
(
"name"
)});
t
.
each
(
s
,
function
(
e
,
n
){
l
.
indexOf
(
t
(
this
).
prop
(
"name"
))
<
0
&&
(
r
[
t
(
this
).
prop
(
"name"
)]
=
""
)})}
return
Fast
.
api
.
ajax
({
type
:
a
,
url
:
url
,
data
:
e
.
serialize
()
+
(
Object
.
keys
(
r
).
length
>
0
?
"&"
+
t
.
param
(
r
):
""
),
dataType
:
"json"
,
complete
:
function
(
e
){
var
n
=
e
.
getResponseHeader
(
"__token__"
);
n
&&
t
(
"input[name='__token__']"
).
val
(
n
)}},
function
(
i
,
o
){
if
(
t
(
".form-group"
,
e
).
removeClass
(
"has-feedback has-success has-error"
),
i
&&
"object"
==
typeof
i
&&
(
"undefined"
!=
typeof
i
.
token
&&
t
(
"input[name='__token__']"
).
val
(
i
.
token
),
"undefined"
!=
typeof
i
.
callback
&&
"function"
==
typeof
i
.
callback
&&
i
.
callback
.
call
(
e
,
i
)),
"function"
==
typeof
n
&&!
1
===
n
.
call
(
e
,
i
,
o
))
return
!
1
},
function
(
n
,
o
){
if
(
n
&&
"object"
==
typeof
n
&&
"undefined"
!=
typeof
n
.
token
&&
t
(
"input[name='__token__']"
).
val
(
n
.
token
),
"function"
==
typeof
i
&&!
1
===
i
.
call
(
e
,
n
,
o
))
return
!
1
}),
!
0
},
bindevent
:
function
(
e
,
n
,
i
,
a
){
e
=
"object"
==
typeof
e
?
e
:
t
(
e
);
var
r
=
o
.
events
;
r
.
bindevent
(
e
),
r
.
validator
(
e
,
n
,
i
,
a
),
r
.
selectpicker
(
e
),
r
.
daterangepicker
(
e
),
r
.
selectpage
(
e
),
r
.
cxselect
(
e
),
r
.
citypicker
(
e
),
r
.
datetimepicker
(
e
),
r
.
faupload
(
e
),
r
.
faselect
(
e
),
r
.
fieldlist
(
e
),
r
.
slider
(
e
),
r
.
switcher
(
e
)},
custom
:
{}}};
return
o
}),
!
function
(
t
){
"use strict"
;
var
e
=
[],
n
=
t
.
fn
.
bootstrapTable
.
utils
.
sprintf
,
i
=
function
(
e
,
i
){
var
a
=
o
(
e
,
i
),
r
=
n
(
'<div class="commonsearch-table %s">'
,
i
.
options
.
searchFormVisible
?
""
:
"hidden"
);
r
+=
a
,
r
+=
"</div>"
,
i
.
$container
.
prepend
(
t
(
r
)),
i
.
$commonsearch
=
t
(
".commonsearch-table"
,
i
.
$container
);
var
s
=
t
(
"form.form-commonsearch"
,
i
.
$commonsearch
);
require
([
"form"
],
function
(
t
){
t
.
api
.
bindevent
(
s
),
s
.
validator
(
"destroy"
)}),
s
.
on
(
"submit"
,
function
(
t
){
return
t
.
preventDefault
(),
i
.
onCommonSearch
(),
!
1
}),
s
.
on
(
"click"
,
"button[type=reset]"
,
function
(
t
){
s
[
0
].
reset
(),
setTimeout
(
function
(){
i
.
onCommonSearch
()},
0
)})},
o
=
function
(
i
,
o
){
if
(
o
.
options
.
searchFormTemplate
)
return
Template
(
o
.
options
.
searchFormTemplate
,{
columns
:
i
,
table
:
o
});
var
s
=
[];
s
.
push
(
n
(
'<form class="form-horizontal form-commonsearch" novalidate method="post" action="%s" >'
,
o
.
options
.
actionForm
)),
s
.
push
(
"<fieldset>"
),
o
.
options
.
titleForm
.
length
>
0
&&
s
.
push
(
n
(
"<legend>%s</legend>"
,
o
.
options
.
titleForm
)),
s
.
push
(
'<div class="row">'
);
for
(
var
l
in
i
){
var
c
=
i
[
l
];
if
(
!
c
.
checkbox
&&
"operate"
!==
c
.
field
&&
c
.
searchable
&&
c
.
operate
!==!
1
){
var
d
=
Fast
.
api
.
query
(
c
.
field
),
u
=
Fast
.
api
.
query
(
c
.
field
+
"-operate"
),
p
=
o
.
options
.
renderDefault
&&
(
"undefined"
==
typeof
c
.
renderDefault
||
c
.
renderDefault
);
c
.
defaultValue
=
p
&&
d
?
d
:
"undefined"
==
typeof
c
.
defaultValue
?
""
:
c
.
defaultValue
,
c
.
operate
=
p
&&
u
?
u
:
"undefined"
==
typeof
c
.
operate
?
"="
:
c
.
operate
,
e
.
push
(
c
),
s
.
push
(
'<div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">'
),
s
.
push
(
n
(
'<label for="%s" class="control-label col-xs-4">%s</label>'
,
c
.
field
,
c
.
title
)),
s
.
push
(
'<div class="col-xs-8">'
),
c
.
operate
=
c
.
operate
?
c
.
operate
.
toUpperCase
():
"="
,
s
.
push
(
n
(
'<input type="hidden" class="form-control operate" name="%s-operate" data-name="%s" value="%s" readonly>'
,
c
.
field
,
c
.
field
,
c
.
operate
));
var
h
=
"undefined"
==
typeof
c
.
addClass
?
"undefined"
==
typeof
c
.
addclass
?
"form-control"
:
"form-control "
+
c
.
addclass
:
"form-control "
+
c
.
addClass
,
f
=
"undefined"
==
typeof
c
.
extend
?
""
:
c
.
extend
,
m
=
"undefined"
==
typeof
c
.
style
?
""
:
n
(
'style="%s"'
,
c
.
style
);
if
(
f
=
"undefined"
!=
typeof
c
.
data
&&
""
==
f
?
c
.
data
:
f
,
c
.
searchList
)
if
(
"function"
==
typeof
c
.
searchList
)
s
.
push
(
c
.
searchList
.
call
(
this
,
c
));
else
{
var
g
=
[
n
(
'<option value="">%s</option>'
,
o
.
options
.
formatCommonChoose
())];
"object"
==
typeof
c
.
searchList
&&
"function"
==
typeof
c
.
searchList
.
then
?
!
function
(
e
,
n
){
t
.
when
(
e
.
searchList
).
done
(
function
(
i
){
var
o
=
[];
i
.
data
&&
i
.
data
.
searchlist
&&
t
.
isArray
(
i
.
data
.
searchlist
)?
o
=
i
.
data
.
searchlist
:
i
.
constructor
!==
Array
&&
i
.
constructor
!==
Object
||
(
o
=
i
);
var
a
=
r
(
o
,
e
,
n
);
t
(
"form.form-commonsearch select[name='"
+
e
.
field
+
"']"
,
n
.
$container
).
html
(
a
.
join
(
""
)).
trigger
(
"change"
)})}(
c
,
o
):
g
=
r
(
c
.
searchList
,
c
,
o
),
s
.
push
(
n
(
'<select class="%s" name="%s" %s %s>%s</select>'
,
h
,
c
.
field
,
m
,
f
,
g
.
join
(
""
)))}
else
{
var
y
=
"undefined"
==
typeof
c
.
placeholder
?
c
.
title
:
c
.
placeholder
,
v
=
"undefined"
==
typeof
c
.
type
?
"text"
:
c
.
type
,
b
=
"undefined"
==
typeof
c
.
defaultValue
?
""
:
c
.
defaultValue
;
if
(
/BETWEEN$/
.
test
(
c
.
operate
)){
var
x
=
b
.
toString
().
match
(
/
\|
/
)?
b
.
split
(
"|"
):[
""
,
""
],
w
=
y
.
toString
().
match
(
/
\|
/
)?
y
.
split
(
"|"
):[
y
,
y
];
s
.
push
(
'<div class="row row-between">'
),
s
.
push
(
n
(
'<div class="col-xs-6"><input type="%s" class="%s" name="%s" value="%s" placeholder="%s" id="%s-min" data-index="%s" %s %s></div>'
,
v
,
h
,
c
.
field
,
x
[
0
],
w
[
0
],
c
.
field
,
l
,
m
,
f
)),
s
.
push
(
n
(
'<div class="col-xs-6"><input type="%s" class="%s" name="%s" value="%s" placeholder="%s" id="%s-max" data-index="%s" %s %s></div>'
,
v
,
h
,
c
.
field
,
x
[
1
],
w
[
1
],
c
.
field
,
l
,
m
,
f
)),
s
.
push
(
"</div>"
)}
else
s
.
push
(
n
(
'<input type="%s" class="%s" name="%s" value="%s" placeholder="%s" id="%s" data-index="%s" %s %s>'
,
v
,
h
,
c
.
field
,
b
,
y
,
c
.
field
,
l
,
m
,
f
))}
s
.
push
(
"</div>"
),
s
.
push
(
"</div>"
)}}
return
s
.
push
(
'<div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">'
),
s
.
push
(
a
(
o
).
join
(
""
)),
s
.
push
(
"</div>"
),
s
.
push
(
"</div>"
),
s
.
push
(
"</fieldset>"
),
s
.
push
(
"</form>"
),
s
.
join
(
""
)},
a
=
function
(
t
){
var
e
=
[],
i
=
t
.
options
.
formatCommonSubmitButton
(),
o
=
t
.
options
.
formatCommonResetButton
();
return
e
.
push
(
'<div class="col-sm-8 col-xs-offset-4">'
),
e
.
push
(
n
(
'<button type="submit" class="btn btn-success" formnovalidate>%s</button> '
,
i
)),
e
.
push
(
n
(
'<button type="reset" class="btn btn-default" >%s</button> '
,
o
)),
e
.
push
(
"</div>"
),
e
},
r
=
function
(
e
,
i
,
o
){
var
a
=
e
.
constructor
===
Array
,
r
=
[];
return
r
.
push
(
n
(
'<option value="">%s</option>'
,
o
.
options
.
formatCommonChoose
())),
t
.
each
(
e
,
function
(
t
,
e
){
e
.
constructor
===
Object
?(
t
=
e
.
id
,
e
=
e
.
name
):
t
=
a
?
e
:
t
,
r
.
push
(
n
(
"<option value='"
+
t
+
"' %s>"
+
e
+
"</option>"
,
t
==
i
.
defaultValue
?
"selected"
:
""
))}),
r
},
s
=
function
(
t
){
return
!
(
!
t
.
options
.
commonSearch
||
"server"
!=
t
.
options
.
sidePagination
||!
t
.
options
.
url
)},
l
=
function
(
n
,
i
){
var
o
=
{},
a
=
{},
r
=
""
;
return
t
(
"form.form-commonsearch .operate"
,
n
.
$commonsearch
).
each
(
function
(
s
){
var
l
=
t
(
this
).
data
(
"name"
),
c
=
t
(
this
).
is
(
"select"
)?
t
(
"option:selected"
,
this
).
val
():
t
(
this
).
val
().
toUpperCase
(),
d
=
t
(
"[name='"
+
l
+
"']"
,
n
.
$commonsearch
);
if
(
0
==
d
.
size
())
return
!
0
;
var
u
=
e
[
s
],
p
=!
n
.
options
.
searchFormTemplate
&&
u
&&
"function"
==
typeof
u
.
process
?
u
.
process
:
null
;
if
(
d
.
size
()
>
1
)
if
(
/BETWEEN$/
.
test
(
c
)){
var
h
=
t
.
trim
(
t
(
"[name='"
+
l
+
"']:first"
,
n
.
$commonsearch
).
val
()),
f
=
t
.
trim
(
t
(
"[name='"
+
l
+
"']:last"
,
n
.
$commonsearch
).
val
());
h
.
length
||
f
.
length
?(
p
&&
(
h
=
p
(
h
,
"begin"
),
f
=
p
(
f
,
"end"
)),
r
=
h
+
","
+
f
):
r
=
""
,
t
(
"[name='"
+
l
+
"']:first"
,
n
.
$commonsearch
).
hasClass
(
"datetimepicker"
)
&&
(
c
=
"RANGE"
)}
else
r
=
t
(
"[name='"
+
l
+
"']:checked"
,
n
.
$commonsearch
).
val
(),
r
=
p
?
p
(
r
):
r
;
else
r
=
p
?
p
(
d
.
val
()):
d
.
val
();
return
!
(
!
i
||!
(
""
==
r
||
null
==
r
||
t
.
isArray
(
r
)
&&
0
==
r
.
length
)
||
c
.
match
(
/null/i
))
||
(
o
[
l
]
=
c
,
void
(
a
[
l
]
=
r
))}),{
op
:
o
,
filter
:
a
}},
c
=
function
(
e
,
n
,
i
){
return
e
.
filter
=
"Object"
==
typeof
e
.
filter
?
e
.
filter
:
e
.
filter
?
JSON
.
parse
(
e
.
filter
):{},
e
.
op
=
"Object"
==
typeof
e
.
op
?
e
.
op
:
e
.
op
?
JSON
.
parse
(
e
.
op
):{},
e
.
filter
=
t
.
extend
({},
e
.
filter
,
n
.
filter
),
e
.
op
=
t
.
extend
({},
e
.
op
,
n
.
op
),
i
&&
t
.
each
(
e
.
filter
,
function
(
n
,
i
){(
""
==
i
||
null
==
i
||
t
.
isArray
(
i
)
&&
0
==
i
.
length
)
&&!
e
.
op
[
n
].
match
(
/null/i
)
&&
(
delete
e
.
filter
[
n
],
delete
e
.
op
[
n
])}),
e
.
filter
=
JSON
.
stringify
(
e
.
filter
),
e
.
op
=
JSON
.
stringify
(
e
.
op
),
e
};
t
.
extend
(
t
.
fn
.
bootstrapTable
.
defaults
,{
commonSearch
:
!
1
,
titleForm
:
"Common search"
,
actionForm
:
""
,
searchFormTemplate
:
""
,
searchFormVisible
:
!
0
,
searchClass
:
"searchit"
,
showSearch
:
!
0
,
renderDefault
:
!
0
,
onCommonSearch
:
function
(
t
,
e
){
return
!
1
},
onPostCommonSearch
:
function
(
t
){
return
!
1
}}),
t
.
extend
(
t
.
fn
.
bootstrapTable
.
defaults
.
icons
,{
commonSearchIcon
:
"glyphicon-search"
}),
t
.
extend
(
t
.
fn
.
bootstrapTable
.
Constructor
.
EVENTS
,{
"common-search.bs.table"
:
"onCommonSearch"
,
"post-common-search.bs.table"
:
"onPostCommonSearch"
}),
t
.
extend
(
t
.
fn
.
bootstrapTable
.
locales
[
t
.
fn
.
bootstrapTable
.
defaults
.
locale
],{
formatCommonSearch
:
function
(){
return
"Common search"
},
formatCommonSubmitButton
:
function
(){
return
"Submit"
},
formatCommonResetButton
:
function
(){
return
"Reset"
},
formatCommonCloseButton
:
function
(){
return
"Close"
},
formatCommonChoose
:
function
(){
return
"Choose"
}}),
t
.
extend
(
t
.
fn
.
bootstrapTable
.
defaults
,
t
.
fn
.
bootstrapTable
.
locales
);
var
d
=
t
.
fn
.
bootstrapTable
.
Constructor
,
u
=
d
.
prototype
.
initHeader
,
p
=
d
.
prototype
.
initToolbar
,
h
=
d
.
prototype
.
load
,
f
=
d
.
prototype
.
initSearch
;
d
.
prototype
.
initHeader
=
function
(){
u
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
this
.
$header
.
find
(
"th[data-field]"
).
each
(
function
(
e
){
var
n
=
t
(
this
).
data
();
"undefined"
!=
typeof
n
.
width
&&
n
.
width
.
toString
().
indexOf
(
"%"
)
===-
1
&&
(
t
(
".th-inner"
,
this
).
outerWidth
(
n
.
width
),
t
(
this
).
css
(
"max-width"
,
n
.
width
))}),
this
.
options
.
stateField
=
this
.
header
.
stateField
},
d
.
prototype
.
initToolbar
=
function
(){
if
(
p
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
s
(
this
)){
var
e
=
this
,
o
=
[];
e
.
options
.
showSearch
&&
(
o
.
push
(
n
(
'<div class="columns-%s pull-%s" style="margin-top:10px;margin-bottom:10px;">'
,
this
.
options
.
buttonsAlign
,
this
.
options
.
buttonsAlign
)),
o
.
push
(
n
(
'<button class="btn btn-default%s" type="button" name="commonSearch" title="%s">'
,
void
0
===
e
.
options
.
iconSize
?
""
:
" btn-"
+
e
.
options
.
iconSize
,
e
.
options
.
formatCommonSearch
())),
o
.
push
(
n
(
'<i class="%s %s"></i>'
,
e
.
options
.
iconsPrefix
,
e
.
options
.
icons
.
commonSearchIcon
)),
o
.
push
(
"</button></div>"
)),
e
.
$toolbar
.
find
(
".pull-right"
).
size
()
>
0
?
t
(
o
.
join
(
""
)).
insertBefore
(
e
.
$toolbar
.
find
(
".pull-right:first"
)):
e
.
$toolbar
.
append
(
o
.
join
(
""
)),
i
(
e
.
columns
,
e
),
e
.
$toolbar
.
find
(
'button[name="commonSearch"]'
).
off
(
"click"
).
on
(
"click"
,
function
(){
e
.
$commonsearch
.
toggleClass
(
"hidden"
)}),
e
.
$container
.
on
(
"click"
,
"."
+
e
.
options
.
searchClass
,
function
(){
var
n
=
t
(
"form [name='"
+
t
(
this
).
data
(
"field"
)
+
"']"
,
e
.
$commonsearch
);
if
(
n
.
size
()
>
0
){
var
i
=
t
(
this
).
data
(
"value"
);
n
.
is
(
"select"
)?
t
(
"option[value='"
+
i
+
"']"
,
n
).
prop
(
"selected"
,
!
0
):
n
.
size
()
>
1
?
t
(
"form [name='"
+
t
(
this
).
data
(
"field"
)
+
"'][value='"
+
i
+
"']"
,
e
.
$commonsearch
).
prop
(
"checked"
,
!
0
):
n
.
val
(
i
+
""
),
n
.
trigger
(
"change"
),
t
(
"form"
,
e
.
$commonsearch
).
trigger
(
"submit"
)}});
var
a
=
e
.
options
.
queryParams
;
this
.
options
.
queryParams
=
function
(
t
){
return
a
(
c
(
t
,
l
(
e
,
!
0
)))},
this
.
trigger
(
"post-common-search"
,
e
)}},
d
.
prototype
.
onCommonSearch
=
function
(){
var
t
=
l
(
this
);
this
.
trigger
(
"common-search"
,
this
,
t
),
this
.
options
.
pageNumber
=
1
,
this
.
refresh
({})},
d
.
prototype
.
load
=
function
(
t
){
h
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
!
s
(
this
)},
d
.
prototype
.
initSearch
=
function
(){
if
(
f
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
s
(
this
)){
var
e
=
this
,
n
=
t
.
isEmptyObject
(
this
.
filterColumnsPartial
)?
null
:
this
.
filterColumnsPartial
;
this
.
data
=
n
?
t
.
grep
(
this
.
data
,
function
(
i
,
o
){
for
(
var
a
in
n
){
var
r
=
n
[
a
].
toLowerCase
(),
s
=
i
[
a
];
if
(
s
=
t
.
fn
.
bootstrapTable
.
utils
.
calculateObjectValue
(
e
.
header
,
e
.
header
.
formatters
[
t
.
inArray
(
a
,
e
.
header
.
fields
)],[
s
,
i
,
o
],
s
),
t
.
inArray
(
a
,
e
.
header
.
fields
)
===-
1
||
"string"
!=
typeof
s
&&
"number"
!=
typeof
s
||
(
s
+
""
).
toLowerCase
().
indexOf
(
r
)
===-
1
)
return
!
1
}
return
!
0
}):
this
.
data
}}}(
jQuery
),
define
(
"bootstrap-table-commonsearch"
,[
"bootstrap-table"
],
function
(
t
){
return
function
(){
var
e
;
return
e
||
t
.
$
.
fn
.
bootstrapTable
.
defaults
}}(
this
)),
!
function
(
t
){
"use strict"
;
t
.
extend
(
t
.
fn
.
bootstrapTable
.
defaults
,{
templateView
:
!
1
,
templateFormatter
:
"itemtpl"
,
templateParentClass
:
"row row-flex"
,
templateTableClass
:
"table-template"
});
var
e
=
t
.
fn
.
bootstrapTable
.
Constructor
,
n
=
e
.
prototype
.
initContainer
,
i
=
e
.
prototype
.
initBody
,
o
=
e
.
prototype
.
initRow
;
e
.
prototype
.
initContainer
=
function
(){
n
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
));
var
t
=
this
;
t
.
options
.
templateView
&&
(
t
.
options
.
cardView
=!
0
)},
e
.
prototype
.
initBody
=
function
(){
var
e
=
this
;
t
.
extend
(
e
.
options
,{
showHeader
:
!
e
.
options
.
templateView
&&
t
.
fn
.
bootstrapTable
.
defaults
.
showHeader
,
showFooter
:
!
e
.
options
.
templateView
&&
t
.
fn
.
bootstrapTable
.
defaults
.
showFooter
}),
t
(
e
.
$el
).
toggleClass
(
e
.
options
.
templateTableClass
,
e
.
options
.
templateView
),
i
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
e
.
options
.
templateView
&&
t
(
"> *:not(.no-records-found)"
,
e
.
$body
).
wrapAll
(
t
(
"<div />"
).
addClass
(
e
.
options
.
templateParentClass
))},
e
.
prototype
.
initRow
=
function
(
t
,
e
,
n
,
i
){
var
a
=
this
;
if
(
!
a
.
options
.
templateView
)
return
o
.
apply
(
a
,
Array
.
prototype
.
slice
.
apply
(
arguments
));
var
r
=
""
;
if
(
"function"
==
typeof
a
.
options
.
templateFormatter
)
r
=
a
.
options
.
templateFormatter
.
call
(
a
,
t
,
e
,
n
);
else
{
var
s
=
require
(
"template"
);
r
=
s
(
a
.
options
.
templateFormatter
,{
item
:
t
,
i
:
e
,
data
:
n
})}
return
r
}}(
jQuery
),
define
(
"bootstrap-table-template"
,[
"bootstrap-table"
,
"template"
],
function
(
t
){
return
function
(){
var
e
;
return
e
||
t
.
$
.
fn
.
bootstrapTable
.
defaults
}}(
this
)),
function
(
t
){
"use strict"
;
var
e
=
t
.
fn
.
bootstrapTable
.
utils
.
sprintf
;
t
.
extend
(
t
.
fn
.
bootstrapTable
.
defaults
,{
showJumpto
:
!
1
,
exportOptions
:{}}),
t
.
extend
(
t
.
fn
.
bootstrapTable
.
locales
,{
formatJumpto
:
function
(){
return
"GO"
}}),
t
.
extend
(
t
.
fn
.
bootstrapTable
.
defaults
,
t
.
fn
.
bootstrapTable
.
locales
);
var
n
=
t
.
fn
.
bootstrapTable
.
Constructor
,
i
=
n
.
prototype
.
initPagination
;
n
.
prototype
.
initPagination
=
function
(){
if
(
this
.
showToolbar
=
this
.
options
.
showExport
,
i
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
this
.
options
.
showJumpto
){
var
n
=
this
,
o
=
this
.
$pagination
.
find
(
"ul.pagination"
),
a
=
o
.
find
(
"li.jumpto"
);
a
.
length
||
(
a
=
t
([
'<li class="jumpto">'
,
'<input type="text" class="form-control">'
,
'<button class="btn'
+
e
(
" btn-%s"
,
this
.
options
.
buttonsClass
)
+
e
(
" btn-%s"
,
this
.
options
.
iconSize
)
+
'" title="'
+
this
.
options
.
formatJumpto
()
+
'" type="button">'
+
this
.
options
.
formatJumpto
(),
"</button>"
,
"</li>"
].
join
(
""
)).
appendTo
(
o
),
a
.
find
(
"button"
).
click
(
function
(){
n
.
selectPage
(
parseInt
(
a
.
find
(
"input"
).
val
()))}))}}}(
jQuery
),
define
(
"bootstrap-table-jumpto"
,[
"bootstrap-table"
],
function
(
t
){
return
function
(){
var
e
;
return
e
||
t
.
$
.
fn
.
bootstrapTable
.
defaults
}}(
this
)),
function
(
t
){
"use strict"
;
function
e
(
t
){
var
e
=
0
,
a
=
0
,
r
=
0
,
s
=
0
;
return
"detail"
in
t
&&
(
a
=
t
.
detail
),
"wheelDelta"
in
t
&&
(
a
=-
t
.
wheelDelta
/
120
),
"wheelDeltaY"
in
t
&&
(
a
=-
t
.
wheelDeltaY
/
120
),
"wheelDeltaX"
in
t
&&
(
e
=-
t
.
wheelDeltaX
/
120
),
"axis"
in
t
&&
t
.
axis
===
t
.
HORIZONTAL_AXIS
&&
(
e
=
a
,
a
=
0
),
r
=
e
*
n
,
s
=
a
*
n
,
"deltaY"
in
t
&&
(
s
=
t
.
deltaY
),
"deltaX"
in
t
&&
(
r
=
t
.
deltaX
),(
r
||
s
)
&&
t
.
deltaMode
&&
(
1
===
t
.
deltaMode
?(
r
*=
i
,
s
*=
i
):(
r
*=
o
,
s
*=
o
)),
r
&&!
e
&&
(
e
=
r
<
1
?
-
1
:
1
),
s
&&!
a
&&
(
a
=
s
<
1
?
-
1
:
1
),{
spinX
:
e
,
spinY
:
a
,
pixelX
:
r
,
pixelY
:
s
}}
var
n
=
10
,
i
=
40
,
o
=
800
,
a
=
null
,
r
=
function
(){
if
(
null
===
a
){
var
e
=
t
(
"<p/>"
).
addClass
(
"fixed-table-scroll-inner"
),
n
=
t
(
"<div/>"
).
addClass
(
"fixed-table-scroll-outer"
),
i
=
void
0
,
o
=
void
0
;
n
.
append
(
e
),
t
(
"body"
).
append
(
n
),
i
=
e
[
0
].
offsetWidth
,
n
.
css
(
"overflow"
,
"scroll"
),
o
=
e
[
0
].
offsetWidth
,
i
===
o
&&
(
o
=
n
[
0
].
clientWidth
),
n
.
remove
(),
a
=
i
-
o
}
return
a
},
s
=
function
(
t
){
return
t
[
0
].
scrollHeight
>
t
[
0
].
clientHeight
?
15
:
0
};
t
.
extend
(
t
.
fn
.
bootstrapTable
.
defaults
,{
fixedColumns
:
!
1
,
fixedNumber
:
0
,
fixedRightNumber
:
0
});
var
l
=
t
.
fn
.
bootstrapTable
.
Constructor
,
c
=
l
.
prototype
.
initBody
,
d
=
l
.
prototype
.
initContainer
,
u
=
l
.
prototype
.
trigger
,
p
=
l
.
prototype
.
hideLoading
,
h
=
l
.
prototype
.
updateSelected
;
l
.
prototype
.
fixedColumnsSupported
=
function
(){
var
t
=
this
;
return
t
.
options
.
fixedColumns
&&!
t
.
options
.
detailView
&&!
t
.
options
.
cardView
},
l
.
prototype
.
initFixedContainer
=
function
(){
this
.
fixedColumnsSupported
()
&&
(
this
.
options
.
fixedNumber
&&
(
0
==
this
.
$tableContainer
.
find
(
".fixed-columns"
).
size
()
&&
this
.
$tableContainer
.
append
(
'<div class="fixed-columns"></div>'
),
this
.
$fixedColumns
=
this
.
$tableContainer
.
find
(
".fixed-columns"
)),
this
.
options
.
fixedRightNumber
&&
(
0
==
this
.
$tableContainer
.
find
(
".fixed-columns-right"
).
size
()
&&
this
.
$tableContainer
.
append
(
'<div class="fixed-columns-right"></div>'
),
this
.
$fixedColumnsRight
=
this
.
$tableContainer
.
find
(
".fixed-columns-right"
)))},
l
.
prototype
.
initContainer
=
function
(){
d
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
this
.
initFixedContainer
()},
l
.
prototype
.
initBody
=
function
(){
c
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
this
.
fixedColumnsSupported
()
&&
(
this
.
options
.
showHeader
&&
this
.
options
.
height
||
(
this
.
initFixedColumnsBody
(),
this
.
initFixedColumnsEvents
()))},
l
.
prototype
.
trigger
=
function
(){
var
t
=
this
;
u
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
"pre-body"
===
arguments
[
0
]
&&
this
.
options
.
cardView
&&
this
.
$tableBody
.
css
(
"height"
,
"auto"
),
"toggle"
===
arguments
[
0
]
&&
(
arguments
[
1
]?(
this
.
$tableBody
.
css
(
"height"
,
"auto"
),
this
.
$fixedColumns
&&
this
.
$fixedColumns
.
hide
(),
this
.
$fixedColumnsRight
&&
this
.
$fixedColumnsRight
.
hide
()):(
this
.
$tableBody
.
css
(
"height"
,
"100%"
),
this
.
$fixedColumns
&&
this
.
$fixedColumns
.
show
(),
this
.
$fixedColumnsRight
&&
this
.
$fixedColumnsRight
.
show
(),
this
.
$fixedHeaderRight
.
scrollLeft
(
this
.
$tableBody
.
find
(
"table"
).
width
()),
this
.
$fixedBodyRight
.
scrollLeft
(
this
.
$tableBody
.
find
(
"table"
).
width
()))),
t
.
fixedColumnsSupported
()
&&
(
"post-header"
===
arguments
[
0
]?
this
.
initFixedColumnsHeader
():
"scroll-body"
===
arguments
[
0
]?(
this
.
needFixedColumns
&&
this
.
options
.
fixedNumber
&&
this
.
$fixedBody
.
scrollTop
(
this
.
$tableBody
.
scrollTop
()),
this
.
needFixedColumns
&&
this
.
options
.
fixedRightNumber
&&
this
.
$fixedBodyRight
.
scrollTop
(
this
.
$tableBody
.
scrollTop
())):
"load-success"
===
arguments
[
0
]
&&
this
.
hideLoading
())},
l
.
prototype
.
updateSelected
=
function
(){
var
e
=
this
;
h
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
this
.
fixedColumnsSupported
()
&&
this
.
$tableBody
.
find
(
"tr"
).
each
(
function
(
n
,
i
){
var
o
=
t
(
i
),
a
=
o
.
data
(
"index"
),
r
=
o
.
attr
(
"class"
),
s
=
'[name="'
+
e
.
options
.
selectItemName
+
'"]'
,
l
=
o
.
find
(
s
);
if
(
"undefined"
!=
typeof
a
){
var
c
=
function
(
t
,
n
){
var
i
=
n
.
find
(
'tr[data-index="'
+
a
+
'"]'
);
i
.
attr
(
"class"
,
r
),
l
.
length
&&
i
.
find
(
s
).
prop
(
"checked"
,
l
.
prop
(
"checked"
)),
e
.
$selectAll
.
length
&&
t
.
add
(
n
).
find
(
'[name="btSelectAll"]'
).
prop
(
"checked"
,
e
.
$selectAll
.
prop
(
"checked"
))};
e
.
$fixedBody
&&
e
.
options
.
fixedNumber
&&
c
(
e
.
$fixedHeader
,
e
.
$fixedBody
),
e
.
$fixedBodyRight
&&
e
.
options
.
fixedRightNumber
&&
c
(
e
.
$fixedHeaderRight
,
e
.
$fixedBodyRight
)}})},
l
.
prototype
.
hideLoading
=
function
(){
p
.
apply
(
this
,
Array
.
prototype
.
slice
.
apply
(
arguments
)),
this
.
needFixedColumns
&&
this
.
options
.
fixedNumber
&&
this
.
$fixedColumns
.
find
(
".fixed-table-loading"
).
hide
(),
this
.
needFixedColumns
&&
this
.
options
.
fixedRightNumber
&&
this
.
$fixedColumnsRight
.
find
(
".fixed-table-loading"
).
hide
()},
l
.
prototype
.
initFixedColumnsHeader
=
function
(){
var
t
=
this
;
this
.
options
.
height
?
this
.
needFixedColumns
=
this
.
$tableHeader
.
outerWidth
(
!
0
)
<
this
.
$tableHeader
.
find
(
"table"
).
outerWidth
(
!
0
):
this
.
needFixedColumns
=
this
.
$tableBody
.
outerWidth
(
!
0
)
<
this
.
$tableBody
.
find
(
"table"
).
outerWidth
(
!
0
);
var
e
=
function
(
e
,
n
){
return
e
.
find
(
".fixed-table-header"
).
remove
(),
e
.
append
(
t
.
$tableHeader
.
clone
(
!
0
)),
e
.
find
(
".fixed-table-header"
).
css
(
"margin-right"
,
""
),
e
.
css
({
width
:
t
.
getFixedColumnsWidth
(
n
)}),
e
.
find
(
".fixed-table-header"
)};
this
.
needFixedColumns
&&
this
.
options
.
fixedNumber
?(
this
.
$fixedHeader
=
e
(
this
.
$fixedColumns
),
this
.
$fixedHeader
.
css
(
"margin-right"
,
""
)):
this
.
$fixedColumns
&&
this
.
$fixedColumns
.
html
(
""
).
css
(
"width"
,
""
),
this
.
needFixedColumns
&&
this
.
options
.
fixedRightNumber
?(
this
.
$fixedHeaderRight
=
e
(
this
.
$fixedColumnsRight
,
!
0
),
this
.
$fixedHeaderRight
.
scrollLeft
(
this
.
$fixedHeaderRight
.
find
(
"table"
).
width
())):
this
.
$fixedColumnsRight
&&
this
.
$fixedColumnsRight
.
html
(
""
).
css
(
"width"
,
""
),
this
.
initFixedColumnsBody
(),
this
.
initFixedColumnsEvents
()},
l
.
prototype
.
initFixedColumnsBody
=
function
(){
var
e
=
this
,
n
=
function
(
n
,
i
){
n
.
find
(
".fixed-table-body"
).
remove
(),
n
.
append
(
e
.
$tableBody
.
clone
(
!
0
));
var
o
=
n
.
find
(
".fixed-table-body"
),
a
=
e
.
$tableBody
.
get
(
0
),
s
=
a
.
scrollWidth
>
a
.
clientWidth
?
r
():
0
,
l
=
t
(
".fixed-table-pagination"
).
height
();
"undefined"
!=
typeof
e
.
options
.
height
&&
(
l
=
0
);
var
c
=
e
.
$tableContainer
.
outerHeight
(
!
0
)
-
s
-
l
+
1
;
return
n
.
css
({
height
:
c
}),
o
.
css
({
height
:
c
-
i
.
height
()}),
o
};
this
.
needFixedColumns
&&
this
.
options
.
fixedNumber
&&
(
this
.
$fixedBody
=
n
(
this
.
$fixedColumns
,
this
.
$fixedHeader
)),
this
.
needFixedColumns
&&
this
.
options
.
fixedRightNumber
&&
(
this
.
$fixedBodyRight
=
n
(
this
.
$fixedColumnsRight
,
this
.
$fixedHeaderRight
),
this
.
$fixedBodyRight
.
scrollLeft
(
this
.
$fixedBodyRight
.
find
(
"table"
).
width
()),
this
.
$fixedBodyRight
.
css
(
"overflow-y"
,
"hidden"
))},
l
.
prototype
.
getFixedColumnsWidth
=
function
(
t
){
var
e
=
this
.
getVisibleFields
(),
n
=
0
,
i
=
this
.
options
.
fixedNumber
;
t
&&
(
e
=
e
.
reverse
(),
i
=
this
.
options
.
fixedRightNumber
,
this
.
$fixedColumnsRight
.
css
(
"right"
,
s
(
this
.
$tableBody
)));
for
(
var
o
=
0
;
o
<
i
;
o
++
)
n
+=
this
.
$header
.
find
(
'th[data-field="'
+
e
[
o
]
+
'"]'
).
outerWidth
();
return
n
+
1
},
l
.
prototype
.
initFixedColumnsEvents
=
function
(){
var
n
=
this
,
i
=
function
(
e
,
i
){
var
o
=
'tr[data-index="'
+
t
(
e
.
currentTarget
).
data
(
"index"
)
+
'"]'
,
a
=
n
.
$tableBody
.
find
(
o
);
n
.
$fixedBody
&&
(
a
=
a
.
add
(
n
.
$fixedBody
.
find
(
o
))),
n
.
$fixedBodyRight
&&
(
a
=
a
.
add
(
n
.
$fixedBodyRight
.
find
(
o
))),
a
.
css
(
"background-color"
,
i
?
t
(
e
.
currentTarget
).
css
(
"background-color"
):
""
)};
this
.
$tableBody
.
find
(
"tr"
).
hover
(
function
(
t
){
i
(
t
,
!
0
)},
function
(
t
){
i
(
t
,
!
1
)});
var
o
=
"undefined"
!=
typeof
navigator
&&
navigator
.
userAgent
.
toLowerCase
().
indexOf
(
"firefox"
)
>-
1
,
a
=
o
?
"DOMMouseScroll"
:
"mousewheel"
,
r
=
function
(
t
,
i
){
var
o
=
e
(
t
),
a
=
Math
.
ceil
(
o
.
pixelY
),
r
=
n
.
$tableBody
.
scrollTop
()
+
a
;(
a
<
0
&&
r
>
0
||
a
>
0
&&
r
<
i
.
scrollHeight
-
i
.
clientHeight
)
&&
t
.
preventDefault
(),
n
.
$tableBody
.
scrollTop
(
r
),
n
.
$fixedBody
&&
n
.
$fixedBody
.
scrollTop
(
r
),
n
.
$fixedBodyRight
&&
n
.
$fixedBodyRight
.
scrollTop
(
r
)};
this
.
needFixedColumns
&&
this
.
options
.
fixedNumber
&&
(
this
.
$fixedBody
.
find
(
"tr"
).
hover
(
function
(
t
){
i
(
t
,
!
0
)},
function
(
t
){
i
(
t
,
!
1
)}),
this
.
$fixedBody
[
0
].
addEventListener
(
a
,
function
(
t
){
r
(
t
,
n
.
$fixedBody
[
0
])})),
t
(
"div.fixed-table-body"
).
off
(
"scroll"
),
this
.
$tableBody
.
off
(
"scroll"
).
on
(
"scroll"
,
function
(
t
){
n
.
$tableHeader
.
scrollLeft
(
0
),
n
.
$tableBody
.
scrollLeft
()
>
0
&&
(
n
.
$tableHeader
.
scrollLeft
(
n
.
$tableBody
.
scrollLeft
()),
n
.
options
.
showFooter
&&!
n
.
options
.
cardView
&&
n
.
$tableFooter
.
scrollLeft
(
n
.
$tableBody
.
scrollLeft
()));
var
e
=
n
.
$tableBody
.
scrollTop
();
n
.
$fixedBody
&&
n
.
$fixedBody
.
scrollTop
(
e
),
n
.
$fixedBodyRight
&&
n
.
$fixedBodyRight
.
scrollTop
(
e
)}),
this
.
needFixedColumns
&&
this
.
options
.
fixedRightNumber
&&
(
this
.
$fixedBodyRight
.
find
(
"tr"
).
hover
(
function
(
t
){
i
(
t
,
!
0
)},
function
(
t
){
i
(
t
,
!
1
)}),
this
.
$fixedBodyRight
[
0
].
addEventListener
(
a
,
function
(
t
){
r
(
t
,
n
.
$fixedBodyRight
[
0
])}),
this
.
$fixedBody
&&
this
.
$fixedBody
.
find
(
'input[name="'
+
this
.
options
.
selectItemName
+
'"]'
).
off
(
"click"
).
on
(
"click"
,
function
(
e
){
e
.
stopImmediatePropagation
();
var
i
=
t
(
e
.
target
).
data
(
"index"
);
t
(
n
.
$selectItem
[
i
]).
trigger
(
"click"
)})),
this
.
options
.
filterControl
&&
t
(
this
.
$fixedColumns
).
off
(
"keyup change"
).
on
(
"keyup change"
,
function
(
e
){
var
i
=
t
(
e
.
target
),
o
=
i
.
val
(),
a
=
i
.
parents
(
"th"
).
data
(
"field"
),
r
=
n
.
$header
.
find
(
'th[data-field="'
+
a
+
'"]'
);
if
(
i
.
is
(
"input"
))
r
.
find
(
"input"
).
val
(
o
);
else
if
(
i
.
is
(
"select"
)){
var
s
=
r
.
find
(
"select"
);
s
.
find
(
"option[selected]"
).
removeAttr
(
"selected"
),
s
.
find
(
'option[value="'
+
o
+
'"]'
).
attr
(
"selected"
,
!
0
)}
n
.
triggerSearch
()})}}(
jQuery
),
define
(
"bootstrap-table-fixed-columns"
,[
"bootstrap-table"
],
function
(
t
){
return
function
(){
var
e
;
return
e
||
t
.
$
.
fn
.
bootstrapTable
.
defaults
}}(
this
)),
define
(
"table"
,[
"jquery"
,
"bootstrap"
,
"moment"
,
"moment/locale/zh-cn"
,
"bootstrap-table"
,
"bootstrap-table-lang"
,
"bootstrap-table-export"
,
"bootstrap-table-commonsearch"
,
"bootstrap-table-template"
,
"bootstrap-table-jumpto"
,
"bootstrap-table-fixed-columns"
],
function
(
t
,
e
,
n
){
var
i
=
{
list
:{},
defaults
:{
url
:
""
,
sidePagination
:
"server"
,
method
:
"get"
,
toolbar
:
".toolbar"
,
search
:
!
0
,
cache
:
!
1
,
commonSearch
:
!
0
,
searchFormVisible
:
!
1
,
titleForm
:
""
,
idTable
:
"commonTable"
,
showExport
:
!
0
,
exportDataType
:
"auto"
,
exportTypes
:[
"json"
,
"xml"
,
"csv"
,
"txt"
,
"doc"
,
"excel"
],
exportOptions
:{
fileName
:
"export_"
+
n
().
format
(
"YYYY-MM-DD"
),
preventInjection
:
!
1
,
mso
:{
onMsoNumberFormat
:
function
(
e
,
n
,
i
){
return
isNaN
(
t
(
e
).
text
())?
""
:
"\\@"
}},
ignoreColumn
:[
0
,
"operate"
]},
pageSize
:
localStorage
.
getItem
(
"pagesize"
)
||
10
,
pageList
:[
10
,
15
,
20
,
25
,
50
,
"All"
],
pagination
:
!
0
,
clickToSelect
:
!
0
,
dblClickToEdit
:
!
0
,
singleSelect
:
!
1
,
showRefresh
:
!
1
,
showJumpto
:
!
0
,
locale
:
"zh-cn"
==
Config
.
language
?
"zh-CN"
:
"en-US"
,
showToggle
:
!
0
,
showColumns
:
!
0
,
pk
:
"id"
,
sortName
:
"id"
,
sortOrder
:
"desc"
,
paginationFirstText
:
__
(
"First"
),
paginationPreText
:
__
(
"Previous"
),
paginationNextText
:
__
(
"Next"
),
paginationLastText
:
__
(
"Last"
),
cardView
:
!
1
,
iosCardView
:
!
0
,
checkOnInit
:
!
0
,
escape
:
!
0
,
selectedIds
:[],
selectedData
:[],
extend
:{
index_url
:
""
,
add_url
:
""
,
edit_url
:
""
,
del_url
:
""
,
import_url
:
""
,
multi_url
:
""
,
dragsort_url
:
"ajax/weigh"
}},
columnDefaults
:{
align
:
"center"
,
valign
:
"middle"
},
config
:{
checkboxtd
:
"tbody>tr>td.bs-checkbox"
,
toolbar
:
".toolbar"
,
refreshbtn
:
".btn-refresh"
,
addbtn
:
".btn-add"
,
editbtn
:
".btn-edit"
,
delbtn
:
".btn-del"
,
importbtn
:
".btn-import"
,
multibtn
:
".btn-multi"
,
disabledbtn
:
".btn-disabled"
,
editonebtn
:
".btn-editone"
,
restoreonebtn
:
".btn-restoreone"
,
destroyonebtn
:
".btn-destroyone"
,
restoreallbtn
:
".btn-restoreall"
,
destroyallbtn
:
".btn-destroyall"
,
dragsortfield
:
"weigh"
},
button
:{
edit
:{
name
:
"edit"
,
icon
:
"fa fa-pencil"
,
title
:
__
(
"Edit"
),
extend
:
'data-toggle="tooltip"'
,
classname
:
"btn btn-xs btn-success btn-editone"
},
del
:{
name
:
"del"
,
icon
:
"fa fa-trash"
,
title
:
__
(
"Del"
),
extend
:
'data-toggle="tooltip"'
,
classname
:
"btn btn-xs btn-danger btn-delone"
},
dragsort
:{
name
:
"dragsort"
,
icon
:
"fa fa-arrows"
,
title
:
__
(
"Drag to sort"
),
extend
:
'data-toggle="tooltip"'
,
classname
:
"btn btn-xs btn-primary btn-dragsort"
}},
api
:{
init
:
function
(
e
,
n
,
o
){
e
=
e
?
e
:{},
n
=
n
?
n
:{},
o
=
o
?
o
:{},
t
.
fn
.
bootstrapTable
.
Constructor
.
prototype
.
getSelectItem
=
function
(){
return
this
.
$selectItem
},
t
.
extend
(
!
0
,
t
.
fn
.
bootstrapTable
.
defaults
,
i
.
defaults
,
e
),
t
.
extend
(
t
.
fn
.
bootstrapTable
.
columnDefaults
,
i
.
columnDefaults
,
n
),
t
.
extend
(
t
.
fn
.
bootstrapTable
.
locales
[
i
.
defaults
.
locale
],{
formatCommonSearch
:
function
(){
return
__
(
"Common search"
)},
formatCommonSubmitButton
:
function
(){
return
__
(
"Submit"
)},
formatCommonResetButton
:
function
(){
return
__
(
"Reset"
)},
formatCommonCloseButton
:
function
(){
return
__
(
"Close"
)},
formatCommonChoose
:
function
(){
return
__
(
"Choose"
);
},
formatJumpto
:
function
(){
return
__
(
"Go"
)}},
o
),
t
.
fn
.
bootstrapTable
.
defaults
.
iosCardView
&&
navigator
.
userAgent
.
match
(
/
(
iPod|iPhone|iPad
)
/
)
&&
(
i
.
defaults
.
cardView
=!
0
,
t
.
fn
.
bootstrapTable
.
defaults
.
cardView
=!
0
),
"undefined"
!=
typeof
e
.
exportTypes
&&
(
t
.
fn
.
bootstrapTable
.
defaults
.
exportTypes
=
e
.
exportTypes
)},
bindevent
:
function
(
e
){
var
n
=
e
.
closest
(
".bootstrap-table"
),
o
=
e
.
bootstrapTable
(
"getOptions"
),
a
=
t
(
o
.
toolbar
,
n
),
r
=
t
(
".btn-selected-tips"
,
n
);
0
===
r
.
size
()
&&
(
r
=
t
(
'<a href="javascript:" class="btn btn-warning-light btn-selected-tips hide" data-animation="false" data-toggle="tooltip" data-title="'
+
__
(
"Click to uncheck all"
)
+
'"><i class="fa fa-info-circle"></i> '
+
__
(
"Multiple selection mode: %s checked"
,
"<b>0</b>"
)
+
"</a>"
).
appendTo
(
a
)),
r
.
off
(
"click"
).
on
(
"click"
,
function
(
t
){
e
.
trigger
(
"uncheckbox"
),
e
.
bootstrapTable
(
"refresh"
)}),
e
.
on
(
"uncheckbox"
,
function
(
t
,
e
,
n
){
o
.
selectedIds
=
[],
o
.
selectedData
=
[],
r
.
tooltip
(
"hide"
),
r
.
addClass
(
"hide"
)}),
e
.
on
(
"load-error.bs.table"
,
function
(
t
,
e
,
n
){
0
!==
n
.
status
&&
Toastr
.
error
(
__
(
"Unknown data format"
))}),
e
.
on
(
"load-success.bs.table"
,
function
(
t
,
e
){
"undefined"
==
typeof
e
.
rows
&&
"undefined"
!=
typeof
e
.
code
&&
Toastr
.
error
(
e
.
msg
)}),
e
.
on
(
"refresh.bs.table"
,
function
(
e
,
n
,
o
){
t
(
i
.
config
.
refreshbtn
,
a
).
find
(
".fa"
).
addClass
(
"fa-spin"
)}),
e
.
on
(
"page-change.bs.table"
,
function
(
t
,
e
,
n
){
isNaN
(
n
)
||
localStorage
.
setItem
(
"pagesize"
,
n
)}),
e
.
on
(
"search.bs.table common-search.bs.table"
,
function
(
t
,
n
,
i
){
e
.
trigger
(
"uncheckbox"
)}),
o
.
dblClickToEdit
&&
e
.
on
(
"dbl-click-row.bs.table"
,
function
(
e
,
n
,
o
,
a
){
t
(
i
.
config
.
editonebtn
,
o
).
trigger
(
"click"
)}),
e
.
on
(
"pre-body.bs.table"
,
function
(
e
,
n
){
o
.
maintainSelected
&&
t
.
each
(
n
,
function
(
e
,
n
){
n
[
o
.
stateField
]
=
t
.
inArray
(
n
[
o
.
pk
],
o
.
selectedIds
)
>-
1
})}),
e
.
on
(
"post-body.bs.table"
,
function
(
n
,
o
){
t
(
i
.
config
.
refreshbtn
,
a
).
find
(
".fa"
).
removeClass
(
"fa-spin"
),
t
(
i
.
config
.
checkboxtd
+
":first"
,
e
).
find
(
"input[type='checkbox'][data-index]"
).
size
()
>
0
&&
require
([
"drag"
,
"drop"
],
function
(){
var
n
=
t
(
i
.
config
.
checkboxtd
,
e
);
n
.
drag
(
"start"
,
function
(
e
,
n
){
return
t
(
'<div class="selection" />'
).
css
(
"opacity"
,.
65
).
appendTo
(
document
.
body
)}).
drag
(
function
(
e
,
n
){
t
(
n
.
proxy
).
css
({
top
:
Math
.
min
(
e
.
pageY
,
n
.
startY
),
left
:
Math
.
min
(
e
.
pageX
,
n
.
startX
),
height
:
Math
.
abs
(
e
.
pageY
-
n
.
startY
),
width
:
Math
.
abs
(
e
.
pageX
-
n
.
startX
)})}).
drag
(
"end"
,
function
(
e
,
n
){
t
(
n
.
proxy
).
remove
()}),
n
.
drop
(
"start"
,
function
(){
i
.
api
.
toggleattr
(
this
)}).
drop
(
function
(){}).
drop
(
"end"
,
function
(
t
){
var
e
=
this
;
setTimeout
(
function
(){
"mousemove"
===
t
.
type
&&
i
.
api
.
toggleattr
(
e
)},
0
)}),
t
.
drop
({
multi
:
!
0
})})});
var
s
=
o
.
exportDataType
;
e
.
on
(
"check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table post-body.bs.table"
,
function
(
n
){
var
l
=
e
.
bootstrapTable
(
"getData"
).
map
(
function
(
t
){
return
t
[
o
.
pk
]}),
c
=
i
.
api
.
selectedids
(
e
,
!
0
),
d
=
i
.
api
.
selecteddata
(
e
,
!
0
);
o
.
maintainSelected
?(
o
.
selectedIds
=
o
.
selectedIds
.
filter
(
function
(
e
,
n
,
i
){
return
t
.
inArray
(
e
,
l
)
===-
1
}).
concat
(
c
),
o
.
selectedData
=
o
.
selectedData
.
filter
(
function
(
e
,
n
,
i
){
return
t
.
inArray
(
e
[
o
.
pk
],
l
)
===-
1
}).
concat
(
d
),
o
.
selectedIds
.
length
>
c
.
length
?(
t
(
"b"
,
r
).
text
(
o
.
selectedIds
.
length
),
r
.
removeClass
(
"hide"
)):
r
.
addClass
(
"hide"
)):(
o
.
selectedIds
=
c
,
o
.
selectedData
=
d
),
"auto"
===
s
&&
(
o
.
exportDataType
=
c
.
length
>
0
?
"selected"
:
"all"
),
t
(
i
.
config
.
disabledbtn
,
a
).
toggleClass
(
"disabled"
,
!
o
.
selectedIds
.
length
)}),
t
(
'.panel-heading [data-field] a[data-toggle="tab"]'
).
on
(
"shown.bs.tab"
,
function
(
n
){
var
i
=
t
(
this
).
closest
(
"[data-field]"
).
data
(
"field"
),
o
=
t
(
this
).
data
(
"value"
),
a
=
t
(
"[name='"
+
i
+
"']"
,
e
.
closest
(
".bootstrap-table"
).
find
(
".commonsearch-table"
));
return
"SELECT"
==
a
.
prop
(
"tagName"
)?
t
(
"option[value='"
+
o
+
"']"
,
a
).
prop
(
"selected"
,
!
0
):
a
.
val
(
o
),
e
.
trigger
(
"uncheckbox"
),
e
.
bootstrapTable
(
"refresh"
,{
pageNumber
:
1
}),
!
1
}),
a
.
on
(
"click"
,
i
.
config
.
refreshbtn
,
function
(){
e
.
bootstrapTable
(
"refresh"
)}),
a
.
on
(
"click"
,
i
.
config
.
addbtn
,
function
(){
var
n
=
i
.
api
.
selectedids
(
e
),
a
=
o
.
extend
.
add_url
;
a
.
indexOf
(
"{ids}"
)
!==-
1
&&
(
a
=
i
.
api
.
replaceurl
(
a
,{
ids
:
n
.
length
>
0
?
n
.
join
(
","
):
0
},
e
)),
Fast
.
api
.
open
(
a
,
__
(
"Add"
),
t
(
this
).
data
()
||
{})}),
t
(
i
.
config
.
importbtn
,
a
).
size
()
>
0
&&
require
([
"upload"
],
function
(
n
){
n
.
api
.
upload
(
t
(
i
.
config
.
importbtn
,
a
),
function
(
t
,
n
){
Fast
.
api
.
ajax
({
url
:
o
.
extend
.
import_url
,
data
:{
file
:
t
.
url
}},
function
(
t
,
n
){
e
.
trigger
(
"uncheckbox"
),
e
.
bootstrapTable
(
"refresh"
)})})}),
a
.
on
(
"click"
,
i
.
config
.
editbtn
,
function
(){
var
n
=
this
,
a
=
i
.
api
.
selectedids
(
e
);
a
.
length
>
10
||
t
.
each
(
i
.
api
.
selecteddata
(
e
),
function
(
a
,
r
){
var
s
=
o
.
extend
.
edit_url
;
r
=
t
.
extend
({},
r
?
r
:{},{
ids
:
r
[
o
.
pk
]}),
s
=
i
.
api
.
replaceurl
(
s
,
r
,
e
),
Fast
.
api
.
open
(
s
,
__
(
"Edit"
),
t
(
n
).
data
()
||
{})})}),
t
(
document
).
on
(
"click"
,
i
.
config
.
destroyallbtn
,
function
(){
var
n
=
this
;
return
Layer
.
confirm
(
__
(
"Are you sure you want to truncate?"
),
function
(){
var
i
=
t
(
n
).
data
(
"url"
)?
t
(
n
).
data
(
"url"
):
t
(
n
).
attr
(
"href"
);
Fast
.
api
.
ajax
(
i
,
function
(){
Layer
.
closeAll
(),
e
.
trigger
(
"uncheckbox"
),
e
.
bootstrapTable
(
"refresh"
)},
function
(){
Layer
.
closeAll
()})}),
!
1
}),
t
(
document
).
on
(
"click"
,
i
.
config
.
restoreallbtn
,
function
(){
var
n
=
this
,
i
=
t
(
n
).
data
(
"url"
)?
t
(
n
).
data
(
"url"
):
t
(
n
).
attr
(
"href"
);
return
Fast
.
api
.
ajax
(
i
,
function
(){
Layer
.
closeAll
(),
e
.
trigger
(
"uncheckbox"
),
e
.
bootstrapTable
(
"refresh"
)},
function
(){
Layer
.
closeAll
()}),
!
1
}),
t
(
document
).
on
(
"click"
,
i
.
config
.
restoreonebtn
+
","
+
i
.
config
.
destroyonebtn
,
function
(){
var
n
=
this
,
i
=
t
(
n
).
data
(
"url"
)?
t
(
n
).
data
(
"url"
):
t
(
n
).
attr
(
"href"
),
a
=
Fast
.
api
.
getrowbyindex
(
e
,
t
(
n
).
data
(
"row-index"
));
return
Fast
.
api
.
ajax
({
url
:
i
,
data
:{
ids
:
a
[
o
.
pk
]}},
function
(){
e
.
trigger
(
"uncheckbox"
),
e
.
bootstrapTable
(
"refresh"
)}),
!
1
}),
a
.
on
(
"click"
,
i
.
config
.
multibtn
,
function
(){
var
n
=
i
.
api
.
selectedids
(
e
);
i
.
api
.
multi
(
t
(
this
).
data
(
"action"
),
n
,
e
,
this
)}),
a
.
on
(
"click"
,
i
.
config
.
delbtn
,
function
(){
var
t
=
this
,
n
=
i
.
api
.
selectedids
(
e
);
Layer
.
confirm
(
__
(
"Are you sure you want to delete the %s selected item?"
,
n
.
length
),{
icon
:
3
,
title
:
__
(
"Warning"
),
offset
:
0
,
shadeClose
:
!
0
},
function
(
o
){
i
.
api
.
multi
(
"del"
,
n
,
e
,
t
),
Layer
.
close
(
o
)})}),
require
([
"dragsort"
],
function
(){
t
(
"tbody"
,
e
).
dragsort
({
itemSelector
:
"tr:visible"
,
dragSelector
:
"a.btn-dragsort"
,
dragEnd
:
function
(
n
,
o
){
var
a
=
t
(
"a.btn-dragsort"
,
this
),
r
=
e
.
bootstrapTable
(
"getData"
),
s
=
r
[
parseInt
(
t
(
this
).
data
(
"index"
))],
l
=
e
.
bootstrapTable
(
"getOptions"
),
c
=
t
.
map
(
t
(
"tbody tr:visible"
,
e
),
function
(
e
){
return
r
[
parseInt
(
t
(
e
).
data
(
"index"
))][
l
.
pk
]}),
d
=
s
[
l
.
pk
],
u
=
"undefined"
!=
typeof
s
.
pid
?
s
.
pid
:
""
,
p
=
{
url
:
e
.
bootstrapTable
(
"getOptions"
).
extend
.
dragsort_url
,
data
:{
ids
:
c
.
join
(
","
),
changeid
:
d
,
pid
:
u
,
field
:
i
.
config
.
dragsortfield
,
orderway
:
l
.
sortOrder
,
table
:
l
.
extend
.
table
,
pk
:
l
.
pk
}};
Fast
.
api
.
ajax
(
p
,
function
(
n
,
i
){
var
o
=
t
(
a
).
data
(
"success"
)
||
t
.
noop
;
return
(
"function"
!=
typeof
o
||!
1
!==
o
.
call
(
a
,
n
,
i
))
&&
void
e
.
bootstrapTable
(
"refresh"
)},
function
(
n
,
i
){
var
o
=
t
(
a
).
data
(
"error"
)
||
t
.
noop
;
return
(
"function"
!=
typeof
o
||!
1
!==
o
.
call
(
a
,
n
,
i
))
&&
void
e
.
bootstrapTable
(
"refresh"
)})},
placeHolderTemplate
:
""
})}),
e
.
on
(
"click"
,
"input[data-id][name='checkbox']"
,
function
(
n
){
var
i
=
t
(
this
).
data
(
"id"
);
e
.
bootstrapTable
(
t
(
this
).
prop
(
"checked"
)?
"checkBy"
:
"uncheckBy"
,{
field
:
o
.
pk
,
values
:[
i
]})}),
e
.
on
(
"click"
,
"[data-id].btn-change"
,
function
(
n
){
n
.
preventDefault
();
var
o
=
t
.
proxy
(
function
(){
i
.
api
.
multi
(
t
(
this
).
data
(
"action"
)?
t
(
this
).
data
(
"action"
):
""
,[
t
(
this
).
data
(
"id"
)],
e
,
this
)},
this
);
"undefined"
!=
typeof
t
(
this
).
data
(
"confirm"
)?
Layer
.
confirm
(
t
(
this
).
data
(
"confirm"
),
function
(
t
){
o
(),
Layer
.
close
(
t
)}):
o
()}),
e
.
on
(
"click"
,
"[data-id].btn-edit"
,
function
(
n
){
n
.
preventDefault
();
var
a
=
t
(
this
).
data
(
"id"
),
r
=
i
.
api
.
getrowbyid
(
e
,
a
);
r
.
ids
=
a
;
var
s
=
i
.
api
.
replaceurl
(
o
.
extend
.
edit_url
,
r
,
e
);
Fast
.
api
.
open
(
s
,
__
(
"Edit"
),
t
(
this
).
data
()
||
{})}),
e
.
on
(
"click"
,
"[data-id].btn-del"
,
function
(
n
){
n
.
preventDefault
();
var
o
=
t
(
this
).
data
(
"id"
),
a
=
this
;
Layer
.
confirm
(
__
(
"Are you sure you want to delete this item?"
),{
icon
:
3
,
title
:
__
(
"Warning"
),
shadeClose
:
!
0
},
function
(
t
){
i
.
api
.
multi
(
"del"
,
o
,
e
,
a
),
Layer
.
close
(
t
)})});
var
l
=
e
.
attr
(
"id"
);
return
i
.
list
[
l
]
=
e
,
e
},
multi
:
function
(
e
,
n
,
i
,
o
){
var
a
=
i
.
bootstrapTable
(
"getOptions"
),
r
=
o
?
t
(
o
).
data
():{};
n
=
t
.
isArray
(
n
)?
n
.
join
(
","
):
n
;
var
s
=
"undefined"
!=
typeof
r
.
url
?
r
.
url
:
"del"
==
e
?
a
.
extend
.
del_url
:
a
.
extend
.
multi_url
,
l
=
"undefined"
!=
typeof
r
.
params
?
"object"
==
typeof
r
.
params
?
t
.
param
(
r
.
params
):
r
.
params
:
""
;
a
=
{
url
:
s
,
data
:{
action
:
e
,
ids
:
n
,
params
:
l
}},
Fast
.
api
.
ajax
(
a
,
function
(
e
,
n
){
i
.
trigger
(
"uncheckbox"
);
var
a
=
t
(
o
).
data
(
"success"
)
||
t
.
noop
;
return
(
"function"
!=
typeof
a
||!
1
!==
a
.
call
(
o
,
e
,
n
))
&&
void
i
.
bootstrapTable
(
"refresh"
)},
function
(
e
,
n
){
var
i
=
t
(
o
).
data
(
"error"
)
||
t
.
noop
;
if
(
"function"
==
typeof
i
&&!
1
===
i
.
call
(
o
,
e
,
n
))
return
!
1
})},
events
:
{
operate
:{
"click .btn-editone"
:
function
(
e
,
n
,
o
,
a
){
e
.
stopPropagation
(),
e
.
preventDefault
();
var
r
=
t
(
this
).
closest
(
"table"
),
s
=
r
.
bootstrapTable
(
"getOptions"
),
l
=
o
[
s
.
pk
];
o
=
t
.
extend
({},
o
?
o
:{},{
ids
:
l
});
var
c
=
s
.
extend
.
edit_url
;
Fast
.
api
.
open
(
i
.
api
.
replaceurl
(
c
,
o
,
r
),
__
(
"Edit"
),
t
(
this
).
data
()
||
{})},
"click .btn-delone"
:
function
(
n
,
o
,
a
,
r
){
n
.
stopPropagation
(),
n
.
preventDefault
();
var
s
=
this
,
l
=
t
(
s
).
offset
().
top
-
t
(
window
).
scrollTop
(),
c
=
t
(
s
).
offset
().
left
-
t
(
window
).
scrollLeft
()
-
260
;
l
+
154
>
t
(
window
).
height
()
&&
(
l
-=
154
),
t
(
window
).
width
()
<
480
&&
(
l
=
c
=
e
),
Layer
.
confirm
(
__
(
"Are you sure you want to delete this item?"
),{
icon
:
3
,
title
:
__
(
"Warning"
),
offset
:[
l
,
c
],
shadeClose
:
!
0
},
function
(
e
){
var
n
=
t
(
s
).
closest
(
"table"
),
o
=
n
.
bootstrapTable
(
"getOptions"
);
i
.
api
.
multi
(
"del"
,
a
[
o
.
pk
],
n
,
s
),
Layer
.
close
(
e
)})}},
image
:
{
"click .img-center"
:
function
(
e
,
n
,
i
,
o
){
var
a
=
[];
n
=
n
.
toString
().
split
(
","
),
t
.
each
(
n
,
function
(
t
,
e
){
a
.
push
({
src
:
Fast
.
api
.
cdnurl
(
e
)})}),
Layer
.
photos
({
photos
:{
start
:
t
(
this
).
parent
().
index
(),
data
:
a
},
anim
:
5
})}}},
formatter
:
{
icon
:
function
(
t
,
e
,
n
){
return
t
?(
t
=
null
===
t
?
""
:
t
.
toString
(),
t
=
t
.
indexOf
(
" "
)
>-
1
?
t
:
"fa fa-"
+
t
,
'<i class="'
+
t
+
'"></i> '
+
t
):
""
},
image
:
function
(
t
,
e
,
n
){
t
=
t
?
t
:
"/assets/img/blank.gif"
;
var
i
=
"undefined"
!=
typeof
this
.
classname
?
this
.
classname
:
"img-sm img-center"
;
return
'<a href="javascript:"><img class="'
+
i
+
'" src="'
+
Fast
.
api
.
cdnurl
(
t
)
+
'" /></a>'
},
images
:
function
(
e
,
n
,
i
){
e
=
null
===
e
?
""
:
e
.
toString
();
var
o
=
"undefined"
!=
typeof
this
.
classname
?
this
.
classname
:
"img-sm img-center"
,
a
=
e
.
split
(
","
),
r
=
[];
return
t
.
each
(
a
,
function
(
t
,
e
){
e
=
e
?
e
:
"/assets/img/blank.gif"
,
r
.
push
(
'<a href="javascript:"><img class="'
+
o
+
'" src="'
+
Fast
.
api
.
cdnurl
(
e
)
+
'" /></a>'
)}),
r
.
join
(
" "
)},
content
:
function
(
t
,
n
,
i
){
var
o
=
this
.
width
!=
e
?
this
.
width
.
match
(
/^
\d
+$/
)?
this
.
width
+
"px"
:
this
.
width
:
"250px"
;
return
"<div style='white-space: nowrap; text-overflow:ellipsis; overflow: hidden; max-width:"
+
o
+
";'>"
+
t
+
"</div>"
},
status
:
function
(
e
,
n
,
o
){
var
a
=
{
normal
:
"success"
,
hidden
:
"gray"
,
deleted
:
"danger"
,
locked
:
"info"
};
return
"undefined"
!=
typeof
this
.
custom
&&
(
a
=
t
.
extend
(
a
,
this
.
custom
)),
this
.
custom
=
a
,
this
.
icon
=
"fa fa-circle"
,
i
.
api
.
formatter
.
normal
.
call
(
this
,
e
,
n
,
o
)},
normal
:
function
(
e
,
n
,
i
){
var
o
=
[
"primary"
,
"success"
,
"danger"
,
"warning"
,
"info"
,
"gray"
,
"red"
,
"yellow"
,
"aqua"
,
"blue"
,
"navy"
,
"teal"
,
"olive"
,
"lime"
,
"fuchsia"
,
"purple"
,
"maroon"
],
a
=
{};
"undefined"
!=
typeof
this
.
custom
&&
(
a
=
t
.
extend
(
a
,
this
.
custom
)),
e
=
null
===
e
?
""
:
e
.
toString
();
var
r
=
"object"
==
typeof
this
.
searchList
?
Object
.
keys
(
this
.
searchList
):[],
i
=
r
.
indexOf
(
e
),
s
=
e
&&
"undefined"
!=
typeof
a
[
e
]?
a
[
e
]:
null
,
l
=
i
>-
1
?
this
.
searchList
[
e
]:
null
,
c
=
"undefined"
!=
typeof
this
.
icon
?
this
.
icon
:
null
;
s
||
(
s
=
i
>-
1
&&
"undefined"
!=
typeof
o
[
i
]?
o
[
i
]:
"primary"
),
l
||
(
l
=
__
(
e
.
charAt
(
0
).
toUpperCase
()
+
e
.
slice
(
1
)));
var
d
=
'<span class="text-'
+
s
+
'">'
+
(
c
?
'<i class="'
+
c
+
'"></i> '
:
""
)
+
l
+
"</span>"
;
return
0
!=
this
.
operate
&&
(
d
=
'<a href="javascript:;" class="searchit" data-toggle="tooltip" title="'
+
__
(
"Click to search %s"
,
l
)
+
'" data-field="'
+
this
.
field
+
'" data-value="'
+
e
+
'">'
+
d
+
"</a>"
),
d
},
toggle
:
function
(
t
,
e
,
n
){
var
i
=
this
.
table
,
o
=
i
?
i
.
bootstrapTable
(
"getOptions"
):{},
a
=
o
.
pk
||
"id"
,
r
=
"undefined"
!=
typeof
this
.
color
?
this
.
color
:
"success"
,
s
=
"undefined"
!=
typeof
this
.
yes
?
this
.
yes
:
1
,
l
=
"undefined"
!=
typeof
this
.
no
?
this
.
no
:
0
,
c
=
"undefined"
!=
typeof
this
.
url
?
this
.
url
:
""
,
d
=
""
,
u
=!
1
;
return
"undefined"
!=
typeof
this
.
confirm
&&
(
d
=
"function"
==
typeof
this
.
confirm
?
this
.
confirm
.
call
(
this
,
t
,
e
,
n
):
this
.
confirm
),
"undefined"
!=
typeof
this
.
disable
&&
(
u
=
"function"
==
typeof
this
.
disable
?
this
.
disable
.
call
(
this
,
t
,
e
,
n
):
this
.
disable
),
"<a href='javascript:;' data-toggle='tooltip' title='"
+
__
(
"Click to toggle"
)
+
"' class='btn-change "
+
(
u
?
"btn disabled"
:
""
)
+
"' data-id='"
+
e
[
a
]
+
"' "
+
(
c
?
"data-url='"
+
c
+
"'"
:
""
)
+
(
d
?
"data-confirm='"
+
d
+
"'"
:
""
)
+
" data-params='"
+
this
.
field
+
"="
+
(
t
==
s
?
l
:
s
)
+
"'><i class='fa fa-toggle-on "
+
(
t
==
s
?
"text-"
+
r
:
"fa-flip-horizontal text-gray"
)
+
" fa-2x'></i></a>"
},
url
:
function
(
t
,
e
,
n
){
return
t
=
null
===
t
?
""
:
t
.
toString
(),
'<div class="input-group input-group-sm" style="width:250px;margin:0 auto;"><input type="text" class="form-control input-sm" value="'
+
t
+
'"><span class="input-group-btn input-group-sm"><a href="'
+
t
+
'" target="_blank" class="btn btn-default btn-sm"><i class="fa fa-link"></i></a></span></div>'
},
search
:
function
(
t
,
e
,
n
){
var
i
=
this
.
field
;
return
"undefined"
!=
typeof
this
.
customField
&&
"undefined"
!=
typeof
e
[
this
.
customField
]
&&
(
t
=
e
[
this
.
customField
],
i
=
this
.
customField
),
'<a href="javascript:;" class="searchit" data-toggle="tooltip" title="'
+
__
(
"Click to search %s"
,
t
)
+
'" data-field="'
+
i
+
'" data-value="'
+
t
+
'">'
+
t
+
"</a>"
},
addtabs
:
function
(
t
,
e
,
n
){
var
o
=
i
.
api
.
replaceurl
(
this
.
url
,
e
,
this
.
table
),
a
=
this
.
atitle
?
this
.
atitle
:
__
(
"Search %s"
,
t
);
return
'<a href="'
+
Fast
.
api
.
fixurl
(
o
)
+
'" class="addtabsit" data-value="'
+
t
+
'" title="'
+
a
+
'">'
+
t
+
"</a>"
},
dialog
:
function
(
t
,
e
,
n
){
var
o
=
i
.
api
.
replaceurl
(
this
.
url
,
e
,
this
.
table
),
a
=
this
.
atitle
?
this
.
atitle
:
__
(
"View %s"
,
t
);
return
'<a href="'
+
Fast
.
api
.
fixurl
(
o
)
+
'" class="dialogit" data-value="'
+
t
+
'" title="'
+
a
+
'">'
+
t
+
"</a>"
},
flag
:
function
(
e
,
n
,
i
){
var
o
=
this
;
e
=
null
===
e
?
""
:
e
.
toString
();
var
a
=
{
index
:
"success"
,
hot
:
"warning"
,
recommend
:
"danger"
,
new
:
"info"
};
"undefined"
!=
typeof
this
.
custom
&&
(
a
=
t
.
extend
(
a
,
this
.
custom
));
var
r
=
this
.
field
;
"undefined"
!=
typeof
this
.
customField
&&
"undefined"
!=
typeof
n
[
this
.
customField
]
&&
(
e
=
n
[
this
.
customField
],
r
=
this
.
customField
);
var
s
,
l
,
c
,
d
=
[],
u
=
e
.
split
(
","
);
return
t
.
each
(
u
,
function
(
t
,
e
){
return
e
=
null
===
e
?
""
:
e
.
toString
(),
""
==
e
||
(
s
=
e
&&
"undefined"
!=
typeof
a
[
e
]?
a
[
e
]:
"primary"
,
l
=
"undefined"
!=
typeof
o
.
searchList
&&
"undefined"
!=
typeof
o
.
searchList
[
e
]?
o
.
searchList
[
e
]:
__
(
e
.
charAt
(
0
).
toUpperCase
()
+
e
.
slice
(
1
)),
c
=
'<span class="label label-'
+
s
+
'">'
+
l
+
"</span>"
,
void
(
o
.
operate
?
d
.
push
(
'<a href="javascript:;" class="searchit" data-toggle="tooltip" title="'
+
__
(
"Click to search %s"
,
l
)
+
'" data-field="'
+
r
+
'" data-value="'
+
e
+
'">'
+
c
+
"</a>"
):
d
.
push
(
c
)))}),
d
.
join
(
" "
)},
label
:
function
(
t
,
e
,
n
){
return
i
.
api
.
formatter
.
flag
.
call
(
this
,
t
,
e
,
n
)},
datetime
:
function
(
t
,
e
,
i
){
var
o
=
"undefined"
==
typeof
this
.
datetimeFormat
?
"YYYY-MM-DD HH:mm:ss"
:
this
.
datetimeFormat
;
return
isNaN
(
t
)?
t
?
n
(
t
).
format
(
o
):
__
(
"None"
):
t
?
n
(
1
e3
*
parseInt
(
t
)).
format
(
o
):
__
(
"None"
)},
operate
:
function
(
e
,
n
,
o
){
var
a
=
this
.
table
,
r
=
a
?
a
.
bootstrapTable
(
"getOptions"
):{},
s
=
t
.
extend
([],
this
.
buttons
||
[]),
l
=
[];
return
s
.
forEach
(
function
(
t
){
l
.
push
(
t
.
name
)}),
""
!==
r
.
extend
.
dragsort_url
&&
l
.
indexOf
(
"dragsort"
)
===-
1
&&
s
.
push
(
i
.
button
.
dragsort
),
""
!==
r
.
extend
.
edit_url
&&
l
.
indexOf
(
"edit"
)
===-
1
&&
(
i
.
button
.
edit
.
url
=
r
.
extend
.
edit_url
,
s
.
push
(
i
.
button
.
edit
)),
""
!==
r
.
extend
.
del_url
&&
l
.
indexOf
(
"del"
)
===-
1
&&
s
.
push
(
i
.
button
.
del
),
i
.
api
.
buttonlink
(
this
,
s
,
e
,
n
,
o
,
"operate"
)},
buttons
:
function
(
e
,
n
,
o
){
var
a
=
t
.
extend
([],
this
.
buttons
||
[]);
return
i
.
api
.
buttonlink
(
this
,
a
,
e
,
n
,
o
,
"buttons"
)}},
buttonlink
:
function
(
e
,
n
,
o
,
a
,
r
,
s
){
var
l
=
e
.
table
;
s
=
"undefined"
==
typeof
s
?
"buttons"
:
s
;
var
c
,
d
,
u
,
p
,
h
,
f
,
m
,
g
,
y
,
v
,
b
,
x
,
w
,
_
=
l
?
l
.
bootstrapTable
(
"getOptions"
):{},
k
=
[],
C
=
e
.
fieldIndex
,
S
=
{};
if
(
t
.
each
(
n
,
function
(
t
,
e
){
if
(
"operate"
===
s
){
if
(
"dragsort"
===
e
.
name
&&
"undefined"
==
typeof
a
[
i
.
config
.
dragsortfield
])
return
!
0
;
if
([
"add"
,
"edit"
,
"del"
,
"multi"
,
"dragsort"
].
indexOf
(
e
.
name
)
>-
1
&&!
_
.
extend
[
e
.
name
+
"_url"
])
return
!
0
}
var
n
=
l
.
data
(
s
+
"-"
+
e
.
name
);
if
(
"undefined"
==
typeof
n
||
n
){
if
(
c
=
"function"
==
typeof
e
.
hidden
?
e
.
hidden
.
call
(
l
,
a
,
e
):
"undefined"
!=
typeof
e
.
hidden
&&
e
.
hidden
)
return
!
0
;
if
(
d
=
"function"
==
typeof
e
.
visible
?
e
.
visible
.
call
(
l
,
a
,
e
):
"undefined"
==
typeof
e
.
visible
||
e
.
visible
,
!
d
)
return
!
0
;
x
=
e
.
dropdown
?
e
.
dropdown
:
""
,
p
=
e
.
url
?
e
.
url
:
""
,
p
=
"function"
==
typeof
p
?
p
.
call
(
l
,
a
,
e
):
p
?
Fast
.
api
.
fixurl
(
i
.
api
.
replaceurl
(
p
,
a
,
l
)):
"javascript:;"
,
h
=
e
.
classname
?
e
.
classname
:
"btn-primary btn-"
+
name
+
"one"
,
f
=
e
.
icon
?
e
.
icon
:
""
,
m
=
"function"
==
typeof
e
.
text
?
e
.
text
.
call
(
l
,
a
,
e
):
e
.
text
?
e
.
text
:
""
,
g
=
"function"
==
typeof
e
.
title
?
e
.
title
.
call
(
l
,
a
,
e
):
e
.
title
?
e
.
title
:
m
,
y
=
e
.
refresh
?
'data-refresh="'
+
e
.
refresh
+
'"'
:
""
,
v
=
"function"
==
typeof
e
.
confirm
?
e
.
confirm
.
call
(
l
,
a
,
e
):
"undefined"
!=
typeof
e
.
confirm
&&
e
.
confirm
,
v
=
v
?
'data-confirm="'
+
v
+
'"'
:
""
,
b
=
e
.
extend
?
e
.
extend
:
""
,
u
=
"function"
==
typeof
e
.
disable
?
e
.
disable
.
call
(
l
,
a
,
e
):
"undefined"
!=
typeof
e
.
disable
&&
e
.
disable
,
u
&&
(
h
+=
" disabled"
),
w
=
'<a href="'
+
p
+
'" class="'
+
h
+
'" '
+
(
v
?
v
+
" "
:
""
)
+
(
y
?
y
+
" "
:
""
)
+
b
+
' title="'
+
g
+
'" data-table-id="'
+
(
l
?
l
.
attr
(
"id"
):
""
)
+
'" data-field-index="'
+
C
+
'" data-row-index="'
+
r
+
'" data-button-index="'
+
t
+
'"><i class="'
+
f
+
'"></i>'
+
(
m
?
" "
+
m
:
""
)
+
"</a>"
,
x
?(
"undefined"
==
typeof
S
[
x
]
&&
(
S
[
x
]
=
[]),
S
[
x
].
push
(
w
)):
k
.
push
(
w
)}}),
!
t
.
isEmptyObject
(
S
)){
var
T
=
[];
t
.
each
(
S
,
function
(
t
,
e
){
T
.
push
(
'<div class="btn-group"><button type="button" class="btn btn-primary dropdown-toggle btn-xs" data-toggle="dropdown">'
+
t
+
'</button><button type="button" class="btn btn-primary dropdown-toggle btn-xs" data-toggle="dropdown"><span class="caret"></span></button><ul class="dropdown-menu pull-right"><li>'
+
e
.
join
(
"</li><li>"
)
+
"</li></ul></div>"
)}),
k
.
unshift
(
T
)}
return
k
.
join
(
" "
)},
replaceurl
:
function
(
t
,
e
,
n
){
var
i
=
n
?
n
.
bootstrapTable
(
"getOptions"
):
null
,
o
=
i
?
e
[
i
.
pk
]:
0
;
return
e
.
ids
=
o
?
o
:
"undefined"
!=
typeof
e
.
ids
?
e
.
ids
:
0
,
t
=
t
.
match
(
/
\{
ids
\}
/i
)?
t
:
t
+
(
t
.
match
(
/
(\?
|&
)
+/
)?
"&ids="
:
"/ids/"
)
+
"{ids}"
,
t
=
t
.
replace
(
/
\{(
.*
?)\}
/gi
,
function
(
t
){
if
(
t
=
t
.
substring
(
1
,
t
.
length
-
1
),
t
.
indexOf
(
"."
)
!==-
1
){
for
(
var
n
=
e
,
i
=
t
.
split
(
/
\.
/
),
o
=
0
;
o
<
i
.
length
;
o
++
)
"undefined"
!=
typeof
n
[
i
[
o
]]
&&
(
n
=
n
[
i
[
o
]]);
return
"object"
==
typeof
n
?
""
:
n
}
return
e
[
t
]})},
selectedids
:
function
(
e
,
n
){
var
i
=
e
.
bootstrapTable
(
"getOptions"
);
return
!
n
&&
i
.
maintainSelected
?
i
.
selectedIds
:
t
.
map
(
e
.
bootstrapTable
(
"getSelections"
),
function
(
t
){
return
t
[
i
.
pk
]})},
selecteddata
:
function
(
t
,
e
){
var
n
=
t
.
bootstrapTable
(
"getOptions"
);
return
!
e
&&
n
.
maintainSelected
?
n
.
selectedData
:
t
.
bootstrapTable
(
"getSelections"
)},
toggleattr
:
function
(
e
){
t
(
"input[type='checkbox']"
,
e
).
trigger
(
"click"
)},
getrowdata
:
function
(
t
,
e
){
e
=
parseInt
(
e
);
var
n
=
t
.
bootstrapTable
(
"getData"
);
return
"undefined"
!=
typeof
n
[
e
]?
n
[
e
]:
null
},
getrowbyindex
:
function
(
t
,
e
){
return
i
.
api
.
getrowdata
(
t
,
e
)},
getrowbyid
:
function
(
e
,
n
){
var
o
=
{},
a
=
e
.
bootstrapTable
(
"getOptions"
);
return
t
.
each
(
i
.
api
.
selecteddata
(
e
),
function
(
t
,
e
){
if
(
e
[
a
.
pk
]
==
n
)
return
o
=
e
,
!
1
}),
o
}}};
return
i
}),
function
(
t
){
t
.
fn
.
dragsort
=
function
(
e
){
if
(
"destroy"
==
e
)
return
void
t
(
this
.
selector
).
trigger
(
"dragsort-uninit"
);
var
n
=
t
.
extend
({},
t
.
fn
.
dragsort
.
defaults
,
e
),
i
=
[],
o
=
null
,
a
=
null
;
return
this
.
each
(
function
(
e
,
r
){
t
(
r
).
is
(
"table"
)
&&
1
==
t
(
r
).
children
().
size
()
&&
t
(
r
).
children
().
is
(
"tbody"
)
&&
(
r
=
t
(
r
).
children
().
get
(
0
));
var
s
=
{
draggedItem
:
null
,
placeHolderItem
:
null
,
pos
:
null
,
offset
:
null
,
offsetLimit
:
null
,
scroll
:
null
,
container
:
r
,
init
:
function
(){
n
.
tagName
=
""
==
n
.
tagName
?
0
==
t
(
this
.
container
).
children
().
size
()?
"li"
:
t
(
this
.
container
).
children
().
get
(
0
).
tagName
.
toLowerCase
():
n
.
tagName
,
""
==
n
.
itemSelector
&&
(
n
.
itemSelector
=
n
.
tagName
),
""
==
n
.
dragSelector
&&
(
n
.
dragSelector
=
n
.
tagName
),
""
==
n
.
placeHolderTemplate
&&
(
n
.
placeHolderTemplate
=
"<"
+
n
.
tagName
+
"> </"
+
n
.
tagName
+
">"
),
t
(
this
.
container
).
attr
(
"data-listidx"
,
e
).
mousedown
(
this
.
grabItem
).
bind
(
"dragsort-uninit"
,
this
.
uninit
),
this
.
styleDragHandlers
(
!
0
)},
uninit
:
function
(){
var
e
=
i
[
t
(
this
).
attr
(
"data-listidx"
)];
t
(
e
.
container
).
unbind
(
"mousedown"
,
e
.
grabItem
).
unbind
(
"dragsort-uninit"
),
e
.
styleDragHandlers
(
!
1
)},
getItems
:
function
(){
return
t
(
this
.
container
).
children
(
n
.
itemSelector
)},
styleDragHandlers
:
function
(
e
){
this
.
getItems
().
map
(
function
(){
return
t
(
this
).
is
(
n
.
dragSelector
)?
this
:
t
(
this
).
find
(
n
.
dragSelector
).
get
()}).
css
(
"cursor"
,
e
?
"pointer"
:
""
)},
grabItem
:
function
(
e
){
var
o
=
i
[
t
(
this
).
attr
(
"data-listidx"
)],
a
=
t
(
e
.
target
).
closest
(
"[data-listidx] > "
+
n
.
tagName
).
get
(
0
),
r
=
o
.
getItems
().
filter
(
function
(){
return
this
==
a
}).
size
()
>
0
;
if
(
!
(
1
!=
e
.
which
||
t
(
e
.
target
).
is
(
n
.
dragSelectorExclude
)
||
t
(
e
.
target
).
closest
(
n
.
dragSelectorExclude
).
size
()
>
0
)
&&
r
){
for
(
var
s
=
e
.
target
;
!
t
(
s
).
is
(
n
.
dragSelector
);){
if
(
s
==
this
)
return
;
s
=
s
.
parentNode
}
t
(
s
).
attr
(
"data-cursor"
,
t
(
s
).
css
(
"cursor"
)),
t
(
s
).
css
(
"cursor"
,
"move"
);
var
l
=
this
,
c
=
function
(){
o
.
dragStart
.
call
(
l
,
e
),
t
(
o
.
container
).
unbind
(
"mousemove"
,
c
)};
t
(
o
.
container
).
mousemove
(
c
).
mouseup
(
function
(){
t
(
o
.
container
).
unbind
(
"mousemove"
,
c
),
t
(
s
).
css
(
"cursor"
,
t
(
s
).
attr
(
"data-cursor"
))})}},
dragStart
:
function
(
e
){
null
!=
o
&&
null
!=
o
.
draggedItem
&&
o
.
dropItem
(),
o
=
i
[
t
(
this
).
attr
(
"data-listidx"
)],
o
.
draggedItem
=
t
(
e
.
target
).
closest
(
"[data-listidx] > "
+
n
.
tagName
),
o
.
draggedItem
.
attr
(
"data-origpos"
,
t
(
this
).
attr
(
"data-listidx"
)
+
"-"
+
t
(
o
.
container
).
children
().
index
(
o
.
draggedItem
));
var
a
=
parseInt
(
o
.
draggedItem
.
css
(
"marginTop"
)),
r
=
parseInt
(
o
.
draggedItem
.
css
(
"marginLeft"
));
if
(
o
.
offset
=
o
.
draggedItem
.
offset
(),
o
.
offset
.
top
=
e
.
pageY
-
o
.
offset
.
top
+
(
isNaN
(
a
)?
0
:
a
)
-
1
,
o
.
offset
.
left
=
e
.
pageX
-
o
.
offset
.
left
+
(
isNaN
(
r
)?
0
:
r
)
-
1
,
!
n
.
dragBetween
){
var
s
=
0
==
t
(
o
.
container
).
outerHeight
()?
Math
.
max
(
1
,
Math
.
round
(.
5
+
o
.
getItems
().
size
()
*
o
.
draggedItem
.
outerWidth
()
/
t
(
o
.
container
).
outerWidth
()))
*
o
.
draggedItem
.
outerHeight
():
t
(
o
.
container
).
outerHeight
();
o
.
offsetLimit
=
t
(
o
.
container
).
offset
(),
o
.
offsetLimit
.
right
=
o
.
offsetLimit
.
left
+
t
(
o
.
container
).
outerWidth
()
-
o
.
draggedItem
.
outerWidth
(),
o
.
offsetLimit
.
bottom
=
o
.
offsetLimit
.
top
+
s
-
o
.
draggedItem
.
outerHeight
()}
var
l
=
o
.
draggedItem
.
height
(),
c
=
o
.
draggedItem
.
width
();
if
(
"tr"
==
n
.
tagName
?(
o
.
draggedItem
.
children
().
each
(
function
(){
t
(
this
).
width
(
t
(
this
).
width
())}),
o
.
placeHolderItem
=
o
.
draggedItem
.
clone
().
attr
(
"data-placeholder"
,
!
0
),
o
.
draggedItem
.
after
(
o
.
placeHolderItem
),
o
.
placeHolderItem
.
children
().
each
(
function
(){
t
(
this
).
html
(
" "
)})):(
o
.
draggedItem
.
after
(
n
.
placeHolderTemplate
),
o
.
placeHolderItem
=
o
.
draggedItem
.
next
().
css
({
height
:
l
,
width
:
c
}).
attr
(
"data-placeholder"
,
!
0
)),
"td"
==
n
.
tagName
){
var
d
=
o
.
draggedItem
.
closest
(
"table"
).
get
(
0
);
t
(
"<table id='"
+
d
.
id
+
"' style='border-width: 0px;' class='dragSortItem "
+
d
.
className
+
"'><tr></tr></table>"
).
appendTo
(
"body"
).
children
().
append
(
o
.
draggedItem
)}
var
u
=
o
.
draggedItem
.
attr
(
"style"
);
o
.
draggedItem
.
attr
(
"data-origstyle"
,
u
?
u
:
""
),
o
.
draggedItem
.
css
({
position
:
"absolute"
,
opacity
:.
8
,
"z-index"
:
999
,
height
:
l
,
width
:
c
}),
o
.
scroll
=
{
moveX
:
0
,
moveY
:
0
,
maxX
:
t
(
document
).
width
()
-
t
(
window
).
width
(),
maxY
:
t
(
document
).
height
()
-
t
(
window
).
height
()},
o
.
scroll
.
scrollY
=
window
.
setInterval
(
function
(){
if
(
n
.
scrollContainer
!=
window
)
return
void
t
(
n
.
scrollContainer
).
scrollTop
(
t
(
n
.
scrollContainer
).
scrollTop
()
+
o
.
scroll
.
moveY
);
var
e
=
t
(
n
.
scrollContainer
).
scrollTop
();(
o
.
scroll
.
moveY
>
0
&&
e
<
o
.
scroll
.
maxY
||
o
.
scroll
.
moveY
<
0
&&
e
>
0
)
&&
(
t
(
n
.
scrollContainer
).
scrollTop
(
e
+
o
.
scroll
.
moveY
),
o
.
draggedItem
.
css
(
"top"
,
o
.
draggedItem
.
offset
().
top
+
o
.
scroll
.
moveY
+
1
))},
10
),
o
.
scroll
.
scrollX
=
window
.
setInterval
(
function
(){
if
(
n
.
scrollContainer
!=
window
)
return
void
t
(
n
.
scrollContainer
).
scrollLeft
(
t
(
n
.
scrollContainer
).
scrollLeft
()
+
o
.
scroll
.
moveX
);
var
e
=
t
(
n
.
scrollContainer
).
scrollLeft
();(
o
.
scroll
.
moveX
>
0
&&
e
<
o
.
scroll
.
maxX
||
o
.
scroll
.
moveX
<
0
&&
e
>
0
)
&&
(
t
(
n
.
scrollContainer
).
scrollLeft
(
e
+
o
.
scroll
.
moveX
),
o
.
draggedItem
.
css
(
"left"
,
o
.
draggedItem
.
offset
().
left
+
o
.
scroll
.
moveX
+
1
))},
10
),
t
(
i
).
each
(
function
(
t
,
e
){
e
.
createDropTargets
(),
e
.
buildPositionTable
()}),
o
.
setPos
(
e
.
pageX
,
e
.
pageY
),
t
(
document
).
bind
(
"mousemove"
,
o
.
swapItems
),
t
(
document
).
bind
(
"mouseup"
,
o
.
dropItem
),
n
.
scrollContainer
!=
window
&&
t
(
window
).
bind
(
"wheel"
,
o
.
wheel
)},
setPos
:
function
(
e
,
i
){
var
a
=
i
-
this
.
offset
.
top
,
r
=
e
-
this
.
offset
.
left
;
n
.
dragBetween
||
(
a
=
Math
.
min
(
this
.
offsetLimit
.
bottom
,
Math
.
max
(
a
,
this
.
offsetLimit
.
top
)),
r
=
Math
.
min
(
this
.
offsetLimit
.
right
,
Math
.
max
(
r
,
this
.
offsetLimit
.
left
)));
var
s
=
this
.
draggedItem
.
offsetParent
().
not
(
"body"
).
offset
();
if
(
null
!=
s
&&
(
a
-=
s
.
top
,
r
-=
s
.
left
),
n
.
scrollContainer
==
window
)
i
-=
t
(
window
).
scrollTop
(),
e
-=
t
(
window
).
scrollLeft
(),
i
=
Math
.
max
(
0
,
i
-
t
(
window
).
height
()
+
5
)
+
Math
.
min
(
0
,
i
-
5
),
e
=
Math
.
max
(
0
,
e
-
t
(
window
).
width
()
+
5
)
+
Math
.
min
(
0
,
e
-
5
);
else
{
var
l
=
t
(
n
.
scrollContainer
),
c
=
l
.
offset
();
i
=
Math
.
max
(
0
,
i
-
l
.
height
()
-
c
.
top
)
+
Math
.
min
(
0
,
i
-
c
.
top
),
e
=
Math
.
max
(
0
,
e
-
l
.
width
()
-
c
.
left
)
+
Math
.
min
(
0
,
e
-
c
.
left
)}
o
.
scroll
.
moveX
=
0
==
e
?
0
:
e
*
n
.
scrollSpeed
/
Math
.
abs
(
e
),
o
.
scroll
.
moveY
=
0
==
i
?
0
:
i
*
n
.
scrollSpeed
/
Math
.
abs
(
i
),
this
.
draggedItem
.
css
({
top
:
a
,
left
:
r
})},
wheel
:
function
(
e
){
if
(
o
&&
n
.
scrollContainer
!=
window
){
var
i
=
t
(
n
.
scrollContainer
),
a
=
i
.
offset
();
if
(
e
=
e
.
originalEvent
,
e
.
clientX
>
a
.
left
&&
e
.
clientX
<
a
.
left
+
i
.
width
()
&&
e
.
clientY
>
a
.
top
&&
e
.
clientY
<
a
.
top
+
i
.
height
()){
var
r
=
(
0
==
e
.
deltaMode
?
1
:
10
)
*
e
.
deltaY
;
i
.
scrollTop
(
i
.
scrollTop
()
+
r
),
e
.
preventDefault
()}}},
buildPositionTable
:
function
(){
var
e
=
[];
this
.
getItems
().
not
([
o
.
draggedItem
[
0
],
o
.
placeHolderItem
[
0
]]).
each
(
function
(
n
){
var
i
=
t
(
this
).
offset
();
i
.
right
=
i
.
left
+
t
(
this
).
outerWidth
(),
i
.
bottom
=
i
.
top
+
t
(
this
).
outerHeight
(),
i
.
elm
=
this
,
e
[
n
]
=
i
}),
this
.
pos
=
e
},
dropItem
:
function
(){
if
(
null
!=
o
.
draggedItem
){
var
e
=
o
.
draggedItem
.
attr
(
"data-origstyle"
);
if
(
o
.
draggedItem
.
attr
(
"style"
,
e
),
""
==
e
&&
o
.
draggedItem
.
removeAttr
(
"style"
),
o
.
draggedItem
.
removeAttr
(
"data-origstyle"
),
o
.
styleDragHandlers
(
!
0
),
o
.
placeHolderItem
.
before
(
o
.
draggedItem
),
o
.
placeHolderItem
.
remove
(),
t
(
"[data-droptarget], .dragSortItem"
).
remove
(),
window
.
clearInterval
(
o
.
scroll
.
scrollY
),
window
.
clearInterval
(
o
.
scroll
.
scrollX
),
o
.
draggedItem
.
attr
(
"data-origpos"
)
!=
t
(
i
).
index
(
o
)
+
"-"
+
t
(
o
.
container
).
children
().
index
(
o
.
draggedItem
)
&&
0
==
n
.
dragEnd
.
apply
(
o
.
draggedItem
)){
var
a
=
o
.
draggedItem
.
attr
(
"data-origpos"
).
split
(
"-"
),
r
=
t
(
i
[
a
[
0
]].
container
).
children
().
not
(
o
.
draggedItem
).
eq
(
a
[
1
]);
r
.
size
()
>
0
?
r
.
before
(
o
.
draggedItem
):
0
==
a
[
1
]?
t
(
i
[
a
[
0
]].
container
).
prepend
(
o
.
draggedItem
):
t
(
i
[
a
[
0
]].
container
).
append
(
o
.
draggedItem
)}
return
o
.
draggedItem
.
removeAttr
(
"data-origpos"
),
o
.
draggedItem
=
null
,
t
(
document
).
unbind
(
"mousemove"
,
o
.
swapItems
),
t
(
document
).
unbind
(
"mouseup"
,
o
.
dropItem
),
n
.
scrollContainer
!=
window
&&
t
(
window
).
unbind
(
"wheel"
,
o
.
wheel
),
!
1
}},
swapItems
:
function
(
e
){
if
(
null
==
o
.
draggedItem
)
return
!
1
;
o
.
setPos
(
e
.
pageX
,
e
.
pageY
);
for
(
var
r
=
o
.
findPos
(
e
.
pageX
,
e
.
pageY
),
s
=
o
,
l
=
0
;
r
==-
1
&&
n
.
dragBetween
&&
l
<
i
.
length
;
l
++
)
r
=
i
[
l
].
findPos
(
e
.
pageX
,
e
.
pageY
),
s
=
i
[
l
];
if
(
r
==-
1
)
return
!
1
;
var
c
=
function
(){
return
t
(
s
.
container
).
children
().
not
(
s
.
draggedItem
)},
d
=
c
().
not
(
n
.
itemSelector
).
each
(
function
(
t
){
this
.
idx
=
c
().
index
(
this
)});
return
null
==
a
||
a
.
top
>
o
.
draggedItem
.
offset
().
top
||
a
.
left
>
o
.
draggedItem
.
offset
().
left
?
t
(
s
.
pos
[
r
].
elm
).
before
(
o
.
placeHolderItem
):
t
(
s
.
pos
[
r
].
elm
).
after
(
o
.
placeHolderItem
),
d
.
each
(
function
(){
var
e
=
c
().
eq
(
this
.
idx
).
get
(
0
);
this
!=
e
&&
c
().
index
(
this
)
<
this
.
idx
?
t
(
this
).
insertAfter
(
e
):
this
!=
e
&&
t
(
this
).
insertBefore
(
e
)}),
t
(
i
).
each
(
function
(
t
,
e
){
e
.
createDropTargets
(),
e
.
buildPositionTable
()}),
a
=
o
.
draggedItem
.
offset
(),
!
1
},
findPos
:
function
(
t
,
e
){
for
(
var
n
=
0
;
n
<
this
.
pos
.
length
;
n
++
)
if
(
this
.
pos
[
n
].
left
<
t
&&
this
.
pos
[
n
].
right
>
t
&&
this
.
pos
[
n
].
top
<
e
&&
this
.
pos
[
n
].
bottom
>
e
)
return
n
;
return
-
1
},
createDropTargets
:
function
(){
n
.
dragBetween
&&
t
(
i
).
each
(
function
(){
var
e
=
t
(
this
.
container
).
find
(
"[data-placeholder]"
),
i
=
t
(
this
.
container
).
find
(
"[data-droptarget]"
);
e
.
size
()
>
0
&&
i
.
size
()
>
0
?
i
.
remove
():
0
==
e
.
size
()
&&
0
==
i
.
size
()
&&
(
"td"
==
n
.
tagName
?
t
(
n
.
placeHolderTemplate
).
attr
(
"data-droptarget"
,
!
0
).
appendTo
(
this
.
container
):
t
(
this
.
container
).
append
(
o
.
placeHolderItem
.
removeAttr
(
"data-placeholder"
).
clone
().
attr
(
"data-droptarget"
,
!
0
)),
o
.
placeHolderItem
.
attr
(
"data-placeholder"
,
!
0
))})}};
s
.
init
(),
i
.
push
(
s
)}),
this
},
t
.
fn
.
dragsort
.
defaults
=
{
tagName
:
""
,
itemSelector
:
""
,
dragSelector
:
""
,
dragSelectorExclude
:
"input, textarea"
,
dragEnd
:
function
(){},
dragBetween
:
!
1
,
placeHolderTemplate
:
""
,
scrollContainer
:
window
,
scrollSpeed
:
5
}}(
jQuery
),
define
(
"dragsort"
,
function
(){}),
function
(
t
){
t
.
fn
.
drag
=
function
(
e
,
n
,
i
){
var
o
=
"string"
==
typeof
e
?
e
:
""
,
a
=
t
.
isFunction
(
e
)?
e
:
t
.
isFunction
(
n
)?
n
:
null
;
return
0
!==
o
.
indexOf
(
"drag"
)
&&
(
o
=
"drag"
+
o
),
i
=
(
e
==
a
?
n
:
i
)
||
{},
a
?
this
.
bind
(
o
,
i
,
a
):
this
.
trigger
(
o
)};
var
e
=
t
.
event
,
n
=
e
.
special
,
i
=
n
.
drag
=
{
defaults
:{
which
:
1
,
distance
:
0
,
not
:
":input"
,
handle
:
null
,
relative
:
!
1
,
drop
:
!
0
,
click
:
!
1
},
datakey
:
"dragdata"
,
noBubble
:
!
0
,
add
:
function
(
e
){
var
n
=
t
.
data
(
this
,
i
.
datakey
),
o
=
e
.
data
||
{};
n
.
related
+=
1
,
t
.
each
(
i
.
defaults
,
function
(
t
,
e
){
void
0
!==
o
[
t
]
&&
(
n
[
t
]
=
o
[
t
])})},
remove
:
function
(){
t
.
data
(
this
,
i
.
datakey
).
related
-=
1
},
setup
:
function
(){
if
(
!
t
.
data
(
this
,
i
.
datakey
)){
var
n
=
t
.
extend
({
related
:
0
},
i
.
defaults
);
t
.
data
(
this
,
i
.
datakey
,
n
),
e
.
add
(
this
,
"touchstart mousedown"
,
i
.
init
,
n
),
this
.
attachEvent
&&
this
.
attachEvent
(
"ondragstart"
,
i
.
dontstart
)}},
teardown
:
function
(){
var
n
=
t
.
data
(
this
,
i
.
datakey
)
||
{};
n
.
related
||
(
t
.
removeData
(
this
,
i
.
datakey
),
e
.
remove
(
this
,
"touchstart mousedown"
,
i
.
init
),
i
.
textselect
(
!
0
),
this
.
detachEvent
&&
this
.
detachEvent
(
"ondragstart"
,
i
.
dontstart
))},
init
:
function
(
o
){
if
(
!
i
.
touched
){
var
a
,
r
=
o
.
data
;
if
(
!
(
0
!=
o
.
which
&&
r
.
which
>
0
&&
o
.
which
!=
r
.
which
)
&&!
t
(
o
.
target
).
is
(
r
.
not
)
&&
(
!
r
.
handle
||
t
(
o
.
target
).
closest
(
r
.
handle
,
o
.
currentTarget
).
length
)
&&
(
i
.
touched
=
"touchstart"
==
o
.
type
?
this
:
null
,
r
.
propagates
=
1
,
r
.
mousedown
=
this
,
r
.
interactions
=
[
i
.
interaction
(
this
,
r
)],
r
.
target
=
o
.
target
,
r
.
pageX
=
o
.
pageX
,
r
.
pageY
=
o
.
pageY
,
r
.
dragging
=
null
,
a
=
i
.
hijack
(
o
,
"draginit"
,
r
),
r
.
propagates
))
return
a
=
i
.
flatten
(
a
),
a
&&
a
.
length
&&
(
r
.
interactions
=
[],
t
.
each
(
a
,
function
(){
r
.
interactions
.
push
(
i
.
interaction
(
this
,
r
))})),
r
.
propagates
=
r
.
interactions
.
length
,
r
.
drop
!==!
1
&&
n
.
drop
&&
n
.
drop
.
handler
(
o
,
r
),
i
.
textselect
(
!
1
),
i
.
touched
?
e
.
add
(
i
.
touched
,
"touchmove touchend"
,
i
.
handler
,
r
):
e
.
add
(
document
,
"mousemove mouseup"
,
i
.
handler
,
r
),
!
(
!
i
.
touched
||
r
.
live
)
&&
void
0
}},
interaction
:
function
(
e
,
n
){
var
o
=
t
(
e
)[
n
.
relative
?
"position"
:
"offset"
]()
||
{
top
:
0
,
left
:
0
};
return
{
drag
:
e
,
callback
:
new
i
.
callback
,
droppable
:[],
offset
:
o
}},
handler
:
function
(
o
){
var
a
=
o
.
data
;
switch
(
o
.
type
){
case
!
a
.
dragging
&&
"touchmove"
:
o
.
preventDefault
();
case
!
a
.
dragging
&&
"mousemove"
:
if
(
Math
.
pow
(
o
.
pageX
-
a
.
pageX
,
2
)
+
Math
.
pow
(
o
.
pageY
-
a
.
pageY
,
2
)
<
Math
.
pow
(
a
.
distance
,
2
))
break
;
o
.
target
=
a
.
target
,
i
.
hijack
(
o
,
"dragstart"
,
a
),
a
.
propagates
&&
(
a
.
dragging
=!
0
);
case
"touchmove"
:
o
.
preventDefault
();
case
"mousemove"
:
if
(
a
.
dragging
){
if
(
i
.
hijack
(
o
,
"drag"
,
a
),
a
.
propagates
){
a
.
drop
!==!
1
&&
n
.
drop
&&
n
.
drop
.
handler
(
o
,
a
);
break
}
o
.
type
=
"mouseup"
}
case
"touchend"
:
case
"mouseup"
:
default
:
i
.
touched
?
e
.
remove
(
i
.
touched
,
"touchmove touchend"
,
i
.
handler
):
e
.
remove
(
document
,
"mousemove mouseup"
,
i
.
handler
),
a
.
dragging
&&
(
a
.
drop
!==!
1
&&
n
.
drop
&&
n
.
drop
.
handler
(
o
,
a
),
i
.
hijack
(
o
,
"dragend"
,
a
)),
i
.
textselect
(
!
0
),
a
.
click
===!
1
&&
a
.
dragging
&&
t
.
data
(
a
.
mousedown
,
"suppress.click"
,(
new
Date
).
getTime
()
+
5
),
a
.
dragging
=
i
.
touched
=!
1
}},
hijack
:
function
(
n
,
o
,
a
,
r
,
s
){
if
(
a
){
var
l
,
c
,
d
,
u
=
{
event
:
n
.
originalEvent
,
type
:
n
.
type
},
p
=
o
.
indexOf
(
"drop"
)?
"drag"
:
"drop"
,
h
=
r
||
0
,
f
=
isNaN
(
r
)?
a
.
interactions
.
length
:
r
;
n
.
type
=
o
,
n
.
originalEvent
=
null
,
a
.
results
=
[];
do
if
(
c
=
a
.
interactions
[
h
]){
if
(
"dragend"
!==
o
&&
c
.
cancelled
)
continue
;
d
=
i
.
properties
(
n
,
a
,
c
),
c
.
results
=
[],
t
(
s
||
c
[
p
]
||
a
.
droppable
).
each
(
function
(
r
,
s
){
if
(
d
.
target
=
s
,
n
.
isPropagationStopped
=
function
(){
return
!
1
},
l
=
s
?
e
.
dispatch
.
call
(
s
,
n
,
d
):
null
,
l
===!
1
?(
"drag"
==
p
&&
(
c
.
cancelled
=!
0
,
a
.
propagates
-=
1
),
"drop"
==
o
&&
(
c
[
p
][
r
]
=
null
)):
"dropinit"
==
o
&&
c
.
droppable
.
push
(
i
.
element
(
l
)
||
s
),
"dragstart"
==
o
&&
(
c
.
proxy
=
t
(
i
.
element
(
l
)
||
c
.
drag
)[
0
]),
c
.
results
.
push
(
l
),
delete
n
.
result
,
"dropinit"
!==
o
)
return
l
}),
a
.
results
[
h
]
=
i
.
flatten
(
c
.
results
),
"dropinit"
==
o
&&
(
c
.
droppable
=
i
.
flatten
(
c
.
droppable
)),
"dragstart"
!=
o
||
c
.
cancelled
||
d
.
update
()}
while
(
++
h
<
f
);
return
n
.
type
=
u
.
type
,
n
.
originalEvent
=
u
.
event
,
i
.
flatten
(
a
.
results
)}},
properties
:
function
(
t
,
e
,
n
){
var
o
=
n
.
callback
;
return
o
.
drag
=
n
.
drag
,
o
.
proxy
=
n
.
proxy
||
n
.
drag
,
o
.
startX
=
e
.
pageX
,
o
.
startY
=
e
.
pageY
,
o
.
deltaX
=
t
.
pageX
-
e
.
pageX
,
o
.
deltaY
=
t
.
pageY
-
e
.
pageY
,
o
.
originalX
=
n
.
offset
.
left
,
o
.
originalY
=
n
.
offset
.
top
,
o
.
offsetX
=
o
.
originalX
+
o
.
deltaX
,
o
.
offsetY
=
o
.
originalY
+
o
.
deltaY
,
o
.
drop
=
i
.
flatten
((
n
.
drop
||
[]).
slice
()),
o
.
available
=
i
.
flatten
((
n
.
droppable
||
[]).
slice
()),
o
},
element
:
function
(
t
){
if
(
t
&&
(
t
.
jquery
||
1
==
t
.
nodeType
))
return
t
},
flatten
:
function
(
e
){
return
t
.
map
(
e
,
function
(
e
){
return
e
&&
e
.
jquery
?
t
.
makeArray
(
e
):
e
&&
e
.
length
?
i
.
flatten
(
e
):
e
})},
textselect
:
function
(
e
){
t
(
document
)[
e
?
"unbind"
:
"bind"
](
"selectstart"
,
i
.
dontstart
).
css
(
"MozUserSelect"
,
e
?
""
:
"none"
),
document
.
unselectable
=
e
?
"off"
:
"on"
},
dontstart
:
function
(){
return
!
1
},
callback
:
function
(){}};
i
.
callback
.
prototype
=
{
update
:
function
(){
n
.
drop
&&
this
.
available
.
length
&&
t
.
each
(
this
.
available
,
function
(
t
){
n
.
drop
.
locate
(
this
,
t
)})}};
var
o
=
e
.
dispatch
;
e
.
dispatch
=
function
(
e
){
return
t
.
data
(
this
,
"suppress."
+
e
.
type
)
-
(
new
Date
).
getTime
()
>
0
?
void
t
.
removeData
(
this
,
"suppress."
+
e
.
type
):
o
.
apply
(
this
,
arguments
)};
var
a
=
e
.
fixHooks
.
touchstart
=
e
.
fixHooks
.
touchmove
=
e
.
fixHooks
.
touchend
=
e
.
fixHooks
.
touchcancel
=
{
props
:
"clientX clientY pageX pageY screenX screenY"
.
split
(
" "
),
filter
:
function
(
e
,
n
){
if
(
n
){
var
i
=
n
.
touches
&&
n
.
touches
[
0
]
||
n
.
changedTouches
&&
n
.
changedTouches
[
0
]
||
null
;
i
&&
t
.
each
(
a
.
props
,
function
(
t
,
n
){
e
[
n
]
=
i
[
n
]})}
return
e
}};
n
.
draginit
=
n
.
dragstart
=
n
.
dragend
=
i
}(
jQuery
),
define
(
"drag"
,
function
(){}),
function
(
t
){
t
.
fn
.
drop
=
function
(
e
,
n
,
i
){
var
o
=
"string"
==
typeof
e
?
e
:
""
,
a
=
t
.
isFunction
(
e
)?
e
:
t
.
isFunction
(
n
)?
n
:
null
;
return
0
!==
o
.
indexOf
(
"drop"
)
&&
(
o
=
"drop"
+
o
),
i
=
(
e
==
a
?
n
:
i
)
||
{},
a
?
this
.
bind
(
o
,
i
,
a
):
this
.
trigger
(
o
)},
t
.
drop
=
function
(
e
){
e
=
e
||
{},
i
.
multi
=
e
.
multi
===!
0
?
1
/
0
:
e
.
multi
===!
1
?
1
:
isNaN
(
e
.
multi
)?
i
.
multi
:
e
.
multi
,
i
.
delay
=
e
.
delay
||
i
.
delay
,
i
.
tolerance
=
t
.
isFunction
(
e
.
tolerance
)?
e
.
tolerance
:
null
===
e
.
tolerance
?
null
:
i
.
tolerance
,
i
.
mode
=
e
.
mode
||
i
.
mode
||
"intersect"
};
var
e
=
t
.
event
,
n
=
e
.
special
,
i
=
t
.
event
.
special
.
drop
=
{
multi
:
1
,
delay
:
20
,
mode
:
"overlap"
,
targets
:[],
datakey
:
"dropdata"
,
noBubble
:
!
0
,
add
:
function
(
e
){
var
n
=
t
.
data
(
this
,
i
.
datakey
);
n
.
related
+=
1
},
remove
:
function
(){
t
.
data
(
this
,
i
.
datakey
).
related
-=
1
},
setup
:
function
(){
if
(
!
t
.
data
(
this
,
i
.
datakey
)){
var
e
=
{
related
:
0
,
active
:[],
anyactive
:
0
,
winner
:
0
,
location
:{}};
return
t
.
data
(
this
,
i
.
datakey
,
e
),
i
.
targets
.
push
(
this
),
!
1
}},
teardown
:
function
(){
var
e
=
t
.
data
(
this
,
i
.
datakey
)
||
{};
if
(
!
e
.
related
){
t
.
removeData
(
this
,
i
.
datakey
);
var
n
=
this
;
i
.
targets
=
t
.
grep
(
i
.
targets
,
function
(
t
){
return
t
!==
n
})}},
handler
:
function
(
e
,
o
){
var
a
;
if
(
o
)
switch
(
e
.
type
){
case
"mousedown"
:
case
"touchstart"
:
a
=
t
(
i
.
targets
),
"string"
==
typeof
o
.
drop
&&
(
a
=
a
.
filter
(
o
.
drop
)),
a
.
each
(
function
(){
var
e
=
t
.
data
(
this
,
i
.
datakey
);
e
.
active
=
[],
e
.
anyactive
=
0
,
e
.
winner
=
0
}),
o
.
droppable
=
a
,
n
.
drag
.
hijack
(
e
,
"dropinit"
,
o
);
break
;
case
"mousemove"
:
case
"touchmove"
:
i
.
event
=
e
,
i
.
timer
||
i
.
tolerate
(
o
);
break
;
case
"mouseup"
:
case
"touchend"
:
i
.
timer
=
clearTimeout
(
i
.
timer
),
o
.
propagates
&&
(
n
.
drag
.
hijack
(
e
,
"drop"
,
o
),
n
.
drag
.
hijack
(
e
,
"dropend"
,
o
))}},
locate
:
function
(
e
,
n
){
var
o
=
t
.
data
(
e
,
i
.
datakey
),
a
=
t
(
e
),
r
=
a
.
offset
()
||
{},
s
=
a
.
outerHeight
(),
l
=
a
.
outerWidth
(),
c
=
{
elem
:
e
,
width
:
l
,
height
:
s
,
top
:
r
.
top
,
left
:
r
.
left
,
right
:
r
.
left
+
l
,
bottom
:
r
.
top
+
s
};
return
o
&&
(
o
.
location
=
c
,
o
.
index
=
n
,
o
.
elem
=
e
),
c
},
contains
:
function
(
t
,
e
){
return
(
e
[
0
]
||
e
.
left
)
>=
t
.
left
&&
(
e
[
0
]
||
e
.
right
)
<=
t
.
right
&&
(
e
[
1
]
||
e
.
top
)
>=
t
.
top
&&
(
e
[
1
]
||
e
.
bottom
)
<=
t
.
bottom
},
modes
:
{
intersect
:
function
(
t
,
e
,
n
){
return
this
.
contains
(
n
,[
t
.
pageX
,
t
.
pageY
])?
1
e9
:
this
.
modes
.
overlap
.
apply
(
this
,
arguments
)},
overlap
:
function
(
t
,
e
,
n
){
return
Math
.
max
(
0
,
Math
.
min
(
n
.
bottom
,
e
.
bottom
)
-
Math
.
max
(
n
.
top
,
e
.
top
))
*
Math
.
max
(
0
,
Math
.
min
(
n
.
right
,
e
.
right
)
-
Math
.
max
(
n
.
left
,
e
.
left
))},
fit
:
function
(
t
,
e
,
n
){
return
this
.
contains
(
n
,
e
)?
1
:
0
},
middle
:
function
(
t
,
e
,
n
){
return
this
.
contains
(
n
,[
e
.
left
+
.
5
*
e
.
width
,
e
.
top
+
.
5
*
e
.
height
])?
1
:
0
}},
sort
:
function
(
t
,
e
){
return
e
.
winner
-
t
.
winner
||
t
.
index
-
e
.
index
},
tolerate
:
function
(
e
){
var
o
,
a
,
r
,
s
,
l
,
c
,
d
,
u
,
p
=
0
,
h
=
e
.
interactions
.
length
,
f
=
[
i
.
event
.
pageX
,
i
.
event
.
pageY
],
m
=
i
.
tolerance
||
i
.
modes
[
i
.
mode
];
do
if
(
u
=
e
.
interactions
[
p
]){
if
(
!
u
)
return
;
u
.
drop
=
[],
l
=
[],
c
=
u
.
droppable
.
length
,
m
&&
(
r
=
i
.
locate
(
u
.
proxy
)),
o
=
0
;
do
if
(
d
=
u
.
droppable
[
o
]){
if
(
s
=
t
.
data
(
d
,
i
.
datakey
),
a
=
s
.
location
,
!
a
)
continue
;
s
.
winner
=
m
?
m
.
call
(
i
,
i
.
event
,
r
,
a
):
i
.
contains
(
a
,
f
)?
1
:
0
,
l
.
push
(
s
)}
while
(
++
o
<
c
);
l
.
sort
(
i
.
sort
),
o
=
0
;
do
(
s
=
l
[
o
])
&&
(
s
.
winner
&&
u
.
drop
.
length
<
i
.
multi
?(
s
.
active
[
p
]
||
s
.
anyactive
||
(
n
.
drag
.
hijack
(
i
.
event
,
"dropstart"
,
e
,
p
,
s
.
elem
)[
0
]
!==!
1
?(
s
.
active
[
p
]
=
1
,
s
.
anyactive
+=
1
):
s
.
winner
=
0
),
s
.
winner
&&
u
.
drop
.
push
(
s
.
elem
)):
s
.
active
[
p
]
&&
1
==
s
.
anyactive
&&
(
n
.
drag
.
hijack
(
i
.
event
,
"dropend"
,
e
,
p
,
s
.
elem
),
s
.
active
[
p
]
=
0
,
s
.
anyactive
-=
1
));
while
(
++
o
<
c
)}
while
(
++
p
<
h
);
i
.
last
&&
f
[
0
]
==
i
.
last
.
pageX
&&
f
[
1
]
==
i
.
last
.
pageY
?
delete
i
.
timer
:
i
.
timer
=
setTimeout
(
function
(){
i
.
tolerate
(
e
)},
i
.
delay
),
i
.
last
=
i
.
event
}};
n
.
dropinit
=
n
.
dropstart
=
n
.
dropend
=
i
}(
jQuery
),
define
(
"drop"
,
function
(){}),
function
(
t
){
"use strict"
;
function
e
(
e
){
return
this
.
each
(
function
(){
var
n
=
t
(
this
),
i
=
n
.
data
(
c
.
dataKey
),
o
=
t
.
extend
({},
l
,
n
.
data
(),
i
&&
i
.
option
,
"object"
==
typeof
e
&&
e
);
i
||
n
.
data
(
c
.
dataKey
,
i
=
new
c
(
this
,
o
))})}
function
n
(
e
){
return
t
(
e
).
closest
(
"div.sp_container"
).
find
(
"input.sp_input"
)}
function
i
(){
return
this
.
each
(
function
(){
var
t
=
n
(
this
),
e
=
t
.
data
(
c
.
dataKey
);
e
&&
(
e
.
prop
.
init_set
=!
0
,
e
.
clearAll
(
e
),
e
.
prop
.
init_set
=!
1
)})}
function
o
(){
return
this
.
each
(
function
(){
var
t
=
n
(
this
),
e
=
t
.
data
(
c
.
dataKey
);
e
&&
e
.
elem
.
hidden
.
val
()
&&
e
.
setInitRecord
(
!
0
)})}
function
a
(
e
){
return
this
.
each
(
function
(){
if
(
e
&&
t
.
isArray
(
e
)){
var
i
=
n
(
this
),
o
=
i
.
data
(
c
.
dataKey
);
o
&&
(
o
.
clearAll
(
o
),
o
.
option
.
data
=
e
)}})}
function
r
(
e
){
var
i
=!
1
;
return
this
.
each
(
function
(){
var
o
=
n
(
this
),
a
=
o
.
data
(
c
.
dataKey
);
a
&&
(
"undefined"
!==
t
.
type
(
e
)?
a
.
disabled
(
a
,
e
):
i
=
a
.
disabled
(
a
))}),
i
}
function
s
(){
var
e
=
""
;
return
this
.
each
(
function
(){
var
i
=
n
(
this
),
o
=
i
.
data
(
c
.
dataKey
);
if
(
o
)
if
(
o
.
option
.
multiple
){
var
a
=
[];
o
.
elem
.
element_box
.
find
(
"li.selected_tag"
).
each
(
function
(
e
,
n
){
a
.
push
(
t
(
n
).
text
())}),
e
+=
a
.
toString
()}
else
e
+=
o
.
elem
.
combo_input
.
val
()}),
e
}
var
l
=
{
data
:
void
0
,
lang
:
"cn"
,
multiple
:
!
1
,
pagination
:
!
0
,
dropButton
:
!
0
,
listSize
:
10
,
multipleControlbar
:
!
0
,
maxSelectLimit
:
0
,
selectToCloseList
:
!
1
,
initRecord
:
void
0
,
dbTable
:
"tbl"
,
keyField
:
"id"
,
showField
:
"name"
,
searchField
:
void
0
,
andOr
:
"OR"
,
orderBy
:
void
0
,
pageSize
:
10
,
params
:
void
0
,
formatItem
:
void
0
,
autoFillResult
:
!
1
,
autoSelectFirst
:
!
1
,
noResultClean
:
!
0
,
selectOnly
:
!
1
,
inputDelay
:.
5
,
eSelect
:
void
0
,
eOpen
:
void
0
,
eAjaxSuccess
:
void
0
,
eTagRemove
:
void
0
,
eClear
:
void
0
},
c
=
function
(
e
,
n
){
t
.
each
({
data
:
"source"
,
keyField
:
"primaryKey"
,
showField
:
"field"
,
pageSize
:
"perPage"
},
function
(
t
,
e
){
"undefined"
!=
typeof
n
[
e
]
&&
(
n
[
t
]
=
n
[
e
],
delete
n
[
e
])}),
this
.
setOption
(
n
),
this
.
setLanguage
(),
this
.
setCssClass
(),
this
.
setProp
(),
this
.
setElem
(
e
),
this
.
setButtonAttrDefault
(),
this
.
setInitRecord
(),
this
.
eDropdownButton
(),
this
.
eInput
(),
this
.
eWhole
()};
c
.
version
=
"2.19"
,
c
.
dataKey
=
"selectPageObject"
,
c
.
prototype
.
setOption
=
function
(
e
){
e
.
searchField
=
e
.
searchField
||
e
.
showField
,
e
.
andOr
=
e
.
andOr
.
toUpperCase
(),
"AND"
!==
e
.
andOr
&&
"OR"
!==
e
.
andOr
&&
(
e
.
andOr
=
"AND"
);
for
(
var
n
=
[
"searchField"
],
i
=
0
;
i
<
n
.
length
;
i
++
)
e
[
n
[
i
]]
=
this
.
strToArray
(
e
[
n
[
i
]]);
if
(
e
.
orderBy
=
e
.
orderBy
||
e
.
showField
,
e
.
orderBy
!==!
1
&&
(
e
.
orderBy
=
this
.
setOrderbyOption
(
e
.
orderBy
,
e
.
showField
)),
e
.
multiple
&&!
e
.
selectToCloseList
&&
(
e
.
autoFillResult
=!
1
,
e
.
autoSelectFirst
=!
1
),
e
.
pagination
||
(
e
.
pageSize
=
200
),(
"number"
!==
t
.
type
(
e
.
listSize
)
||
e
.
listSize
<
0
)
&&
(
e
.
listSize
=
10
),
"string"
==
typeof
e
.
formatItem
){
var
o
=
e
.
formatItem
;
e
.
formatItem
=
function
(
t
){
return
"function"
==
typeof
Template
&&
o
.
match
(
/
\#([
a-zA-Z0-9_
\-]
+
)
$/
)?
Template
(
o
.
substring
(
1
),
t
):
o
.
replace
(
/
\{(
.*
?)\}
/gi
,
function
(
e
){
return
e
=
e
.
substring
(
1
,
e
.
length
-
1
),
"undefined"
!=
typeof
t
[
e
]?
t
[
e
]:
""
})}}
this
.
option
=
e
},
c
.
prototype
.
strToArray
=
function
(
t
){
return
t
?
t
.
replace
(
/
[\s
]
+/g
,
""
).
split
(
","
):
""
},
c
.
prototype
.
setOrderbyOption
=
function
(
e
,
n
){
var
i
=
[],
o
=
[];
if
(
"object"
==
typeof
e
)
for
(
var
a
=
0
;
a
<
e
.
length
;
a
++
)
o
=
t
.
trim
(
e
[
a
]).
split
(
" "
),
o
.
length
&&
i
.
push
(
2
===
o
.
length
?
o
.
concat
():[
o
[
0
],
"ASC"
]);
else
o
=
t
.
trim
(
e
).
split
(
" "
),
i
[
0
]
=
2
===
o
.
length
?
o
.
concat
():
o
[
0
].
toUpperCase
().
match
(
/^
(
ASC|DESC
)
$/i
)?[
n
,
o
[
0
].
toUpperCase
()]:[
o
[
0
],
"ASC"
];
return
i
},
c
.
prototype
.
setLanguage
=
function
(){
var
t
,
e
=
this
.
option
;
switch
(
e
.
lang
){
case
"en"
:
t
=
{
add_btn
:
"Add button"
,
add_title
:
"add a box"
,
del_btn
:
"Del button"
,
del_title
:
"delete a box"
,
next
:
"Next"
,
next_title
:
"Next"
+
e
.
pageSize
+
" (Right key)"
,
prev
:
"Prev"
,
prev_title
:
"Prev"
+
e
.
pageSize
+
" (Left key)"
,
first_title
:
"First (Shift + Left key)"
,
last_title
:
"Last (Shift + Right key)"
,
get_all_btn
:
"Get All (Down key)"
,
get_all_alt
:
"(button)"
,
close_btn
:
"Close (Tab key)"
,
close_alt
:
"(button)"
,
loading
:
"loading..."
,
loading_alt
:
"(loading)"
,
page_info
:
"page_num of page_count"
,
select_ng
:
"Attention : Please choose from among the list."
,
select_ok
:
"OK : Correctly selected."
,
not_found
:
"not found"
,
ajax_error
:
"An error occurred while connecting to server."
,
clear
:
"Clear content"
,
select_all
:
"Select current page"
,
unselect_all
:
"Clear current page"
,
clear_all
:
"Clear all selected"
,
max_selected
:
"You can only select up to max_selected_limit items"
};
break
;
case
"cn"
:
default
:
t
=
{
add_btn
:
"添加按钮"
,
add_title
:
"添加区域"
,
del_btn
:
"删除按钮"
,
del_title
:
"删除区域"
,
next
:
"下一页"
,
next_title
:
"下"
+
e
.
pageSize
+
" (→)"
,
prev
:
"上一页"
,
prev_title
:
"上"
+
e
.
pageSize
+
" (←)"
,
first_title
:
"首页 (Shift + ←)"
,
last_title
:
"尾页 (Shift + →)"
,
get_all_btn
:
"获得全部 (↓)"
,
get_all_alt
:
"(按钮)"
,
close_btn
:
"关闭 (Tab键)"
,
close_alt
:
"(按钮)"
,
loading
:
"读取中..."
,
loading_alt
:
"(读取中)"
,
page_info
:
"第 page_num 页(共page_count页)"
,
select_ng
:
"请注意:请从列表中选择."
,
select_ok
:
"OK : 已经选择."
,
not_found
:
"无查询结果"
,
ajax_error
:
"连接到服务器时发生错误!"
,
clear
:
"清除内容"
,
select_all
:
"选择当前页项目"
,
unselect_all
:
"取消选择当前页项目"
,
clear_all
:
"清除全部已选择项目"
,
max_selected
:
"最多只能选择 max_selected_limit 个项目"
}}
this
.
message
=
t
},
c
.
prototype
.
setCssClass
=
function
(){
var
t
=
{
container
:
"sp_container"
,
container_open
:
"sp_container_open"
,
re_area
:
"sp_result_area"
,
result_open
:
"sp_result_area_open"
,
control_box
:
"sp_control_box"
,
element_box
:
"sp_element_box"
,
navi
:
"sp_navi"
,
results
:
"sp_results"
,
re_off
:
"sp_results_off"
,
select
:
"sp_over"
,
select_ok
:
"sp_select_ok"
,
select_ng
:
"sp_select_ng"
,
selected
:
"sp_selected"
,
input_off
:
"sp_input_off"
,
message_box
:
"sp_message_box"
,
disabled
:
"sp_disabled"
,
button
:
"sp_button"
,
caret_open
:
"sp_caret_open"
,
btn_on
:
"sp_btn_on"
,
btn_out
:
"sp_btn_out"
,
input
:
"sp_input"
,
clear_btn
:
"sp_clear_btn"
,
align_right
:
"sp_align_right"
};
this
.
css_class
=
t
},
c
.
prototype
.
setProp
=
function
(){
this
.
prop
=
{
disabled
:
!
1
,
current_page
:
1
,
max_page
:
1
,
is_loading
:
!
1
,
xhr
:
!
1
,
key_paging
:
!
1
,
key_select
:
!
1
,
prev_value
:
""
,
selected_text
:
""
,
last_input_time
:
void
0
,
init_set
:
!
1
},
this
.
template
=
{
tag
:{
content
:
'<li class="selected_tag" itemvalue="#item_value#">#item_text#<span class="tag_close"><i class="spfont sp-close"></i></span></li>'
,
textKey
:
"#item_text#"
,
valueKey
:
"#item_value#"
},
page
:{
current
:
"page_num"
,
total
:
"page_count"
},
msg
:{
maxSelectLimit
:
"max_selected_limit"
}}},
c
.
prototype
.
elementRealSize
=
function
(
e
,
n
){
var
i
,
o
,
a
,
r
=
{
absolute
:
!
1
,
clone
:
!
1
,
includeMargin
:
!
1
,
display
:
"block"
},
s
=
r
,
l
=
e
.
eq
(
0
),
c
=
[],
d
=
""
;
i
=
function
(){
a
=
l
.
parents
().
addBack
().
filter
(
":hidden"
),
d
+=
"visibility: hidden !important; display: "
+
s
.
display
+
" !important; "
,
s
.
absolute
===!
0
&&
(
d
+=
"position: absolute !important;"
),
a
.
each
(
function
(){
var
e
=
t
(
this
),
n
=
e
.
attr
(
"style"
);
c
.
push
(
n
),
e
.
attr
(
"style"
,
n
?
n
+
";"
+
d
:
d
)})},
o
=
function
(){
a
.
each
(
function
(
e
){
var
n
=
t
(
this
),
i
=
c
[
e
];
void
0
===
i
?
n
.
removeAttr
(
"style"
):
n
.
attr
(
"style"
,
i
)})},
i
();
var
u
=
/
(
outer
)
/
.
test
(
n
)?
l
[
n
](
s
.
includeMargin
):
l
[
n
]();
return
o
(),
u
},
c
.
prototype
.
setElem
=
function
(
e
){
var
n
=
{},
i
=
this
.
option
,
o
=
this
.
css_class
,
a
=
this
.
message
,
r
=
t
(
e
),
s
=
r
.
css
(
"width"
),
l
=
r
.
outerWidth
();
s
.
indexOf
(
"%"
)
>-
1
||
r
.
parent
().
size
()
>
0
&&
r
.
parent
().
width
()
==
l
?
l
=
"100%"
:(
l
<=
0
&&
(
l
=
this
.
elementRealSize
(
r
,
"outerWidth"
)),
l
<
150
&&
(
l
=
150
)),
n
.
combo_input
=
r
.
attr
({
autocomplete
:
"off"
}).
addClass
(
o
.
input
).
wrap
(
"<div>"
),
i
.
selectOnly
&&
n
.
combo_input
.
prop
(
"readonly"
,
!
0
),
n
.
container
=
n
.
combo_input
.
parent
().
addClass
(
o
.
container
),
n
.
combo_input
.
prop
(
"disabled"
)
&&
(
i
.
multiple
?
n
.
container
.
addClass
(
o
.
disabled
):
n
.
combo_input
.
addClass
(
o
.
input_off
)),
n
.
container
.
width
(
l
),
n
.
button
=
t
(
"<div>"
).
addClass
(
o
.
button
),
n
.
dropdown
=
t
(
'<span class="sp_caret"></span>'
),
n
.
clear_btn
=
t
(
"<div>"
).
html
(
t
(
"<i>"
).
addClass
(
"spfont sp-close"
)).
addClass
(
o
.
clear_btn
).
attr
(
"title"
,
a
.
clear
),
i
.
dropButton
||
n
.
clear_btn
.
addClass
(
o
.
align_right
),
n
.
element_box
=
t
(
"<ul>"
).
addClass
(
o
.
element_box
),
i
.
multiple
&&
i
.
multipleControlbar
&&
(
n
.
control
=
t
(
"<div>"
).
addClass
(
o
.
control_box
)),
n
.
result_area
=
t
(
"<div>"
).
addClass
(
o
.
re_area
),
i
.
pagination
&&
(
n
.
navi
=
t
(
"<div>"
).
addClass
(
"sp_pagination"
).
append
(
"<ul>"
)),
n
.
results
=
t
(
"<ul>"
).
addClass
(
o
.
results
);
var
c
=
"_text"
,
d
=
n
.
combo_input
.
attr
(
"id"
)
||
n
.
combo_input
.
attr
(
"name"
),
u
=
n
.
combo_input
.
attr
(
"name"
)
||
"selectPage"
,
p
=
u
,
h
=
d
;
if
(
n
.
hidden
=
t
(
'<input type="hidden" class="sp_hidden" />'
).
attr
({
name
:
p
,
id
:
h
}).
val
(
""
),
n
.
combo_input
.
attr
({
name
:
"undefined"
!=
typeof
r
.
data
(
"name"
)?
r
.
data
(
"name"
):
u
+
c
,
id
:
d
+
c
}),
n
.
container
.
append
(
n
.
hidden
),
i
.
dropButton
&&
(
n
.
container
.
append
(
n
.
button
),
n
.
button
.
append
(
n
.
dropdown
)),
t
(
document
.
body
).
append
(
n
.
result_area
),
n
.
result_area
.
append
(
n
.
results
),
i
.
pagination
&&
n
.
result_area
.
append
(
n
.
navi
),
i
.
multiple
){
i
.
multipleControlbar
&&
(
n
.
control
.
append
(
'<button type="button" class="btn btn-default sp_clear_all" ><i class="spfont sp-clear"></i></button>'
),
n
.
control
.
append
(
'<button type="button" class="btn btn-default sp_unselect_all" ><i class="spfont sp-unselect-all"></i></button>'
),
n
.
control
.
append
(
'<button type="button" class="btn btn-default sp_select_all" ><i class="spfont sp-select-all"></i></button>'
),
n
.
control_text
=
t
(
"<p>"
),
n
.
control
.
append
(
n
.
control_text
),
n
.
result_area
.
prepend
(
n
.
control
)),
n
.
container
.
addClass
(
"sp_container_combo"
),
n
.
combo_input
.
addClass
(
"sp_combo_input"
).
before
(
n
.
element_box
);
var
f
=
t
(
"<li>"
).
addClass
(
"input_box"
);
f
.
append
(
n
.
combo_input
),
n
.
element_box
.
append
(
f
),
n
.
combo_input
.
attr
(
"placeholder"
)
&&
n
.
combo_input
.
attr
(
"placeholder_bak"
,
n
.
combo_input
.
attr
(
"placeholder"
))}
this
.
elem
=
n
},
c
.
prototype
.
setButtonAttrDefault
=
function
(){
this
.
option
.
dropButton
&&
this
.
elem
.
button
.
attr
(
"title"
,
this
.
message
.
close_btn
)},
c
.
prototype
.
setInitRecord
=
function
(
e
){
var
n
=
this
,
i
=
n
.
option
,
o
=
n
.
elem
,
a
=
""
;
if
(
"undefined"
!=
t
.
type
(
o
.
combo_input
.
data
(
"init"
))
&&
(
i
.
initRecord
=
String
(
o
.
combo_input
.
data
(
"init"
))),
e
||
i
.
initRecord
||!
o
.
combo_input
.
val
()
||
(
i
.
initRecord
=
o
.
combo_input
.
val
()),
o
.
combo_input
.
val
(
""
),
e
||
o
.
hidden
.
val
(
i
.
initRecord
),
a
=
e
&&
o
.
hidden
.
val
()?
o
.
hidden
.
val
():
i
.
initRecord
)
if
(
"object"
==
typeof
i
.
data
){
var
r
=
new
Array
,
s
=
a
.
split
(
","
);
t
.
each
(
s
,
function
(
t
,
e
){
for
(
var
n
=
0
;
n
<
i
.
data
.
length
;
n
++
)
if
(
i
.
data
[
n
][
i
.
keyField
]
==
e
){
r
.
push
(
i
.
data
[
n
]);
break
}}),
!
i
.
multiple
&&
r
.
length
>
1
&&
(
r
=
[
r
[
0
]]),
n
.
afterInit
(
n
,
r
)}
else
{
var
l
=
i
.
params
,
c
=
{},
d
=
(
i
.
searchField
,{
searchTable
:
i
.
dbTable
,
searchKey
:
i
.
keyField
,
searchValue
:
a
,
orderBy
:
i
.
orderBy
,
showField
:
i
.
showField
,
keyField
:
i
.
keyField
,
keyValue
:
a
,
searchField
:
i
.
searchField
});
if
(
l
){
var
u
=
t
.
isFunction
(
l
)?
l
(
n
):
l
;
c
=
u
&&
t
.
isPlainObject
(
u
)?
t
.
extend
({},
d
,
u
):
d
}
else
c
=
d
;
t
.
ajax
({
dataType
:
"json"
,
type
:
"POST"
,
url
:
i
.
data
,
data
:
c
,
success
:
function
(
e
){
var
o
=
null
;
i
.
eAjaxSuccess
&&
t
.
isFunction
(
i
.
eAjaxSuccess
)
&&
(
o
=
i
.
eAjaxSuccess
(
e
)),
n
.
afterInit
(
n
,
o
.
list
)},
error
:
function
(
t
,
e
,
i
){
n
.
ajaxErrorNotify
(
n
,
i
)}})}},
c
.
prototype
.
afterInit
=
function
(
e
,
n
){
if
(
n
&&
(
!
t
.
isArray
(
n
)
||
0
!==
n
.
length
)){
t
.
isArray
(
n
)
||
(
n
=
[
n
]);
var
i
=
e
.
option
,
o
=
e
.
css_class
;
if
(
e
.
data
=
n
,
i
.
multiple
)
e
.
prop
.
init_set
=!
0
,
e
.
clearAll
(
e
),
t
.
each
(
n
,
function
(
t
,
n
){
var
o
=
n
[
i
.
keyField
],
a
=
n
[
i
.
showField
],
r
=
{
text
:
a
,
value
:
o
};
e
.
isAlreadySelected
(
e
,
r
)
||
e
.
addNewTag
(
e
,
n
,
r
)}),
e
.
tagValuesSet
(
e
),
e
.
inputResize
(
e
),
e
.
elem
.
hidden
.
blur
(),
e
.
prop
.
init_set
=!
1
;
else
{
var
a
=
n
[
0
],
r
=
a
[
i
.
keyField
],
s
=
a
[
i
.
showField
];
e
.
elem
.
combo_input
.
val
(
s
),
e
.
elem
.
hidden
.
val
(
r
),
e
.
prop
.
prev_value
=
s
,
e
.
prop
.
selected_text
=
s
,
i
.
selectOnly
&&
e
.
elem
.
combo_input
.
attr
(
"title"
,
e
.
message
.
select_ok
).
removeClass
(
o
.
select_ng
).
addClass
(
o
.
select_ok
),
e
.
putClearButton
()}}},
c
.
prototype
.
eDropdownButton
=
function
(){
var
t
=
this
;
t
.
option
.
dropButton
&&
t
.
elem
.
button
.
mouseup
(
function
(
e
){
e
.
stopPropagation
(),
t
.
elem
.
result_area
.
is
(
":hidden"
)
&&!
t
.
elem
.
combo_input
.
prop
(
"disabled"
)?
t
.
elem
.
combo_input
.
focus
():
t
.
hideResults
(
t
)})},
c
.
prototype
.
eInput
=
function
(){
var
e
=
this
,
n
=
e
.
option
,
i
=
e
.
elem
,
o
=
e
.
message
,
a
=
function
(){
e
.
prop
.
page_move
=!
1
,
e
.
suggest
(
e
),
e
.
setCssFocusedInput
(
e
)};
i
.
combo_input
.
keyup
(
function
(
t
){
e
.
processKey
(
e
,
t
)}).
keydown
(
function
(
t
){
e
.
processControl
(
e
,
t
)}).
focus
(
function
(
t
){
i
.
result_area
.
is
(
":hidden"
)
&&
(
t
.
stopPropagation
(),
e
.
prop
.
first_show
=!
0
,
a
())}),
i
.
container
.
on
(
"click.SelectPage"
,
"div."
+
e
.
css_class
.
clear_btn
,
function
(
i
){
i
.
stopPropagation
(),
e
.
disabled
(
e
)
||
(
e
.
clearAll
(
e
,
!
0
),
e
.
elem
.
hidden
.
change
(),
n
.
eClear
&&
t
.
isFunction
(
n
.
eClear
)
&&
n
.
eClear
(
e
))}),
i
.
result_area
.
on
(
"mousedown.SelectPage"
,
function
(
t
){
t
.
stopPropagation
()}),
n
.
multiple
&&
(
n
.
multipleControlbar
&&
(
i
.
control
.
find
(
".sp_select_all"
).
on
(
"click.SelectPage"
,
function
(
t
){
e
.
selectAllLine
(
e
)}).
hover
(
function
(){
i
.
control_text
.
html
(
o
.
select_all
)},
function
(){
i
.
control_text
.
html
(
""
)}),
i
.
control
.
find
(
".sp_unselect_all"
).
on
(
"click.SelectPage"
,
function
(
t
){
e
.
unSelectAllLine
(
e
)}).
hover
(
function
(){
i
.
control_text
.
html
(
o
.
unselect_all
)},
function
(){
i
.
control_text
.
html
(
""
)}),
i
.
control
.
find
(
".sp_clear_all"
).
on
(
"click.SelectPage"
,
function
(
t
){
e
.
clearAll
(
e
,
!
0
)}).
hover
(
function
(){
i
.
control_text
.
html
(
o
.
clear_all
)},
function
(){
i
.
control_text
.
html
(
""
)})),
i
.
element_box
.
on
(
"click.SelectPage"
,
function
(
e
){
var
n
=
e
.
target
||
e
.
srcElement
;
t
(
n
).
is
(
"ul"
)
&&
i
.
combo_input
.
focus
()}),
i
.
element_box
.
on
(
"click.SelectPage"
,
"span.tag_close"
,
function
(){
var
i
=
t
(
this
).
closest
(
"li"
),
o
=
i
.
data
(
"dataObj"
);
e
.
removeTag
(
e
,
i
),
a
(),
n
.
eTagRemove
&&
t
.
isFunction
(
n
.
eTagRemove
)
&&
n
.
eTagRemove
([
o
])}),
e
.
inputResize
(
e
))},
c
.
prototype
.
eWhole
=
function
(){
var
e
=
this
,
n
=
e
.
css_class
,
i
=
function
(
t
){
t
.
elem
.
combo_input
.
val
(
""
),
t
.
option
.
multiple
||
t
.
elem
.
hidden
.
val
(
""
),
t
.
prop
.
selected_text
=
""
};
t
(
document
.
body
).
off
(
"mousedown.selectPage"
).
on
(
"mousedown.selectPage"
,
function
(
e
){
var
o
=
e
.
target
||
e
.
srcElement
,
a
=
t
(
o
).
closest
(
"div."
+
n
.
container
);
t
(
"div."
+
n
.
container
+
"."
+
n
.
container_open
).
each
(
function
(){
if
(
this
!=
a
[
0
]){
var
e
=
t
(
this
),
o
=
e
.
find
(
"input."
+
n
.
input
).
data
(
c
.
dataKey
);
return
o
.
elem
.
combo_input
.
val
()
||!
o
.
elem
.
hidden
.
val
()
||
o
.
option
.
multiple
?
void
(
o
.
elem
.
results
.
find
(
"li"
).
not
(
"."
+
n
.
message_box
).
length
?
o
.
option
.
autoFillResult
?
o
.
elem
.
hidden
.
val
()?
o
.
hideResults
(
o
):
o
.
elem
.
results
.
find
(
"li.sp_over"
).
length
?
o
.
selectCurrentLine
(
o
,
!
0
):
o
.
option
.
autoSelectFirst
?(
o
.
nextLine
(
o
),
o
.
selectCurrentLine
(
o
,
!
0
)):
o
.
hideResults
(
o
):
o
.
hideResults
(
o
):(
o
.
option
.
noResultClean
?
i
(
o
):
o
.
option
.
multiple
||
o
.
elem
.
hidden
.
val
(
""
),
o
.
hideResults
(
o
))):(
o
.
prop
.
current_page
=
1
,
i
(
o
),
o
.
hideResults
(
o
),
!
0
)}})})},
c
.
prototype
.
eResultList
=
function
(){
var
e
=
this
,
n
=
this
.
css_class
;
e
.
elem
.
results
.
children
(
"li"
).
hover
(
function
(){
return
e
.
prop
.
key_select
?
void
(
e
.
prop
.
key_select
=!
1
):
void
(
t
(
this
).
hasClass
(
n
.
selected
)
||
t
(
this
).
hasClass
(
n
.
message_box
)
||
(
t
(
this
).
addClass
(
n
.
select
),
e
.
setCssFocusedResults
(
e
)))},
function
(){
t
(
this
).
removeClass
(
n
.
select
)}).
click
(
function
(
i
){
return
e
.
prop
.
key_select
?
void
(
e
.
prop
.
key_select
=!
1
):(
i
.
preventDefault
(),
i
.
stopPropagation
(),
void
(
t
(
this
).
hasClass
(
n
.
selected
)
||
e
.
selectCurrentLine
(
e
,
!
1
)))})},
c
.
prototype
.
eScroll
=
function
(){
var
e
=
this
.
css_class
;
t
(
window
).
on
(
"scroll.SelectPage"
,
function
(
n
){
t
(
"div."
+
e
.
container
+
"."
+
e
.
container_open
).
each
(
function
(){
var
n
=
t
(
this
),
i
=
n
.
find
(
"input."
+
e
.
input
).
data
(
c
.
dataKey
),
o
=
i
.
elem
.
result_area
.
offset
(),
a
=
t
(
window
).
scrollTop
(),
r
=
t
(
document
).
height
(),
s
=
t
(
window
).
height
(),
l
=
i
.
elem
.
result_area
.
outerHeight
(),
d
=
o
.
top
+
l
,
u
=
r
>
s
,
p
=
i
.
elem
.
result_area
.
hasClass
(
"shadowDown"
);
u
&&
(
p
?
d
>
s
+
a
&&
i
.
calcResultsSize
(
i
):
o
.
top
<
a
&&
i
.
calcResultsSize
(
i
))})})},
c
.
prototype
.
ePaging
=
function
(){
var
t
=
this
;
t
.
option
.
pagination
&&
(
t
.
elem
.
navi
.
find
(
"li.csFirstPage"
).
off
(
"click"
).
on
(
"click"
,
function
(
e
){
e
.
preventDefault
(),
t
.
firstPage
(
t
)}),
t
.
elem
.
navi
.
find
(
"li.csPreviousPage"
).
off
(
"click"
).
on
(
"click"
,
function
(
e
){
e
.
preventDefault
(),
t
.
prevPage
(
t
)}),
t
.
elem
.
navi
.
find
(
"li.csNextPage"
).
off
(
"click"
).
on
(
"click"
,
function
(
e
){
e
.
preventDefault
(),
t
.
nextPage
(
t
)}),
t
.
elem
.
navi
.
find
(
"li.csLastPage"
).
off
(
"click"
).
on
(
"click"
,
function
(
e
){
e
.
preventDefault
(),
t
.
lastPage
(
t
)}))},
c
.
prototype
.
ajaxErrorNotify
=
function
(
t
,
e
){
t
.
showMessage
(
t
.
message
.
ajax_error
)},
c
.
prototype
.
showMessage
=
function
(
t
,
e
){
if
(
e
){
var
n
=
'<li class="'
+
t
.
css_class
.
message_box
+
'"><i class="spfont sp-warning"></i> '
+
e
+
"</li>"
;
t
.
elem
.
results
.
empty
().
append
(
n
).
show
(),
t
.
calcResultsSize
(
t
),
t
.
setOpenStatus
(
t
,
!
0
),
t
.
elem
.
control
.
hide
(),
t
.
option
.
pagination
&&
t
.
elem
.
navi
.
hide
()}},
c
.
prototype
.
scrollWindow
=
function
(
e
,
n
){
var
i
,
o
=
e
.
getCurrentLine
(
e
),
a
=
o
&&!
n
?
o
.
offset
().
top
:
e
.
elem
.
container
.
offset
().
top
;
e
.
prop
.
size_li
=
e
.
elem
.
results
.
children
(
"li:first"
).
outerHeight
(),
i
=
e
.
prop
.
size_li
;
var
r
,
s
=
t
(
window
).
height
(),
l
=
t
(
window
).
scrollTop
(),
c
=
l
+
s
-
i
;
if
(
o
.
length
)
if
(
a
<
l
||
i
>
s
)
r
=
a
-
l
;
else
{
if
(
!
(
a
>
c
))
return
;
r
=
a
-
c
}
else
a
<
l
&&
(
r
=
a
-
l
);
window
.
scrollBy
(
0
,
r
)},
c
.
prototype
.
setOpenStatus
=
function
(
t
,
e
){
var
n
=
t
.
elem
,
i
=
t
.
css_class
;
e
?(
n
.
container
.
addClass
(
i
.
container_open
),
n
.
result_area
.
addClass
(
i
.
result_open
)):(
n
.
container
.
removeClass
(
i
.
container_open
),
n
.
result_area
.
removeClass
(
i
.
result_open
))},
c
.
prototype
.
setCssFocusedInput
=
function
(
t
){},
c
.
prototype
.
setCssFocusedResults
=
function
(
t
){},
c
.
prototype
.
checkValue
=
function
(
t
){
var
e
=
t
.
elem
.
combo_input
.
val
();
e
!=
t
.
prop
.
prev_value
&&
(
t
.
prop
.
prev_value
=
e
,
t
.
prop
.
first_show
=!
1
,
t
.
option
.
selectOnly
&&
t
.
setButtonAttrDefault
(),
t
.
option
.
multiple
||
e
||
(
t
.
elem
.
combo_input
.
val
(
""
),
t
.
elem
.
hidden
.
val
(
""
),
t
.
elem
.
clear_btn
.
remove
()),
t
.
suggest
(
t
))},
c
.
prototype
.
processKey
=
function
(
e
,
n
){
t
.
inArray
(
n
.
keyCode
,[
37
,
38
,
39
,
40
,
27
,
9
,
13
])
===-
1
&&
(
16
!=
n
.
keyCode
&&
e
.
setCssFocusedInput
(
e
),
e
.
inputResize
(
e
),
"string"
===
t
.
type
(
e
.
option
.
data
)?(
e
.
prop
.
last_input_time
=
n
.
timeStamp
,
setTimeout
(
function
(){
n
.
timeStamp
-
e
.
prop
.
last_input_time
===
0
&&
e
.
checkValue
(
e
)},
1
e3
*
e
.
option
.
inputDelay
)):
e
.
checkValue
(
e
))},
c
.
prototype
.
processControl
=
function
(
e
,
n
){
if
(
t
.
inArray
(
n
.
keyCode
,[
37
,
38
,
39
,
40
,
27
,
9
])
>-
1
&&
e
.
elem
.
result_area
.
is
(
":visible"
)
||
t
.
inArray
(
n
.
keyCode
,[
13
,
9
])
>-
1
&&
e
.
getCurrentLine
(
e
))
switch
(
n
.
preventDefault
(),
n
.
stopPropagation
(),
n
.
cancelBubble
=!
0
,
n
.
returnValue
=!
1
,
n
.
keyCode
){
case
37
:
n
.
shiftKey
?
e
.
firstPage
(
e
):
e
.
prevPage
(
e
);
break
;
case
38
:
e
.
prop
.
key_select
=!
0
,
e
.
prevLine
(
e
);
break
;
case
39
:
n
.
shiftKey
?
e
.
lastPage
(
e
):
e
.
nextPage
(
e
);
break
;
case
40
:
e
.
elem
.
results
.
children
(
"li"
).
length
?(
e
.
prop
.
key_select
=!
0
,
e
.
nextLine
(
e
)):
e
.
suggest
(
e
);
break
;
case
9
:
e
.
prop
.
key_paging
=!
0
,
e
.
selectCurrentLine
(
e
,
!
0
);
break
;
case
13
:
e
.
selectCurrentLine
(
e
,
!
0
);
break
;
case
27
:
e
.
prop
.
key_paging
=!
0
,
e
.
hideResults
(
e
)}},
c
.
prototype
.
abortAjax
=
function
(
t
){
t
.
prop
.
xhr
&&
(
t
.
prop
.
xhr
.
abort
(),
t
.
prop
.
xhr
=!
1
)},
c
.
prototype
.
suggest
=
function
(
e
){
var
n
,
i
=
t
.
trim
(
e
.
elem
.
combo_input
.
val
());
n
=
e
.
option
.
multiple
?
i
:
i
&&
i
===
e
.
prop
.
selected_text
?
""
:
i
,
n
=
n
.
split
(
/
[\s
]
+/
),
e
.
option
.
eOpen
&&
t
.
isFunction
(
e
.
option
.
eOpen
)
&&
e
.
option
.
eOpen
.
call
(
e
),
e
.
abortAjax
(
e
);
var
o
=
e
.
prop
.
current_page
||
1
;
"object"
==
typeof
e
.
option
.
data
?
e
.
searchForJson
(
e
,
n
,
o
):
e
.
searchForDb
(
e
,
n
,
o
)},
c
.
prototype
.
setLoading
=
function
(
t
){
""
===
t
.
elem
.
results
.
html
()
&&
t
.
setOpenStatus
(
t
,
!
0
)},
c
.
prototype
.
searchForDb
=
function
(
e
,
n
,
i
){
var
o
=
e
.
option
;
o
.
eAjaxSuccess
&&
t
.
isFunction
(
o
.
eAjaxSuccess
)
||
e
.
hideResults
(
e
);
var
a
=
o
.
params
,
r
=
{},
s
=
o
.
searchField
;
n
.
length
&&
n
[
0
]
&&
n
[
0
]
!==
e
.
prop
.
prev_value
&&
(
i
=
1
);
var
l
=
{
q_word
:
n
,
pageNumber
:
i
,
pageSize
:
o
.
pageSize
,
andOr
:
o
.
andOr
,
orderBy
:
o
.
orderBy
,
searchTable
:
o
.
dbTable
,
showField
:
e
.
option
.
showField
,
keyField
:
e
.
option
.
keyField
,
searchField
:
e
.
option
.
searchField
};
if
(
o
.
orderBy
!==!
1
&&
(
l
.
orderBy
=
o
.
orderBy
),
l
[
s
]
=
n
[
0
],
a
){
var
c
=
t
.
isFunction
(
a
)?
a
(
e
):
a
;
r
=
c
&&
t
.
isPlainObject
(
c
)?
t
.
extend
({},
l
,
c
):
l
}
else
r
=
l
;
e
.
prop
.
xhr
=
t
.
ajax
({
dataType
:
"json"
,
url
:
o
.
data
,
type
:
"POST"
,
data
:
r
,
success
:
function
(
a
){
if
(
!
a
||!
t
.
isPlainObject
(
a
))
return
e
.
hideResults
(
e
),
void
e
.
ajaxErrorNotify
(
e
,
errorThrown
);
var
r
=
{},
s
=
{};
try
{
r
=
o
.
eAjaxSuccess
(
a
),
s
.
originalResult
=
r
.
list
,
s
.
cnt_whole
=
r
.
totalRow
}
catch
(
t
){
return
void
e
.
showMessage
(
e
,
e
.
message
.
ajax_error
)}
if
(
e
.
elem
.
navi
&&
t
(
e
.
elem
.
navi
).
toggleClass
(
"hide"
,
s
.
cnt_whole
<=
s
.
originalResult
.
length
),
s
.
candidate
=
[],
s
.
keyField
=
[],
"object"
!=
typeof
s
.
originalResult
)
return
e
.
prop
.
xhr
=
null
,
void
e
.
notFoundSearch
(
e
);
s
.
cnt_page
=
s
.
originalResult
.
length
;
for
(
var
l
=
0
;
l
<
s
.
cnt_page
;
l
++
)
for
(
var
c
in
s
.
originalResult
[
l
])
c
==
o
.
keyField
&&
s
.
keyField
.
push
(
s
.
originalResult
[
l
][
c
]),
c
==
o
.
showField
&&
s
.
candidate
.
push
(
s
.
originalResult
[
l
][
c
]);
e
.
prepareResults
(
e
,
s
,
n
,
i
)},
error
:
function
(
t
,
n
,
i
){
"abort"
!=
n
&&
(
e
.
hideResults
(
e
),
e
.
ajaxErrorNotify
(
e
,
i
))},
complete
:
function
(){
e
.
prop
.
xhr
=
null
}})},
c
.
prototype
.
searchForJson
=
function
(
e
,
n
,
i
){
var
o
=
e
.
option
,
a
=
[],
r
=
[],
s
=
[],
l
=
{},
c
=
0
,
d
=
[];
do
r
[
c
]
=
n
[
c
].
replace
(
/
\W
/g
,
"\\$&"
).
toString
(),
d
[
c
]
=
new
RegExp
(
r
[
c
],
"gi"
),
c
++
;
while
(
c
<
n
.
length
);
for
(
var
c
=
0
;
c
<
o
.
data
.
length
;
c
++
){
for
(
var
u
,
p
=!
1
,
h
=
o
.
data
[
c
],
f
=
0
;
f
<
d
.
length
;
f
++
)
if
(
u
=
h
[
o
.
searchField
],
o
.
formatItem
&&
t
.
isFunction
(
o
.
formatItem
)
&&
(
u
=
o
.
formatItem
(
h
)),
u
.
match
(
d
[
f
])){
if
(
p
=!
0
,
"OR"
==
o
.
andOr
)
break
}
else
if
(
p
=!
1
,
"AND"
==
o
.
andOr
)
break
;
p
&&
a
.
push
(
h
)}
if
(
o
.
orderBy
===!
1
)
s
=
a
.
concat
();
else
{
for
(
var
m
=
new
RegExp
(
"^"
+
r
[
0
]
+
"$"
,
"gi"
),
g
=
new
RegExp
(
"^"
+
r
[
0
],
"gi"
),
y
=
[],
v
=
[],
b
=
[],
c
=
0
;
c
<
a
.
length
;
c
++
){
var
x
=
o
.
orderBy
[
0
][
0
],
w
=
String
(
a
[
c
][
x
]);
w
.
match
(
m
)?
y
.
push
(
a
[
c
]):
w
.
match
(
g
)?
v
.
push
(
a
[
c
]):
b
.
push
(
a
[
c
])}
o
.
orderBy
[
0
][
1
].
match
(
/^asc$/i
)?(
y
=
e
.
sortAsc
(
e
,
y
),
v
=
e
.
sortAsc
(
e
,
v
),
b
=
e
.
sortAsc
(
e
,
b
)):(
y
=
e
.
sortDesc
(
e
,
y
),
v
=
e
.
sortDesc
(
e
,
v
),
b
=
e
.
sortDesc
(
e
,
b
)),
s
=
s
.
concat
(
y
).
concat
(
v
).
concat
(
b
)}
if
(
l
.
cnt_whole
=
s
.
length
,
e
.
prop
.
page_move
)
s
.
length
<=
(
i
-
1
)
*
o
.
pageSize
&&
(
i
=
1
,
e
.
prop
.
current_page
=
1
);
else
if
(
!
o
.
multiple
){
var
_
=
e
.
elem
.
hidden
.
val
();
if
(
"undefined"
!==
t
.
type
(
_
)
&&
""
!==
t
.
trim
(
_
)){
var
k
=
0
;
t
.
each
(
s
,
function
(
t
,
e
){
if
(
e
[
o
.
keyField
]
==
_
)
return
k
=
t
+
1
,
!
1
}),
i
=
Math
.
ceil
(
k
/
o
.
pageSize
),
i
<
1
&&
(
i
=
1
),
e
.
prop
.
current_page
=
i
}}
var
C
=
(
i
-
1
)
*
o
.
pageSize
,
S
=
C
+
o
.
pageSize
;
l
.
originalResult
=
[];
for
(
var
c
=
C
;
c
<
S
&&
void
0
!==
s
[
c
];
c
++
){
l
.
originalResult
.
push
(
s
[
c
]);
for
(
var
T
in
s
[
c
])
T
==
o
.
keyField
&&
(
void
0
===
l
.
keyField
&&
(
l
.
keyField
=
[]),
l
.
keyField
.
push
(
s
[
c
][
T
])),
T
==
o
.
showField
&&
(
void
0
===
l
.
candidate
&&
(
l
.
candidate
=
[]),
l
.
candidate
.
push
(
s
[
c
][
T
]))}
void
0
===
l
.
candidate
&&
(
l
.
candidate
=
[]),
l
.
cnt_page
=
l
.
candidate
.
length
,
e
.
prepareResults
(
e
,
l
,
n
,
i
)},
c
.
prototype
.
sortAsc
=
function
(
e
,
n
){
return
n
.
sort
(
function
(
n
,
i
){
var
o
=
n
[
e
.
option
.
orderBy
[
0
][
0
]],
a
=
i
[
e
.
option
.
orderBy
[
0
][
0
]];
return
"number"
===
t
.
type
(
o
)?
o
-
a
:
String
(
o
).
localeCompare
(
String
(
a
))}),
n
},
c
.
prototype
.
sortDesc
=
function
(
e
,
n
){
return
n
.
sort
(
function
(
n
,
i
){
var
o
=
n
[
e
.
option
.
orderBy
[
0
][
0
]],
a
=
i
[
e
.
option
.
orderBy
[
0
][
0
]];
return
"number"
===
t
.
type
(
o
)?
a
-
o
:
String
(
a
).
localeCompare
(
String
(
o
))}),
n
},
c
.
prototype
.
notFoundSearch
=
function
(
t
){
t
.
elem
.
results
.
empty
(),
t
.
calcResultsSize
(
t
),
t
.
setOpenStatus
(
t
,
!
0
),
t
.
setCssFocusedInput
(
t
)},
c
.
prototype
.
prepareResults
=
function
(
t
,
e
,
n
,
i
){
t
.
data
=
e
.
originalResult
,
t
.
option
.
pagination
&&
t
.
setNavi
(
t
,
e
.
cnt_whole
,
e
.
cnt_page
,
i
),
e
.
keyField
||
(
e
.
keyField
=!
1
),
t
.
option
.
selectOnly
&&
1
===
e
.
candidate
.
length
&&
e
.
candidate
[
0
]
==
n
[
0
]
&&
(
t
.
elem
.
hidden
.
val
(
e
.
keyField
[
0
]),
this
.
setButtonAttrDefault
());
var
o
=!
1
;
n
&&
n
.
length
&&
n
[
0
]
&&
(
o
=!
0
),
t
.
displayResults
(
t
,
e
,
o
)},
c
.
prototype
.
setNavi
=
function
(
t
,
e
,
n
,
i
){
var
o
=
t
.
message
,
a
=
function
(
t
,
e
,
n
,
i
){
var
a
=
function
(){
var
e
=
o
.
page_info
;
return
e
.
replace
(
t
.
template
.
page
.
current
,
n
).
replace
(
t
.
template
.
page
.
total
,
i
)};
if
(
0
===
e
.
find
(
"li"
).
length
){
e
.
hide
().
empty
();
var
r
=
"spfont sp-first"
,
s
=
"spfont sp-previous"
,
l
=
"spfont sp-next"
,
c
=
"spfont sp-last"
;
e
.
append
(
'<li class="csFirstPage" title="'
+
o
.
first_title
+
'" ><a href="javascript:void(0);"> <i class="'
+
r
+
'"></i> </a></li>'
),
e
.
append
(
'<li class="csPreviousPage" title="'
+
o
.
prev_title
+
'" ><a href="javascript:void(0);"><i class="'
+
s
+
'"></i></a></li>'
),
e
.
append
(
'<li class="pageInfoBox"><a href="javascript:void(0);"> '
+
a
()
+
" </a></li>"
),
e
.
append
(
'<li class="csNextPage" title="'
+
o
.
next_title
+
'" ><a href="javascript:void(0);"><i class="'
+
l
+
'"></i></a></li>'
),
e
.
append
(
'<li class="csLastPage" title="'
+
o
.
last_title
+
'" ><a href="javascript:void(0);"> <i class="'
+
c
+
'"></i> </a></li>'
),
e
.
show
()}
else
e
.
find
(
"li.pageInfoBox a"
).
html
(
a
())},
r
=
t
.
elem
.
navi
.
find
(
"ul"
),
s
=
Math
.
ceil
(
e
/
t
.
option
.
pageSize
);
0
===
s
?
i
=
0
:
s
<
i
?
i
=
s
:
0
===
i
&&
(
i
=
1
),
t
.
prop
.
current_page
=
i
,
t
.
prop
.
max_page
=
s
,
a
(
t
,
r
,
i
,
s
);
var
l
=
"disabled"
,
c
=
r
.
find
(
"li.csFirstPage"
),
d
=
r
.
find
(
"li.csPreviousPage"
),
u
=
r
.
find
(
"li.csNextPage"
),
p
=
r
.
find
(
"li.csLastPage"
);
1
===
i
||
0
===
i
?(
c
.
hasClass
(
l
)
||
c
.
addClass
(
l
),
d
.
hasClass
(
l
)
||
d
.
addClass
(
l
)):(
c
.
hasClass
(
l
)
&&
c
.
removeClass
(
l
),
d
.
hasClass
(
l
)
&&
d
.
removeClass
(
l
)),
i
===
s
||
0
===
s
?(
u
.
hasClass
(
l
)
||
u
.
addClass
(
l
),
p
.
hasClass
(
l
)
||
p
.
addClass
(
l
)):(
u
.
hasClass
(
l
)
&&
u
.
removeClass
(
l
),
p
.
hasClass
(
l
)
&&
p
.
removeClass
(
l
)),
s
>
1
&&
t
.
ePaging
()},
c
.
prototype
.
displayResults
=
function
(
e
,
n
,
i
){
var
o
=
e
.
option
,
a
=
e
.
elem
;
if
(
a
.
results
.
hide
().
empty
(),
o
.
multiple
&&
"number"
===
t
.
type
(
o
.
maxSelectLimit
)
&&
o
.
maxSelectLimit
>
0
){
var
r
=
a
.
element_box
.
find
(
"li.selected_tag"
).
length
;
if
(
r
>
0
&&
r
>=
o
.
maxSelectLimit
){
var
s
=
e
.
message
.
max_selected
;
return
void
e
.
showMessage
(
e
,
s
.
replace
(
e
.
template
.
msg
.
maxSelectLimit
,
o
.
maxSelectLimit
))}}
if
(
n
.
candidate
.
length
)
for
(
var
l
=
n
.
candidate
,
c
=
n
.
keyField
,
d
=
a
.
hidden
.
val
(),
u
=
d
?
d
.
split
(
","
):
new
Array
,
p
=
""
,
h
=
0
;
h
<
l
.
length
;
h
++
){
if
(
o
.
formatItem
&&
t
.
isFunction
(
o
.
formatItem
))
try
{
p
=
o
.
formatItem
(
n
.
originalResult
[
h
])}
catch
(
t
){
console
.
error
(
"formatItem内容格式化函数内容设置不正确!"
),
p
=
l
[
h
]}
else
p
=
l
[
h
];
var
f
=
t
(
"<li>"
).
html
(
p
).
attr
({
pkey
:
c
[
h
],
index
:
h
});
o
.
formatItem
||
f
.
attr
(
"title"
,
p
),
t
.
inArray
(
c
[
h
].
toString
(),
u
)
!==-
1
&&
f
.
addClass
(
e
.
css_class
.
selected
),
f
.
data
(
"dataObj"
,
n
.
originalResult
[
h
]),
a
.
results
.
append
(
f
)}
else
{
var
m
=
'<li class="'
+
e
.
css_class
.
message_box
+
'"><i class="spfont sp-warning"></i> '
+
e
.
message
.
not_found
+
"</li>"
;
a
.
results
.
append
(
m
)}
a
.
results
.
show
(),
o
.
multiple
&&
o
.
multipleControlbar
&&
a
.
control
.
show
(),
o
.
pagination
&&
a
.
navi
.
show
(),
e
.
calcResultsSize
(
e
),
e
.
setOpenStatus
(
e
,
!
0
),
e
.
eResultList
(),
e
.
eScroll
(),
i
&&
n
.
candidate
.
length
&&
o
.
autoSelectFirst
&&
e
.
nextLine
(
e
)},
c
.
prototype
.
calcResultsSize
=
function
(
e
){
var
n
=
e
.
option
,
i
=
e
.
elem
,
o
=
function
(){
if
(
"static"
!==
i
.
container
.
css
(
"position"
)){
if
(
!
n
.
pagination
){
var
e
=
i
.
results
.
find
(
"li:first"
).
outerHeight
(
!
0
),
o
=
e
*
n
.
listSize
;
i
.
results
.
css
({
"max-height"
:
o
,
"overflow-y"
:
"auto"
})}
var
a
=
t
(
document
).
width
(),
r
=
t
(
document
).
height
(),
s
=
t
(
window
).
height
(),
l
=
i
.
container
.
offset
(),
c
=
t
(
window
).
scrollTop
(),
d
=
i
.
result_area
.
outerWidth
(),
o
=
i
.
result_area
.
outerHeight
(),
u
=
l
.
left
,
p
=
i
.
container
.
outerHeight
(),
h
=
l
.
left
+
d
>
a
?
u
-
(
d
-
i
.
container
.
outerWidth
()):
u
,
f
=
l
.
top
,
m
=
0
,
g
=
5
,
y
=
f
+
p
+
o
+
g
,
v
=
f
+
o
+
g
,
b
=
r
>
s
;
return
f
-
c
-
g
>
o
&&
b
&&
y
>
s
+
c
||!
b
&&
y
>
s
&&
f
>=
v
?(
m
=
l
.
top
-
o
-
g
,
i
.
result_area
.
removeClass
(
"shadowUp shadowDown"
).
addClass
(
"shadowUp"
)):(
m
=
l
.
top
+
(
n
.
multiple
?
i
.
container
.
outerHeight
():
p
),
i
.
result_area
.
removeClass
(
"shadowUp shadowDown"
).
addClass
(
"shadowDown"
),
m
+=
g
),{
top
:
m
+
"px"
,
left
:
h
+
"px"
}}
var
l
=
i
.
combo_input
.
offset
();
i
.
result_area
.
css
({
top
:
l
.
top
+
i
.
combo_input
.
outerHeight
()
+
"px"
,
left
:
l
.
left
+
"px"
})};
if
(
i
.
result_area
.
is
(
":visible"
))
i
.
result_area
.
css
(
o
());
else
{
var
a
=
o
();
i
.
result_area
.
css
(
a
).
show
(
1
,
function
(){
var
t
=
o
();
a
.
top
===
t
.
top
&&
a
.
left
===
t
.
left
||
i
.
result_area
.
css
(
t
)})}},
c
.
prototype
.
hideResults
=
function
(
e
){
e
.
prop
.
key_paging
&&
(
e
.
scrollWindow
(
e
,
!
0
),
e
.
prop
.
key_paging
=!
1
),
e
.
setCssFocusedInput
(
e
),
e
.
option
.
autoFillResult
,
e
.
elem
.
results
.
empty
(),
e
.
elem
.
result_area
.
hide
(),
e
.
setOpenStatus
(
e
,
!
1
),
t
(
window
).
off
(
"scroll.SelectPage"
),
e
.
abortAjax
(
e
),
e
.
setButtonAttrDefault
()},
c
.
prototype
.
disabled
=
function
(
e
,
n
){
var
i
=
(
e
.
option
,
e
.
elem
);
return
"undefined"
===
t
.
type
(
n
)?
i
.
combo_input
.
prop
(
"disabled"
):
void
(
"boolean"
===
t
.
type
(
n
)
&&
(
i
.
combo_input
.
prop
(
"disabled"
,
n
),
n
?
i
.
container
.
addClass
(
e
.
css_class
.
disabled
):
i
.
container
.
removeClass
(
e
.
css_class
.
disabled
)))},
c
.
prototype
.
firstPage
=
function
(
t
){
t
.
prop
.
current_page
>
1
&&
(
t
.
prop
.
current_page
=
1
,
t
.
prop
.
page_move
=!
0
,
t
.
suggest
(
t
))},
c
.
prototype
.
prevPage
=
function
(
t
){
t
.
prop
.
current_page
>
1
&&
(
t
.
prop
.
current_page
--
,
t
.
prop
.
page_move
=!
0
,
t
.
suggest
(
t
))},
c
.
prototype
.
nextPage
=
function
(
t
){
t
.
prop
.
current_page
<
t
.
prop
.
max_page
&&
(
t
.
prop
.
current_page
++
,
t
.
prop
.
page_move
=!
0
,
t
.
suggest
(
t
))},
c
.
prototype
.
lastPage
=
function
(
t
){
t
.
prop
.
current_page
<
t
.
prop
.
max_page
&&
(
t
.
prop
.
current_page
=
t
.
prop
.
max_page
,
t
.
prop
.
page_move
=!
0
,
t
.
suggest
(
t
))},
c
.
prototype
.
afterAction
=
function
(
t
,
e
){
t
.
inputResize
(
t
),
t
.
elem
.
combo_input
.
change
(),
t
.
setCssFocusedInput
(
t
),
t
.
prop
.
init_set
||
(
t
.
option
.
multiple
?(
t
.
option
.
selectToCloseList
&&
(
t
.
hideResults
(
t
),
t
.
elem
.
combo_input
.
blur
()),
!
t
.
option
.
selectToCloseList
&&
e
&&
(
t
.
suggest
(
t
),
t
.
elem
.
combo_input
.
focus
())):(
t
.
hideResults
(
t
),
t
.
elem
.
combo_input
.
blur
()))},
c
.
prototype
.
selectCurrentLine
=
function
(
e
,
n
){
e
.
scrollWindow
(
e
,
!
0
);
var
i
=
e
.
option
,
o
=
e
.
getCurrentLine
(
e
);
if
(
o
){
var
a
=
o
.
data
(
"dataObj"
),
r
=
a
[
i
.
showField
]
||
o
.
text
(),
s
=
o
.
attr
(
"pkey"
);
if
(
i
.
multiple
){
e
.
elem
.
combo_input
.
val
(
""
);
var
l
=
{
text
:
r
,
value
:
s
};
e
.
isAlreadySelected
(
e
,
l
)
||
(
e
.
addNewTag
(
e
,
a
,
l
),
e
.
tagValuesSet
(
e
))}
else
e
.
elem
.
combo_input
.
val
(
r
),
e
.
elem
.
hidden
.
val
(
s
);
i
.
selectOnly
&&
e
.
setButtonAttrDefault
(),
i
.
eSelect
&&
t
.
isFunction
(
i
.
eSelect
)
&&
i
.
eSelect
(
a
,
e
),
e
.
prop
.
prev_value
=
e
.
elem
.
combo_input
.
val
(),
e
.
prop
.
selected_text
=
e
.
elem
.
combo_input
.
val
(),
e
.
putClearButton
()}
e
.
afterAction
(
e
,
!
0
)},
c
.
prototype
.
putClearButton
=
function
(){
this
.
option
.
multiple
||
this
.
elem
.
combo_input
.
prop
(
"disabled"
)
||
this
.
elem
.
container
.
append
(
this
.
elem
.
clear_btn
)},
c
.
prototype
.
selectAllLine
=
function
(
e
){
var
n
=
e
.
option
,
i
=
new
Array
;
e
.
elem
.
results
.
find
(
"li"
).
each
(
function
(
o
,
a
){
var
r
=
t
(
a
),
s
=
r
.
data
(
"dataObj"
),
l
=
s
[
n
.
showField
]
||
r
.
text
(),
c
=
r
.
attr
(
"pkey"
),
d
=
{
text
:
l
,
value
:
c
};
if
(
e
.
isAlreadySelected
(
e
,
d
)
||
(
e
.
addNewTag
(
e
,
s
,
d
),
e
.
tagValuesSet
(
e
)),
i
.
push
(
s
),
"number"
===
t
.
type
(
n
.
maxSelectLimit
)
&&
n
.
maxSelectLimit
>
0
&&
n
.
maxSelectLimit
===
e
.
elem
.
element_box
.
find
(
"li.selected_tag"
).
length
)
return
!
1
}),
n
.
eSelect
&&
t
.
isFunction
(
n
.
eSelect
)
&&
n
.
eSelect
(
i
,
e
),
e
.
afterAction
(
e
,
!
0
)},
c
.
prototype
.
unSelectAllLine
=
function
(
e
){
var
n
=
e
.
option
,
i
=
(
e
.
elem
.
results
.
find
(
"li"
).
length
,[]);
e
.
elem
.
results
.
find
(
"li"
).
each
(
function
(
n
,
o
){
var
a
=
t
(
o
).
attr
(
"pkey"
),
r
=
e
.
elem
.
element_box
.
find
(
'li.selected_tag[itemvalue="'
+
a
+
'"]'
);
r
.
length
&&
i
.
push
(
r
.
data
(
"dataObj"
)),
e
.
removeTag
(
e
,
r
)}),
e
.
afterAction
(
e
,
!
0
),
n
.
eTagRemove
&&
t
.
isFunction
(
n
.
eTagRemove
)
&&
n
.
eTagRemove
(
i
)},
c
.
prototype
.
clearAll
=
function
(
e
,
n
){
var
i
=
e
.
option
,
o
=
[];
i
.
multiple
&&
(
e
.
elem
.
element_box
.
find
(
"li.selected_tag"
).
each
(
function
(
e
,
n
){
o
.
push
(
t
(
n
).
data
(
"dataObj"
)),
n
.
remove
()}),
e
.
elem
.
element_box
.
find
(
"li.selected_tag"
).
remove
()),
e
.
reset
(
e
),
e
.
afterAction
(
e
,
n
),
i
.
multiple
?
i
.
eTagRemove
&&
t
.
isFunction
(
i
.
eTagRemove
)
&&
i
.
eTagRemove
(
o
):
e
.
elem
.
clear_btn
.
remove
()},
c
.
prototype
.
reset
=
function
(
t
){
t
.
elem
.
combo_input
.
val
(
""
),
t
.
elem
.
hidden
.
val
(
""
),
t
.
prop
.
prev_value
=
""
,
t
.
prop
.
selected_text
=
""
,
t
.
prop
.
current_page
=
1
},
c
.
prototype
.
getCurrentLine
=
function
(
t
){
if
(
t
.
elem
.
result_area
.
is
(
":hidden"
))
return
!
1
;
var
e
=
t
.
elem
.
results
.
find
(
"li."
+
t
.
css_class
.
select
);
return
!!
e
.
length
&&
e
},
c
.
prototype
.
isAlreadySelected
=
function
(
e
,
n
){
var
i
=!
1
;
if
(
n
.
value
){
var
o
=
e
.
elem
.
hidden
.
val
();
if
(
o
){
var
a
=
o
.
split
(
","
);
a
&&
a
.
length
&&
t
.
inArray
(
n
.
value
,
a
)
!=-
1
&&
(
i
=!
0
)}}
return
i
},
c
.
prototype
.
addNewTag
=
function
(
e
,
n
,
i
){
if
(
e
.
option
.
multiple
&&
n
&&
i
){
var
o
,
a
=
e
.
template
.
tag
.
content
;
a
=
a
.
replace
(
e
.
template
.
tag
.
textKey
,
i
.
text
),
a
=
a
.
replace
(
e
.
template
.
tag
.
valueKey
,
i
.
value
),
o
=
t
(
a
),
o
.
data
(
"dataObj"
,
n
),
e
.
elem
.
combo_input
.
prop
(
"disabled"
)
&&
o
.
find
(
"span.tag_close"
).
hide
(),
e
.
elem
.
combo_input
.
closest
(
"li"
).
before
(
o
)}},
c
.
prototype
.
removeTag
=
function
(
e
,
n
){
var
i
=
t
(
n
).
attr
(
"itemvalue"
),
o
=
e
.
elem
.
hidden
.
val
();
if
(
"undefined"
!=
t
.
type
(
i
)
&&
o
){
var
a
=
o
.
split
(
","
),
r
=
t
.
inArray
(
i
.
toString
(),
a
);
r
!=-
1
&&
(
a
.
splice
(
r
,
1
),
e
.
elem
.
hidden
.
val
(
a
.
toString
()))}
t
(
n
).
remove
(),
e
.
inputResize
(
e
)},
c
.
prototype
.
tagValuesSet
=
function
(
e
){
if
(
e
.
option
.
multiple
){
var
n
=
e
.
elem
.
element_box
.
find
(
"li.selected_tag"
);
if
(
n
&&
n
.
length
){
var
i
=
new
Array
;
t
.
each
(
n
,
function
(
e
,
n
){
var
o
=
t
(
n
).
attr
(
"itemvalue"
);
"undefined"
!==
t
.
type
(
o
)
&&
i
.
push
(
o
)}),
i
.
length
&&
e
.
elem
.
hidden
.
val
(
i
.
join
(
","
))}}},
c
.
prototype
.
inputResize
=
function
(
t
){
if
(
t
.
option
.
multiple
){
var
e
=
t
.
elem
.
combo_input
.
closest
(
"li"
),
n
=
function
(
t
,
e
){
e
.
removeClass
(
"full_width"
);
var
n
=
t
.
elem
.
combo_input
.
val
().
length
+
1
,
i
=
.
75
*
n
+
"em"
;
t
.
elem
.
combo_input
.
css
(
"width"
,
i
).
removeAttr
(
"placeholder"
)};
0
===
t
.
elem
.
element_box
.
find
(
"li.selected_tag"
).
length
&&
t
.
elem
.
combo_input
.
attr
(
"placeholder_bak"
)?(
e
.
hasClass
(
"full_width"
)
||
e
.
addClass
(
"full_width"
),
t
.
elem
.
combo_input
.
attr
(
"placeholder"
,
t
.
elem
.
combo_input
.
attr
(
"placeholder_bak"
)).
removeAttr
(
"style"
)):
n
(
t
,
e
)}},
c
.
prototype
.
nextLine
=
function
(
t
){
var
e
,
n
=
t
.
getCurrentLine
(
t
);
if
(
n
?(
e
=
t
.
elem
.
results
.
children
(
"li"
).
index
(
n
),
n
.
removeClass
(
t
.
css_class
.
select
)):
e
=-
1
,
e
++
,
e
<
t
.
elem
.
results
.
children
(
"li"
).
length
){
var
i
=
t
.
elem
.
results
.
children
(
"li"
).
eq
(
e
);
i
.
addClass
(
t
.
css_class
.
select
),
t
.
setCssFocusedResults
(
t
)}
else
t
.
setCssFocusedInput
(
t
);
t
.
scrollWindow
(
t
,
!
1
)},
c
.
prototype
.
prevLine
=
function
(
t
){
var
e
,
n
=
t
.
getCurrentLine
(
t
);
if
(
n
?(
e
=
t
.
elem
.
results
.
children
(
"li"
).
index
(
n
),
n
.
removeClass
(
t
.
css_class
.
select
)):
e
=
t
.
elem
.
results
.
children
(
"li"
).
length
,
e
--
,
e
>-
1
){
var
i
=
t
.
elem
.
results
.
children
(
"li"
).
eq
(
e
);
i
.
addClass
(
t
.
css_class
.
select
),
t
.
setCssFocusedResults
(
t
)}
else
t
.
setCssFocusedInput
(
t
);
t
.
scrollWindow
(
t
,
!
1
)};
var
d
=
t
.
fn
.
selectPage
;
t
.
fn
.
selectPage
=
e
,
t
.
fn
.
selectPage
.
Constructor
=
c
,
t
.
fn
.
selectPageClear
=
i
,
t
.
fn
.
selectPageRefresh
=
o
,
t
.
fn
.
selectPageData
=
a
,
t
.
fn
.
selectPageDisabled
=
r
,
t
.
fn
.
selectPageText
=
s
,
t
.
fn
.
selectPage
.
noConflict
=
function
(){
return
t
.
fn
.
selectPage
=
d
,
this
}}(
window
.
jQuery
),
define
(
"selectpage"
,
function
(){});
\ No newline at end of file
if
(
t
.
elem
.
result_area
.
is
(
":hidden"
))
return
!
1
;
var
e
=
t
.
elem
.
results
.
find
(
"li."
+
t
.
css_class
.
select
);
return
!!
e
.
length
&&
e
},
c
.
prototype
.
isAlreadySelected
=
function
(
e
,
n
){
var
i
=!
1
;
if
(
n
.
value
){
var
o
=
e
.
elem
.
hidden
.
val
();
if
(
o
){
var
a
=
o
.
split
(
","
);
a
&&
a
.
length
&&
t
.
inArray
(
n
.
value
,
a
)
!=-
1
&&
(
i
=!
0
)}}
return
i
},
c
.
prototype
.
addNewTag
=
function
(
e
,
n
,
i
){
if
(
e
.
option
.
multiple
&&
n
&&
i
){
var
o
,
a
=
e
.
template
.
tag
.
content
;
a
=
a
.
replace
(
e
.
template
.
tag
.
textKey
,
i
.
text
),
a
=
a
.
replace
(
e
.
template
.
tag
.
valueKey
,
i
.
value
),
o
=
t
(
a
),
o
.
data
(
"dataObj"
,
n
),
e
.
elem
.
combo_input
.
prop
(
"disabled"
)
&&
o
.
find
(
"span.tag_close"
).
hide
(),
e
.
elem
.
combo_input
.
closest
(
"li"
).
before
(
o
)}},
c
.
prototype
.
removeTag
=
function
(
e
,
n
){
var
i
=
t
(
n
).
attr
(
"itemvalue"
),
o
=
e
.
elem
.
hidden
.
val
();
if
(
"undefined"
!=
t
.
type
(
i
)
&&
o
){
var
a
=
o
.
split
(
","
),
r
=
t
.
inArray
(
i
.
toString
(),
a
);
r
!=-
1
&&
(
a
.
splice
(
r
,
1
),
e
.
elem
.
hidden
.
val
(
a
.
toString
()))}
t
(
n
).
remove
(),
e
.
inputResize
(
e
)},
c
.
prototype
.
tagValuesSet
=
function
(
e
){
if
(
e
.
option
.
multiple
){
var
n
=
e
.
elem
.
element_box
.
find
(
"li.selected_tag"
);
if
(
n
&&
n
.
length
){
var
i
=
new
Array
;
t
.
each
(
n
,
function
(
e
,
n
){
var
o
=
t
(
n
).
attr
(
"itemvalue"
);
"undefined"
!==
t
.
type
(
o
)
&&
i
.
push
(
o
)}),
i
.
length
&&
e
.
elem
.
hidden
.
val
(
i
.
join
(
","
))}}},
c
.
prototype
.
inputResize
=
function
(
t
){
if
(
t
.
option
.
multiple
){
var
e
=
t
.
elem
.
combo_input
.
closest
(
"li"
),
n
=
function
(
t
,
e
){
e
.
removeClass
(
"full_width"
);
var
n
=
t
.
elem
.
combo_input
.
val
().
length
+
1
,
i
=
.
75
*
n
+
"em"
;
t
.
elem
.
combo_input
.
css
(
"width"
,
i
).
removeAttr
(
"placeholder"
)};
0
===
t
.
elem
.
element_box
.
find
(
"li.selected_tag"
).
length
?(
e
.
hasClass
(
"full_width"
)
||
e
.
addClass
(
"full_width"
),
t
.
elem
.
combo_input
.
attr
(
"placeholder_bak"
)
&&
t
.
elem
.
combo_input
.
attr
(
"placeholder"
,
t
.
elem
.
combo_input
.
attr
(
"placeholder_bak"
)).
removeAttr
(
"style"
)):
n
(
t
,
e
)}},
c
.
prototype
.
nextLine
=
function
(
t
){
var
e
,
n
=
t
.
getCurrentLine
(
t
);
if
(
n
?(
e
=
t
.
elem
.
results
.
children
(
"li"
).
index
(
n
),
n
.
removeClass
(
t
.
css_class
.
select
)):
e
=-
1
,
e
++
,
e
<
t
.
elem
.
results
.
children
(
"li"
).
length
){
var
i
=
t
.
elem
.
results
.
children
(
"li"
).
eq
(
e
);
i
.
addClass
(
t
.
css_class
.
select
),
t
.
setCssFocusedResults
(
t
)}
else
t
.
setCssFocusedInput
(
t
);
t
.
scrollWindow
(
t
,
!
1
)},
c
.
prototype
.
prevLine
=
function
(
t
){
var
e
,
n
=
t
.
getCurrentLine
(
t
);
if
(
n
?(
e
=
t
.
elem
.
results
.
children
(
"li"
).
index
(
n
),
n
.
removeClass
(
t
.
css_class
.
select
)):
e
=
t
.
elem
.
results
.
children
(
"li"
).
length
,
e
--
,
e
>-
1
){
var
i
=
t
.
elem
.
results
.
children
(
"li"
).
eq
(
e
);
i
.
addClass
(
t
.
css_class
.
select
),
t
.
setCssFocusedResults
(
t
)}
else
t
.
setCssFocusedInput
(
t
);
t
.
scrollWindow
(
t
,
!
1
)};
var
d
=
t
.
fn
.
selectPage
;
t
.
fn
.
selectPage
=
e
,
t
.
fn
.
selectPage
.
Constructor
=
c
,
t
.
fn
.
selectPageClear
=
i
,
t
.
fn
.
selectPageRefresh
=
o
,
t
.
fn
.
selectPageData
=
a
,
t
.
fn
.
selectPageDisabled
=
r
,
t
.
fn
.
selectPageText
=
s
,
t
.
fn
.
selectPage
.
noConflict
=
function
(){
return
t
.
fn
.
selectPage
=
d
,
this
}}(
window
.
jQuery
),
define
(
"selectpage"
,
function
(){});
\ No newline at end of file
...
...
public/assets/less/backend.less
查看文件 @
dfd326a
...
...
@@ -218,6 +218,34 @@ select.bs-select-hidden, select.selectpicker {
}
}
input.selectpage {
color: transparent;
pointer-events: none;
}
.sp_container {
input.selectpage {
color: inherit;
pointer-events: inherit;
padding-left: 12px;
padding-right: 12px;
}
.sp_element_box {
input.selectpage {
padding-left: 0;
padding-right: 0;
}
li:first-child {
input.selectpage {
padding-left: 9px;
padding-right: 9px;
}
}
}
}
.img-center {
margin: 0 auto;
display: inline;
...
...
public/assets/less/frontend.less
查看文件 @
dfd326a
...
...
@@ -106,6 +106,70 @@ body {
position: absolute;
}
.bootstrap-select .status {
background: #f0f0f0;
clear: both;
color: #999;
font-size: 12px;
font-weight: 500;
line-height: 1;
margin-bottom: -5px;
padding: 10px 20px;
}
select.bs-select-hidden, select.selectpicker {
display: inherit !important;
max-height: 31px;
overflow: hidden;
&[multiple] {
height: 31px;
//visibility: hidden;
padding: 0;
background: #f4f4f4;
option {
color: #f4f4f4;
.opacity(0);
}
@media not all and (min-resolution: .001dpcm) {
@supports (-webkit-appearance:none) {
visibility: hidden;
}
}
}
}
input.selectpage {
color: transparent;
pointer-events: none;
}
.sp_container {
input.selectpage {
color: inherit;
pointer-events: inherit;
padding-left: 12px;
padding-right: 12px;
}
.sp_element_box {
input.selectpage {
padding-left: 0;
padding-right: 0;
}
li:first-child {
input.selectpage {
padding-left: 9px;
padding-right: 9px;
}
}
}
}
/*修复radio和checkbox样式对齐*/
.radio, .checkbox {
> label {
...
...
请
注册
或
登录
后发表评论