Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
ff965f4e
Commit
ff965f4e
authored
Aug 31, 2019
by
wangtp
Browse files
Merge remote-tracking branch 'origin/4.7.2' into 4.7.2
Conflicts: src/main/resources/application.yml
parent
9e238aa6
Changes
44
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/static/skin/manager/4.6.4/js/ms.manager.js
deleted
100644 → 0
View file @
9e238aa6
//点击页面其他位置头部菜单收缩
$
(
document
).
bind
(
"
click
"
,
function
(
e
){
var
target
=
$
(
e
.
target
);
if
(
target
.
closest
(
"
.menu-default
"
).
length
==
0
){
manager
.
topMenu
.
initTop
();
}
})
//浏览器窗口调整事件
$
(
window
).
resize
(
function
()
{
$
(
"
.categoryTree
"
).
height
(
$
(
document
).
height
());
$
(
"
#listFrame
"
).
height
(
$
(
document
).
height
());
$
(
'
.easyui-tabs
'
).
tabs
(
"
resize
"
,{
width
:
$
(
'
.easyui-tabs
'
).
parent
().
width
(),
fit
:
true
,
scrollDuration
:
1000
});
})
$
(
function
(){
//左侧菜单滚动条,鼠标上移显示
$
(
"
.ms-menu,.ms-content-menu
"
).
mouseover
(
function
()
{
$
(
this
).
css
(
"
overflow-y
"
,
"
auto
"
);
});
$
(
"
.ms-menu,.ms-content-menu
"
).
mouseleave
(
function
()
{
$
(
this
).
css
(
"
overflow-y
"
,
"
hidden
"
);
});
//收缩左侧菜单
$
(
"
.slideMenu
"
).
click
(
function
(){
var
obj
=
$
(
this
);
if
(
$
(
"
.ms-menu
"
).
css
(
"
left
"
)
==
"
0px
"
)
{
//修改图标
obj
.
children
(
"
.icon-open
"
).
show
();
obj
.
children
(
"
.icon-close
"
).
hide
();
$
(
"
.ms-menu-div
"
).
css
(
"
position
"
,
"
absolute
"
);
$
(
"
.ms-menu,.ms-menu-div
"
).
animate
({
left
:
'
-180px
'
},
100
)
//改变右侧部分宽度
$
(
'
.easyui-tabs
'
).
tabs
(
"
resize
"
,{
width
:
$
(
'
.easyui-tabs
'
).
parent
().
width
()
});
}
else
{
//修改图标
obj
.
children
(
"
.icon-open
"
).
hide
();
obj
.
children
(
"
.icon-close
"
).
show
();
$
(
"
.ms-menu-div
"
).
css
(
"
position
"
,
"
relative
"
);
$
(
"
.ms-menu,.ms-menu-div
"
).
animate
({
left
:
'
0px
'
},
50
)
//恢复右侧部分宽度
$
(
'
.easyui-tabs
'
).
tabs
(
"
resize
"
,{
width
:
$
(
'
.easyui-tabs
'
).
parent
().
width
(),
fit
:
true
,
scrollDuration
:
1000
});
}
})
//点击左侧菜单添加选项卡
$
(
"
.ms-menu
"
).
delegate
(
"
.ms-menu-child a
"
,
"
click
"
,
function
(){
$
(
"
.easyui-tabs
"
).
show
();
$
(
"
.wellcome
"
).
hide
();
$
(
"
.ms-menu-child a
"
).
removeClass
(
"
active
"
);
$
(
this
).
addClass
(
"
active
"
);
var
title
=
$
(
this
).
data
(
"
title
"
);
var
content
=
$
(
this
).
data
(
"
url
"
);
var
id
=
$
(
this
).
data
(
"
id
"
);
if
(
!
$
(
'
.easyui-tabs
'
).
tabs
(
'
exists
'
,
title
))
{
$
(
'
.easyui-tabs
'
).
tabs
(
'
add
'
,
{
title
:
title
,
content
:
'
<iframe src=
'
+
content
+
'
frameborder="0" height="100%" width="100%" id="mainFrame
'
+
id
+
'
" name="mainFrame
'
+
id
+
'
"></iframe>
'
,
closable
:
true
,
tools
:[{
iconCls
:
'
icon-mini-refresh
'
,
title
:
"
刷新当前选项卡
"
,
handler
:
function
(){
$
(
'
#mainFrame
'
+
id
).
attr
(
'
src
'
,
$
(
'
#mainFrame
'
+
id
).
attr
(
'
src
'
));
}
}]
});
}
else
{
$
(
'
.easyui-tabs
'
).
tabs
(
'
select
'
,
title
);
}
})
//用户在切换选项卡时,和导航树保持同步
$
(
'
.easyui-tabs
'
).
tabs
({
onSelect
:
function
(
title
){
var
_select
=
$
(
"
.easyui-tabs
"
).
tabs
(
"
getSelected
"
);
var
obj
=
_select
.
panel
(
"
options
"
).
tab
;
//循环左侧菜单里每个菜单的text进行选项卡的title进行对比
$
(
"
.ms-menu
"
).
find
(
"
li
"
).
each
(
function
(){
var
target
=
$
(
this
);
if
(
target
.
text
()
==
obj
.
text
()){
$
(
"
.ms-menu-child a
"
).
removeClass
(
"
active
"
);
//左侧对应菜单展开选中
$
(
"
.ms-menu-none
"
).
hide
();
target
.
parent
().
parent
().
slideDown
();
target
.
parent
().
slideDown
();
target
.
find
(
"
a
"
).
addClass
(
"
active
"
);
//头部对应一级菜单进行选中
$
(
"
.ms-menu-list
"
).
find
(
"
li
"
).
removeClass
(
"
active
"
).
each
(
function
(){
if
(
target
.
parent
().
parent
().
data
(
"
model-id
"
)
==
$
(
this
).
data
(
"
model-id
"
)){
$
(
this
).
addClass
(
"
active
"
);
}
})
}
})
}
});
//当关闭最后一个选项卡时,隐藏选项卡页面显示主界面
$
(
'
.easyui-tabs
'
).
tabs
({
onClose
:
function
(){
if
(
$
(
'
.easyui-tabs
'
).
tabs
(
'
tabs
'
).
length
==
0
){
$
(
"
.wellcome
"
).
show
();
$
(
"
.easyui-tabs
"
).
hide
();
$
(
"
.ms-menu-child a
"
).
removeClass
(
"
active
"
);
$
(
"
.ms-menu-list
"
).
find
(
"
li
"
).
removeClass
(
"
active
"
)
}
}
})
})
//MStore做的计时循环特效
window
.
setInterval
(
showMstore
,
1000
);
function
showMstore
(){
$
(
"
.ms-top-mstore
"
).
find
(
"
.animated
"
).
addClass
(
"
rubberBand
"
)
}
window
.
setInterval
(
hiddenMstore
,
1500
);
function
hiddenMstore
(){
$
(
"
.ms-top-mstore
"
).
find
(
"
.animated
"
).
removeClass
(
"
rubberBand
"
)
}
var
manager
=
{
/*头部菜单操作*/
topMenu
:{
initEvent
:
function
()
{
$
(
"
*[data-ms-*]
"
).
each
()
},
/*追加头部菜单*/
initMenu
:
function
(
json
)
{
$
(
"
#ms-menu-list-tmpl
"
).
tmpl
(
json
).
appendTo
(
"
.ms-menu-list
"
);
if
(
$
(
"
.ms-menu-list
"
).
children
().
length
>
5
){
$
(
"
.openMenu
"
).
show
();
}
//将左侧菜单追加,只是隐藏了
$
(
"
#ms-menu-tmpl
"
).
tmpl
(
json
).
appendTo
(
"
.ms-menu
"
);
$
(
"
.ms-menu-parent
"
).
each
(
function
(
n
)
{
var
arr
=
new
Array
;
for
(
i
=
0
;
i
<
json
.
length
;
i
++
)
json
[
i
].
modelModelId
==
$
(
this
).
data
(
"
model-id
"
)
&&
arr
.
push
(
json
[
i
])
//alert(arr)
$
(
"
#ms-menu-child-tmpl
"
).
tmpl
(
arr
).
appendTo
(
$
(
this
).
find
(
"
ul:first
"
))
})
},
/*头部菜单点击收缩效果*/
topMenuOpen
:
function
(
target
,
menuShow
){
var
_height
=
$
(
"
.ms-menu-list
"
).
height
();
if
(
target
.
parent
().
hasClass
(
menuShow
)){
this
.
initTop
();
}
else
{
target
.
parent
().
addClass
(
menuShow
);
$
(
'
.
'
+
menuShow
).
height
(
_height
);
}
},
/*初始化头部菜单*/
initTop
:
function
(){
$
(
"
.menu-default
"
).
height
(
"
50px
"
);
$
(
"
.menu-default
"
).
removeClass
(
"
menu-show
"
);
},
/*点击头部菜单展示二级菜单*/
showChildMenu
:
function
(
target
,
json
){
var
_json
=
{
"
modelTitle
"
:
target
.
text
(),
"
modelIcon
"
:
target
.
data
(
"
model-icon
"
),
"
modelId
"
:
target
.
data
(
"
model-id
"
)};
var
arr
=
new
Array
;
$
(
"
.ms-menu-list
"
).
find
(
"
li
"
).
removeClass
(
"
active
"
);
target
.
addClass
(
"
active
"
);
//显示左侧菜单
if
(
$
(
"
.ms-menu
"
).
css
(
"
display
"
)
==
"
none
"
)
{
$
(
"
.slideMenu
"
).
children
(
"
.icon-open
"
).
hide
();
$
(
"
.slideMenu
"
).
children
(
"
.icon-close
"
).
show
();
$
(
"
.ms-menu,.ms-menu-div
"
).
show
();
//恢复右侧部分宽度
$
(
'
.easyui-tabs
'
).
tabs
(
"
resize
"
,{
width
:
$
(
'
.easyui-tabs
'
).
parent
().
width
(),
fit
:
true
,
scrollDuration
:
1000
});
}
$
(
"
.ms-menu-parent
"
).
each
(
function
(){
if
(
target
.
data
(
"
model-id
"
)
==
$
(
this
).
data
(
"
model-id
"
)){
$
(
this
).
show
();
$
(
"
.ms-menu-parent
"
).
find
(
"
ul
"
).
slideUp
();
$
(
this
).
find
(
"
ul
"
).
slideDown
();
//默认打开当前模块的第一个菜单项
$
(
"
.easyui-tabs
"
).
show
();
$
(
"
.wellcome
"
).
hide
();
var
title
=
$
(
this
).
find
(
"
ul li:eq(0) a
"
).
data
(
"
title
"
);
var
content
=
$
(
this
).
find
(
"
ul li:eq(0) a
"
).
data
(
"
url
"
);
var
id
=
$
(
this
).
find
(
"
ul li:eq(0) a
"
).
data
(
"
id
"
);
if
(
!
$
(
'
.easyui-tabs
'
).
tabs
(
'
exists
'
,
title
))
{
$
(
'
.easyui-tabs
'
).
tabs
(
'
add
'
,
{
title
:
title
,
content
:
'
<iframe src=
'
+
content
+
'
frameborder="0" height="100%" width="100%" id="mainFrame
'
+
id
+
'
" name="mainFrame
'
+
id
+
'
"></iframe>
'
,
closable
:
true
,
tools
:[{
iconCls
:
'
icon-mini-refresh
'
,
handler
:
function
(){
$
(
'
#mainFrame
'
+
id
).
attr
(
'
src
'
,
$
(
'
#mainFrame
'
+
id
).
attr
(
'
src
'
));
}
}]
});
}
else
{
$
(
'
.easyui-tabs
'
).
tabs
(
'
select
'
,
title
);
}
}
})
this
.
initTop
();
},
},
/*左侧菜单操作*/
leftMenu
:{
/*左侧菜单点击收缩效果*/
leftMenuOpen
:
function
(
target
,
menu
){
menu
.
slideToggle
();
},
},
}
$
(
function
(){
//当头部菜单超过5个时,点击展开头部菜单
$
(
"
.openMenu
"
).
click
(
function
(){
manager
.
topMenu
.
topMenuOpen
(
$
(
this
),
"
menu-show
"
);
})
//点击展开左侧菜单子菜单
$
(
"
.ms-menu
"
).
delegate
(
"
.ms-menu-parent-title
"
,
"
click
"
,
function
(){
var
menu
=
$
(
this
).
parent
().
siblings
(
"
.ms-menu-child
"
);
manager
.
leftMenu
.
leftMenuOpen
(
$
(
this
),
menu
);
})
//移除左侧菜单
$
(
"
.ms-menu
"
).
delegate
(
"
.ms-menu-parent
"
,
"
mouseover
"
,
function
(){
$
(
"
.closeMenu
"
).
hide
();
$
(
this
).
find
(
"
.closeMenu
"
).
show
();
})
$
(
document
).
bind
(
"
mouseover
"
,
function
(
e
){
var
target
=
$
(
e
.
target
);
if
(
target
.
closest
(
"
.ms-menu-parent
"
).
length
==
0
){
$
(
"
.closeMenu
"
).
hide
();
}
})
//关闭左侧菜单
$
(
"
.ms-menu
"
).
delegate
(
"
.closeMenu
"
,
"
click
"
,
function
(){
$
(
this
).
parent
().
parent
().
hide
();
var
menu
=
$
(
this
).
parent
().
siblings
(
"
.ms-menu-child
"
);
manager
.
leftMenu
.
leftMenuOpen
(
$
(
this
),
menu
);
var
index
=
0
;
$
(
"
.ms-menu-parent
"
).
each
(
function
(){
var
target
=
$
(
this
)
$
(
"
.ms-menu-list li
"
).
each
(
function
(){
if
(
target
.
data
(
"
model-id
"
)
==
$
(
this
).
data
(
"
model-id
"
)){
$
(
this
).
removeClass
(
"
active
"
);
}
})
if
(
$
(
this
).
css
(
"
display
"
)
==
"
none
"
){
index
++
;
if
(
index
==
$
(
"
.ms-menu-parent
"
).
length
){
$
(
"
.ms-menu-list li
"
).
removeClass
(
"
active
"
);
$
(
"
.ms-menu-none
"
).
show
();
}
}
})
})
})
\ No newline at end of file
src/main/webapp/static/skin/manager/4.6.4/js/ms.manager.min.js
deleted
100644 → 0
View file @
9e238aa6
function
showMstore
(){
$
(
"
.ms-top-mstore
"
).
find
(
"
.animated
"
).
addClass
(
"
rubberBand
"
)}
function
hiddenMstore
(){
$
(
"
.ms-top-mstore
"
).
find
(
"
.animated
"
).
removeClass
(
"
rubberBand
"
)}
$
(
document
).
bind
(
"
click
"
,
function
(
e
){
var
t
=
$
(
e
.
target
);
0
==
t
.
closest
(
"
.menu-default
"
).
length
&&
manager
.
topMenu
.
initTop
()}),
$
(
window
).
resize
(
function
(){
$
(
"
.categoryTree
"
).
height
(
$
(
document
).
height
()),
$
(
"
#listFrame
"
).
height
(
$
(
document
).
height
()),
$
(
"
.easyui-tabs
"
).
tabs
(
"
resize
"
,{
width
:
$
(
"
.easyui-tabs
"
).
parent
().
width
(),
fit
:
!
0
,
scrollDuration
:
1
e3
})}),
$
(
function
(){
$
(
"
.slideMenu
"
).
click
(
function
(){
var
e
=
$
(
this
);
"
block
"
==
$
(
"
.ms-menu
"
).
css
(
"
display
"
)?(
e
.
children
(
"
.icon-open
"
).
show
(),
e
.
children
(
"
.icon-close
"
).
hide
(),
$
(
"
.ms-menu,.ms-menu-div
"
).
hide
(),
$
(
"
.easyui-tabs
"
).
tabs
(
"
resize
"
,{
width
:
$
(
"
.easyui-tabs
"
).
parent
().
width
()})):(
e
.
children
(
"
.icon-open
"
).
hide
(),
e
.
children
(
"
.icon-close
"
).
show
(),
$
(
"
.ms-menu,.ms-menu-div
"
).
show
(),
$
(
"
.easyui-tabs
"
).
tabs
(
"
resize
"
,{
width
:
$
(
"
.easyui-tabs
"
).
parent
().
width
(),
fit
:
!
0
,
scrollDuration
:
1
e3
}))}),
$
(
"
.ms-menu
"
).
delegate
(
"
.ms-menu-child a
"
,
"
click
"
,
function
(){
$
(
"
.easyui-tabs
"
).
show
(),
$
(
"
.wellcome
"
).
hide
(),
$
(
"
.ms-menu-child a
"
).
removeClass
(
"
active
"
),
$
(
this
).
addClass
(
"
active
"
);
var
e
=
$
(
this
).
data
(
"
title
"
),
t
=
$
(
this
).
data
(
"
url
"
);
$
(
"
.easyui-tabs
"
).
tabs
(
"
exists
"
,
e
)?
$
(
"
.easyui-tabs
"
).
tabs
(
"
select
"
,
e
):
$
(
"
.easyui-tabs
"
).
tabs
(
"
add
"
,{
title
:
e
,
content
:
"
<iframe src=
"
+
t
+
'
frameborder="0" height="100%" width="100%" id="mainFrame" name="mainFrame"></iframe>
'
,
closable
:
!
0
})}),
"
block
"
==
$
(
"
.easyui-tabs
"
).
css
(
"
display
"
)
&&
$
(
"
.easyui-tabs
"
).
tabs
({
onSelect
:
function
(
e
){
var
t
=
$
(
"
.easyui-tabs
"
).
tabs
(
"
getSelected
"
),
i
=
t
.
panel
(
"
options
"
).
tab
;
$
(
"
.ms-menu
"
).
find
(
"
li
"
).
each
(
function
(){
var
e
=
$
(
this
);
e
.
text
()
==
i
.
text
()
&&
(
$
(
"
.ms-menu-child a
"
).
removeClass
(
"
active
"
),
e
.
parent
().
parent
().
slideDown
(),
e
.
parent
().
slideDown
(),
e
.
find
(
"
a
"
).
addClass
(
"
active
"
),
$
(
"
.ms-menu-list
"
).
find
(
"
li
"
).
removeClass
(
"
active
"
).
each
(
function
(){
e
.
parent
().
parent
().
data
(
"
model-id
"
)
==
$
(
this
).
data
(
"
model-id
"
)
&&
$
(
this
).
addClass
(
"
active
"
)}))})}}),
$
(
"
.easyui-tabs
"
).
tabs
({
onClose
:
function
(){
0
==
$
(
"
.easyui-tabs
"
).
tabs
(
"
tabs
"
).
length
&&
(
$
(
"
.wellcome
"
).
show
(),
$
(
"
.easyui-tabs
"
).
hide
(),
$
(
"
.ms-menu-child a
"
).
removeClass
(
"
active
"
),
$
(
"
.ms-menu-list
"
).
find
(
"
li
"
).
removeClass
(
"
active
"
))}})}),
window
.
setInterval
(
showMstore
,
1
e3
),
window
.
setInterval
(
hiddenMstore
,
1500
);
var
manager
=
{
topMenu
:{
initEvent
:
function
(){
$
(
"
*[data-ms-*]
"
).
each
()},
initMenu
:
function
(
e
){
$
(
"
#ms-menu-list-tmpl
"
).
tmpl
(
e
).
appendTo
(
"
.ms-menu-list
"
),
$
(
"
.ms-menu-list
"
).
children
().
length
>
5
&&
$
(
"
.openMenu
"
).
show
(),
$
(
"
#ms-menu-tmpl
"
).
tmpl
(
e
).
appendTo
(
"
.ms-menu
"
),
$
(
"
.ms-menu-parent
"
).
each
(
function
(
t
){
var
s
=
new
Array
;
for
(
i
=
0
;
i
<
e
.
length
;
i
++
)
e
[
i
].
modelModelId
==
$
(
this
).
data
(
"
model-id
"
)
&&
s
.
push
(
e
[
i
]);
$
(
"
#ms-menu-child-tmpl
"
).
tmpl
(
s
).
appendTo
(
$
(
this
).
find
(
"
ul:first
"
))})},
topMenuOpen
:
function
(
e
,
t
){
var
i
=
$
(
"
.ms-menu-list
"
).
height
();
e
.
parent
().
hasClass
(
t
)?
this
.
initTop
():(
e
.
parent
().
addClass
(
t
),
$
(
"
.
"
+
t
).
height
(
i
))},
initTop
:
function
(){
$
(
"
.menu-default
"
).
height
(
"
50px
"
),
$
(
"
.menu-default
"
).
removeClass
(
"
menu-show
"
)},
showChildMenu
:
function
(
e
,
t
){({
modelTitle
:
e
.
text
(),
modelIcon
:
e
.
data
(
"
model-icon
"
),
modelId
:
e
.
data
(
"
model-id
"
)}),
new
Array
;
$
(
"
.ms-menu-list
"
).
find
(
"
li
"
).
removeClass
(
"
active
"
),
e
.
addClass
(
"
active
"
),
"
none
"
==
$
(
"
.ms-menu
"
).
css
(
"
display
"
)
&&
(
$
(
"
.slideMenu
"
).
children
(
"
.icon-open
"
).
hide
(),
$
(
"
.slideMenu
"
).
children
(
"
.icon-close
"
).
show
(),
$
(
"
.ms-menu,.ms-menu-div
"
).
show
(),
$
(
"
.easyui-tabs
"
).
tabs
(
"
resize
"
,{
width
:
$
(
"
.easyui-tabs
"
).
parent
().
width
(),
fit
:
!
0
,
scrollDuration
:
1
e3
})),
$
(
"
.ms-menu-parent
"
).
each
(
function
(){
if
(
e
.
data
(
"
model-id
"
)
==
$
(
this
).
data
(
"
model-id
"
)){
$
(
this
).
show
(),
$
(
"
.ms-menu-none
"
).
hide
(),
$
(
"
.ms-menu-parent
"
).
find
(
"
ul
"
).
slideUp
(),
$
(
this
).
find
(
"
ul
"
).
slideDown
(),
$
(
"
.easyui-tabs
"
).
show
(),
$
(
"
.wellcome
"
).
hide
();
var
t
=
$
(
this
).
find
(
"
ul li:eq(0) a
"
).
data
(
"
title
"
),
i
=
$
(
this
).
find
(
"
ul li:eq(0) a
"
).
data
(
"
url
"
);
$
(
"
.easyui-tabs
"
).
tabs
(
"
exists
"
,
t
)?
$
(
"
.easyui-tabs
"
).
tabs
(
"
select
"
,
t
):
$
(
"
.easyui-tabs
"
).
tabs
(
"
add
"
,{
title
:
t
,
content
:
"
<iframe src=
"
+
i
+
'
frameborder="0" height="100%" width="100%" id="mainFrame" name="mainFrame"></iframe>
'
,
closable
:
!
0
})}}),
this
.
initTop
()}},
leftMenu
:{
leftMenuOpen
:
function
(
e
,
t
){
t
.
slideToggle
()}}};
$
(
function
(){
$
(
"
.openMenu
"
).
click
(
function
(){
manager
.
topMenu
.
topMenuOpen
(
$
(
this
),
"
menu-show
"
)}),
$
(
"
.ms-menu
"
).
delegate
(
"
.ms-menu-parent-title
"
,
"
click
"
,
function
(){
var
e
=
$
(
this
).
parent
().
siblings
(
"
.ms-menu-child
"
);
manager
.
leftMenu
.
leftMenuOpen
(
$
(
this
),
e
)}),
$
(
"
.ms-menu
"
).
delegate
(
"
.ms-menu-parent
"
,
"
mouseover
"
,
function
(){
$
(
"
.closeMenu
"
).
hide
(),
$
(
this
).
find
(
"
.closeMenu
"
).
show
()}),
$
(
document
).
bind
(
"
mouseover
"
,
function
(
e
){
var
t
=
$
(
e
.
target
);
0
==
t
.
closest
(
"
.ms-menu-parent
"
).
length
&&
$
(
"
.closeMenu
"
).
hide
()}),
$
(
"
.ms-menu
"
).
delegate
(
"
.closeMenu
"
,
"
click
"
,
function
(){
$
(
this
).
parent
().
parent
().
hide
();
var
e
=
$
(
this
).
parent
().
siblings
(
"
.ms-menu-child
"
);
manager
.
leftMenu
.
leftMenuOpen
(
$
(
this
),
e
);
var
t
=
0
;
$
(
"
.ms-menu-parent
"
).
each
(
function
(){
var
e
=
$
(
this
);
$
(
"
.ms-menu-list li
"
).
each
(
function
(){
e
.
data
(
"
model-id
"
)
==
$
(
this
).
data
(
"
model-id
"
)
&&
$
(
this
).
removeClass
(
"
active
"
)}),
"
none
"
==
$
(
this
).
css
(
"
display
"
)
&&
(
t
++
,
t
==
$
(
"
.ms-menu-parent
"
).
length
&&
(
$
(
"
.ms-menu-list li
"
).
removeClass
(
"
active
"
),
$
(
"
.ms-menu-none
"
).
show
()))})})});
\ No newline at end of file
src/main/webapp/static/skin/manager/4.6.4/js/ms.web.js
deleted
100644 → 0
View file @
9e238aa6
// JavaScript Document
(
function
(
$
)
{
/**
* ajax提交表单
*
* @form 表单 格式:#表单id
* @config 配置扩展用,可包含参数:func,回调方法
*/
$
.
fn
.
postForm
=
function
(
form
,
config
)
{
var
target
=
$
(
this
);
if
(
isEmpty
(
$
(
form
).
attr
(
"
action
"
))
&&
isEmpty
(
config
.
action
))
{
alert
(
"
配置错误:from表单不存在action属性
"
);
return
;
}
var
func
;
var
action
=
$
(
form
).
attr
(
"
action
"
);
var
data_type
=
"
json
"
;
if
(
config
!=
undefined
)
{
if
(
config
.
func
!=
undefined
)
{
func
=
config
.
func
;
}
if
(
config
.
action
!=
undefined
)
{
action
=
config
.
action
;
}
}
$
.
ajax
({
type
:
"
POST
"
,
url
:
action
,
dataType
:
data_type
,
data
:
$
(
form
).
serialize
(),
beforeSend
:
function
()
{
target
.
attr
(
"
disabled
"
,
true
);
},
success
:
function
(
data
)
{
if
(
typeof
(
func
)
==
"
string
"
)
{
eval
(
func
+
"
(data)
"
);
}
else
if
(
typeof
(
func
)
==
"
function
"
)
{
func
.
call
(
this
,
data
);
}
target
.
removeAttr
(
"
disabled
"
);
}
});
}
/**
* 发起ajax连接请求
*
* @config(优先) 配置扩展用,可包含参数:func,回调方法
* config格式:{url:请求地址,data:请求参数,loadingText:加载时文字}
* 调用该方法的元素必须存在data-ajax-url参数; 参数:data-ajax-url必须
* data-ajax-data 可选
*/
$
.
fn
.
request
=
function
(
config
)
{
var
target
=
$
(
this
);
if
(
isEmpty
(
target
.
attr
(
"
data-ajax-url
"
))
&&
isEmpty
(
config
.
url
))
{
alert
(
target
.
selector
+
"
配置错误:data-ajax-url属性不存在
"
);
return
;
}
var
method
=
"
POST
"
;
var
data_type
=
"
json
"
;
var
func
=
null
;
var
_url
=
isEmpty
(
target
.
attr
(
"
data-ajax-url
"
))
?
null
:
target
.
attr
(
"
data-ajax-url
"
);
// 请求地址
var
_data
=
isEmpty
(
target
.
attr
(
"
data-ajax-data
"
))
?
null
:
target
.
attr
(
"
data-ajax-data
"
);
// 请求参数
var
_loadingText
=
isEmpty
(
target
.
attr
(
"
data-ajax-loading-text
"
))
?
null
:
target
.
attr
(
"
data-ajax-loading-text
"
);
// 加载状态;
var
data_type
=
isEmpty
(
target
.
attr
(
"
data-ajax-type
"
))
?
null
:
target
.
attr
(
"
data-ajax-type
"
);
// 返回数据类型
var
text
=
target
.
text
();
if
(
config
!=
undefined
)
{
// 请求方法
if
(
config
.
method
!=
undefined
)
{
var
_method
=
config
.
method
;
if
(
_method
.
toLowerCase
()
!=
"
post
"
||
_method
.
toLowerCase
()
!=
"
get
"
)
{
method
=
_method
;
}
}
// 回调方法
if
(
config
.
func
!=
undefined
)
{
func
=
config
.
func
;
}
// 返回数据类型
if
(
config
.
type
!=
undefined
)
{
var
_type
=
config
.
type
.
toLowerCase
();
if
(
_type
==
"
xml
"
||
_type
==
"
html
"
||
_type
==
"
script
"
||
_type
==
"
jsonp
"
||
_type
==
"
json
"
||
_type
==
"
text
"
)
{
data_type
=
_type
;
}
}
if
(
config
.
url
!=
undefined
)
{
_url
=
config
.
url
;
}
if
(
config
.
data
!=
undefined
)
{
_data
=
config
.
data
;
}
if
(
config
.
loadingText
!=
undefined
)
{
_loadingText
=
config
.
loadingText
;
}
}
$
.
ajax
({
type
:
method
,
url
:
_url
,
dataType
:
data_type
,
data
:
_data
,
beforeSend
:
function
()
{
if
(
target
[
0
].
nodeName
==
"
INPUT
"
)
{
if
(
!
isEmpty
(
_loadingText
))
{
target
.
text
(
_loadingText
);
}
target
.
attr
(
"
disabled
"
,
true
);
}
},
success
:
function
(
data
)
{
if
(
typeof
(
func
)
==
"
string
"
)
{
eval
(
func
+
"
(data)
"
);
}
else
if
(
typeof
(
func
)
==
"
function
"
)
{
func
.
call
(
this
,
data
);
}
if
(
target
[
0
].
nodeName
==
"
INPUT
"
)
{
target
.
removeAttr
(
"
disabled
"
);
target
.
text
(
text
);
}
}
});
},
$
.
fn
.
noDataMsg
=
function
(
config
)
{
if
(
config
!=
undefined
)
{
}
}
/**
* 判断是否为空, target:判断对象 message:提示信息 true:为空 false:不为空
*/
function
isEmpty
(
target
,
message
)
{
if
(
target
==
undefined
||
target
==
null
||
target
.
trim
()
==
""
||
target
.
trim
().
length
==
0
)
{
if
(
message
!=
undefined
)
{
alert
(
message
);
}
return
true
;
}
return
false
;
}
})(
jQuery
);
var
Ms
=
{
_target
:
this
,
"
msg
"
:
function
(
str
,
url
)
{
// 提示消息 Ms.msg()调用
var
obj
=
$
(
"
<div class='ms-msg'></div>
"
);
$
(
"
body
"
).
append
(
obj
);
obj
.
html
(
str
).
show
();
obj
.
animate
({
opacity
:
1
,
},
500
,
'
ease
'
,
function
()
{
$
(
this
).
animate
({
opacity
:
0
,
},
800
,
'
ease
'
,
function
()
{
if
(
typeof
(
url
)
!=
"
undefined
"
)
{
_target
.
loadUrl
(
url
);
}
});
});
},
"
loadUrl
"
:
function
(
url
)
{
location
.
href
=
url
;
},
"
post
"
:
function
(
url
,
params
,
func
)
{
// 会员中心ajax请求类
$
.
ajax
({
type
:
"
POST
"
,
url
:
url
,
dataType
:
'
json
'
,
data
:
params
,
beforeSend
:
function
()
{
try
{
_target
.
msg
(
"
加载中...
"
);
}
catch
(
e
)
{
}
},
success
:
function
(
json
)
{
func
(
json
);
},
error
:
function
(
xhr
,
type
)
{
// 服务器异常提示
try
{
_target
.
msg
(
"
服务器繁忙稍后重试!
"
);
}
catch
(
e
)
{
}
}
});
},
"
get
"
:
function
(
url
,
params
,
func
)
{
// 会员中心ajax请求类
$
.
ajax
({
type
:
"
GET
"
,
url
:
url
,
dataType
:
'
json
'
,
data
:
params
,
beforeSend
:
function
()
{
try
{
_target
.
msg
(
"
加载中...
"
);
}
catch
(
e
){}
},
success
:
function
(
json
)
{
func
(
json
);
},
error
:
function
(
xhr
,
type
)
{
// 服务器异常提示
try
{
_target
.
msg
(
"
服务器繁忙稍后重试!
"
);
}
catch
(
e
){}
}
});
},
"
load
"
:
function
(
url
,
method
,
params
,
func
)
{
// 非会员中心ajax请求类
$
.
ajax
({
type
:
method
,
url
:
url
,
dataType
:
'
json
'
,
data
:
params
,
beforeSend
:
function
()
{
_target
.
msg
(
"
加载中...
"
);
},
success
:
function
(
json
)
{
if
(
func
!=
null
&&
func
!=
undefined
)
{
func
(
json
);
}
},
error
:
function
(
xhr
,
type
)
{
// 服务器异常提示
_target
.
msg
(
"
服务器繁忙稍后重试!
"
);
}
});
},
"
setCookie
"
:
function
(
key
,
value
,
time
)
{
// 依赖zepto.cookie.min.js
// time单位为天数字
$
.
fn
.
cookie
(
key
,
value
,
{
path
:
'
/
'
,
expires
:
time
});
},
"
getCookie
"
:
function
(
key
)
{
// 读取cookie
return
decodeURIComponent
(
$
.
fn
.
cookie
(
key
));
},
"
delCookie
"
:
function
(
key
)
{
$
.
fn
.
cookie
(
key
,
null
);
},
"
queryString
"
:
function
(
param
)
{
var
svalue
=
location
.
search
.
match
(
new
RegExp
(
"
[
\
?
\
&]
"
+
param
+
"
=([^
\
&]*)(
\
&?)
"
,
"
i
"
));
return
svalue
?
svalue
[
1
]
:
svalue
;
},
"
initModal
"
:
function
()
{
// 初始化模态框
// 弹出框处理
if
(
$
(
"
*[data-toggle='modal']
"
).
size
()
>
0
)
{
$
(
"
*[data-toggle='modal']
"
).
each
(
function
(
index
)
{
$
(
"
body
"
).
on
(
"
tap
"
,
"
[data-target=
\"
"
+
$
(
this
).
attr
(
"
data-target
"
)
+
"
\"
]
"
,
function
()
{
if
(
$
(
this
).
attr
(
"
data-target
"
)
!=
""
)
{
openModal
(
$
(
this
).
attr
(
"
data-target
"
),
w
,
h
);
}
})
});
}
function
openModal
(
modalId
,
w
,
h
)
{
$
(
modalId
).
show
();
Ms
.
init
(
w
,
h
);
if
(
!
$
(
modalId
).
parent
().
hasClass
(
"
modalMask
"
))
{
$
(
modalId
)
.
wrap
(
"
<div class='modalMask' style='width:
"
+
w
+
"
px;height:
"
+
h
+
"
px;position: absolute;background:rgba(0, 0, 0, 0.6) none repeat scroll 0 0 !important;filter:Alpha(opacity=80); background:#fff;z-index: 9997;top: 0;'>
"
);
}
else
{
$
(
modalId
).
parent
().
show
();
}
$
(
modalId
).
find
(
"
.ms-modal-button
"
).
css
(
"
line-height
"
,
"
200%
"
);
$
(
modalId
).
css
(
"
margin-left
"
,
(
$
(
modalId
).
parent
().
width
()
-
$
(
modalId
).
width
())
/
2
+
"
px
"
);
$
(
modalId
).
css
(
"
margin-top
"
,
"
10%
"
);
$
(
modalId
).
on
(
"
tap
"
,
"
.close
"
,
function
()
{
// $(modalId).hide();
// $(modalId).unwrap().parent();
hideModal
(
modalId
);
})
}
function
hideModal
(
modalId
)
{
$
(
modalId
).
parent
().
hide
();
$
(
modalId
).
hide
();
}
},
"
browser
"
:
{
versions
:
function
()
{
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
return
{
android4
:
u
.
indexOf
(
'
Android 4
'
)
>
-
1
&&
u
.
indexOf
(
'
Linux
'
)
>
-
1
,
android2
:
u
.
indexOf
(
'
Android 2
'
)
>
-
1
&&
u
.
indexOf
(
'
Linux
'
)
>
-
1
,
iPhone
:
u
.
indexOf
(
'
iPhone
'
)
>
-
1
,
iPad
:
u
.
indexOf
(
'
iPad
'
)
>
-
1
,
iPod
:
u
.
indexOf
(
'
iPod
'
)
>
-
1
,
};
}(),
language
:
(
navigator
.
browserLanguage
||
navigator
.
language
)
.
toLowerCase
()
}
};
var
ms
=
Ms
;
src/main/webapp/static/skin/manager/4.6.4/less/login.less
deleted
100644 → 0
View file @
9e238aa6
html,body{
width:100%;
height:100%;
margin: 0;
min-width: 1200px;
}
p{
margin: 0;
}
#errorDisplay{
background-color: #fff;
border-radius: 4px;
width: 680px;
height: 88px;
margin: auto;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
.errorData{
overflow: hidden;
margin-top: 18px;
width: 88%;
p{
line-height: 24px;
font-size: 16px;
color: #999;
}
}
img{
float: left;
padding-top: 20px;
padding-right: 15px;
padding-left: 25px;
}
}
body{
font-family: "微软雅黑";
background:url("../images/background.png") no-repeat;
background-size: 100% 100%;
}
#mcms-login{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.login-float{
float: left;
}
.login-form-container{
width: 340px;
height: 320px;
background-color: #ffffff;
// padding: 39px 54px;
.login-title{
padding: 39px 54px 0 54px;
line-height: 13px;
.login-chinese-title{
font-size: 16px;
}
}
.ms-login-error-text{
height: 20px;
font-size: 12px;
color: #e4393c;
display: flex;
align-items: center;
margin: 5px 54px;
img{
padding-right: 5px;
}
}
form{
padding: 0 52px;
.login-people-name,.login-code input{
height: 34px;
padding:5px 10px;
}
.login-people-name,.login-code,.login-remmember-password{
margin-bottom: 12px;
}
.login-people-name{
width: 100%;
}
input{
border: 1px solid #cccccc;
border-radius: 3px;
outline: none;
&::-webkit-input-placeholder {
color: #999999;
font-size: 12px;
}
&::-moz-placeholder {
color: #999999;
font-size: 12px;
}
}
.ms-error{
border:1px solid #e4393c;
}
.login-code{
overflow: hidden;
.login-code-input{
width: 108px;
}
.login-code-input,.login-code-img{
margin-right: 6px;
}
.login-code-img{
height: 34px;
}
.login-code-text{
font-size: 10px;
line-height: 15px;
}
.login-code-change{
cursor: pointer;
}
}
.login-remember{
margin: 0;
font-weight: 500;
}
.login-remmember-password{
display: flex;
line-height: 13px;
align-items: center;
height: 13px;
}
.login-remmember-password input[type="checkbox"]{
margin-right: 6px;
}
.login-button{
width: 100%;
cursor: pointer;
height: 34px;
line-height: 34px;
font-size: 14px;
color: #ffffff;
text-align: center;
background-color:#eeeeee;
border-radius:4px;
background-size: 100% 100%;
}
}
.login-chinese-title,.login-code-change{
color: #0099ff;
}
.login-english-title,.login-remmember-password,.login-code-text{
color: #999999;
}
.login-english-title,.login-remmember-password{
font-size: 12px;
}
}
}
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment