Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
知鸟1号
AdminLTE
提交
3810f026
A
AdminLTE
项目概览
知鸟1号
/
AdminLTE
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
AdminLTE
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3810f026
编写于
3月 17, 2015
作者:
A
Abdullah Almsaeed
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed issue #288
上级
3e3fedd4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
204 addition
and
193 deletion
+204
-193
.gitignore
.gitignore
+1
-0
dist/js/app.js
dist/js/app.js
+196
-191
dist/js/app.min.js
dist/js/app.min.js
+1
-1
documentation/style.css
documentation/style.css
+6
-1
未找到文件。
.gitignore
浏览文件 @
3810f026
...
...
@@ -5,3 +5,4 @@
/node_modules/
TODO
*.zip
test.html
\ No newline at end of file
dist/js/app.js
浏览文件 @
3810f026
...
...
@@ -125,6 +125,9 @@ $(function () {
//Easy access to options
var
o
=
$
.
AdminLTE
.
options
;
//Set up the object
_init
();
//Activate the layout maker
$
.
AdminLTE
.
layout
.
activate
();
...
...
@@ -183,218 +186,220 @@ $(function () {
});
});
/* ----------------------
* -
AdminLTE Functions
-
* ----------------------
/* ----------------------
------------
* -
Initialize the AdminLTE Object
-
* ----------------------
------------
* All AdminLTE functions are implemented below.
*/
/* prepareLayout
* =============
* Fixes the layout height in case min-height fails.
*
* @type Object
* @usage $.AdminLTE.layout.activate()
* $.AdminLTE.layout.fix()
* $.AdminLTE.layout.fixSidebar()
*/
$
.
AdminLTE
.
layout
=
{
activate
:
function
()
{
var
_this
=
this
;
_this
.
fix
();
_this
.
fixSidebar
();
$
(
window
,
"
.wrapper
"
).
resize
(
function
()
{
function
_init
()
{
/* Layout
* ======
* Fixes the layout height in case min-height fails.
*
* @type Object
* @usage $.AdminLTE.layout.activate()
* $.AdminLTE.layout.fix()
* $.AdminLTE.layout.fixSidebar()
*/
$
.
AdminLTE
.
layout
=
{
activate
:
function
()
{
var
_this
=
this
;
_this
.
fix
();
_this
.
fixSidebar
();
});
},
fix
:
function
()
{
//Get window height and the wrapper height
var
neg
=
$
(
'
.main-header
'
).
outerHeight
()
+
$
(
'
.main-footer
'
).
outerHeight
();
var
window_height
=
$
(
window
).
height
();
var
sidebar_height
=
$
(
"
.sidebar
"
).
height
();
//Set the min-height of the content and sidebar based on the
//the height of the document.
if
(
$
(
"
body
"
).
hasClass
(
"
fixed
"
))
{
$
(
"
.content-wrapper, .right-side
"
).
css
(
'
min-height
'
,
window_height
-
$
(
'
.main-footer
'
).
outerHeight
());
}
else
{
if
(
window_height
>=
sidebar_height
)
{
$
(
"
.content-wrapper, .right-side
"
).
css
(
'
min-height
'
,
window_height
-
neg
);
$
(
window
,
"
.wrapper
"
).
resize
(
function
()
{
_this
.
fix
();
_this
.
fixSidebar
();
});
},
fix
:
function
()
{
//Get window height and the wrapper height
var
neg
=
$
(
'
.main-header
'
).
outerHeight
()
+
$
(
'
.main-footer
'
).
outerHeight
();
var
window_height
=
$
(
window
).
height
();
var
sidebar_height
=
$
(
"
.sidebar
"
).
height
();
//Set the min-height of the content and sidebar based on the
//the height of the document.
if
(
$
(
"
body
"
).
hasClass
(
"
fixed
"
)
)
{
$
(
"
.content-wrapper, .right-side
"
).
css
(
'
min-height
'
,
window_height
-
$
(
'
.main-footer
'
).
outerHeight
()
);
}
else
{
$
(
"
.content-wrapper, .right-side
"
).
css
(
'
min-height
'
,
sidebar_height
);
if
(
window_height
>=
sidebar_height
)
{
$
(
"
.content-wrapper, .right-side
"
).
css
(
'
min-height
'
,
window_height
-
neg
);
}
else
{
$
(
"
.content-wrapper, .right-side
"
).
css
(
'
min-height
'
,
sidebar_height
);
}
}
}
},
fixSidebar
:
function
()
{
//Make sure the body tag has the .fixed class
if
(
!
$
(
"
body
"
).
hasClass
(
"
fixed
"
))
{
if
(
typeof
$
.
fn
.
slimScroll
!=
'
undefined
'
)
{
$
(
"
.sidebar
"
).
slimScroll
({
destroy
:
true
}).
height
(
"
auto
"
);
},
fixSidebar
:
function
()
{
//Make sure the body tag has the .fixed class
if
(
!
$
(
"
body
"
).
hasClass
(
"
fixed
"
))
{
if
(
typeof
$
.
fn
.
slimScroll
!=
'
undefined
'
)
{
$
(
"
.sidebar
"
).
slimScroll
({
destroy
:
true
}).
height
(
"
auto
"
);
}
return
;
}
else
if
(
typeof
$
.
fn
.
slimScroll
==
'
undefined
'
&&
console
)
{
console
.
error
(
"
Error: the fixed layout requires the slimscroll plugin!
"
);
}
return
;
}
else
if
(
typeof
$
.
fn
.
slimScroll
==
'
undefined
'
&&
console
)
{
console
.
error
(
"
Error: the fixed layout requires the slimscroll plugin!
"
);
}
//Enable slimscroll for fixed layout
if
(
$
.
AdminLTE
.
options
.
sidebarSlimScroll
)
{
if
(
typeof
$
.
fn
.
slimScroll
!=
'
undefined
'
)
{
//Distroy if it exists
$
(
"
.sidebar
"
).
slimScroll
({
destroy
:
true
}).
height
(
"
auto
"
);
//Add slimscroll
$
(
"
.sidebar
"
).
slimscroll
({
height
:
(
$
(
window
).
height
()
-
$
(
"
.main-header
"
).
height
())
+
"
px
"
,
color
:
"
rgba(0,0,0,0.2)
"
,
size
:
"
3px
"
});
//Enable slimscroll for fixed layout
if
(
$
.
AdminLTE
.
options
.
sidebarSlimScroll
)
{
if
(
typeof
$
.
fn
.
slimScroll
!=
'
undefined
'
)
{
//Distroy if it exists
$
(
"
.sidebar
"
).
slimScroll
({
destroy
:
true
}).
height
(
"
auto
"
);
//Add slimscroll
$
(
"
.sidebar
"
).
slimscroll
({
height
:
(
$
(
window
).
height
()
-
$
(
"
.main-header
"
).
height
())
+
"
px
"
,
color
:
"
rgba(0,0,0,0.2)
"
,
size
:
"
3px
"
});
}
}
}
}
};
};
/* PushMenu()
* ==========
* Adds the push menu functionality to the sidebar.
*
* @type Function
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
*/
$
.
AdminLTE
.
pushMenu
=
function
(
toggleBtn
)
{
//Get the screen sizes
var
screenSizes
=
this
.
options
.
screenSizes
;
/* PushMenu()
* ==========
* Adds the push menu functionality to the sidebar.
*
* @type Function
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
*/
$
.
AdminLTE
.
pushMenu
=
function
(
toggleBtn
)
{
//Get the screen sizes
var
screenSizes
=
this
.
options
.
screenSizes
;
//Enable sidebar toggle
$
(
toggleBtn
).
click
(
function
(
e
)
{
e
.
preventDefault
();
//Enable sidebar toggle
$
(
toggleBtn
).
click
(
function
(
e
)
{
e
.
preventDefault
();
//Enable sidebar push menu
if
(
$
(
window
).
width
()
>
(
screenSizes
.
sm
-
1
))
{
$
(
"
body
"
).
toggleClass
(
'
sidebar-collapse
'
);
}
//Handle sidebar push menu for small screens
else
{
if
(
$
(
"
body
"
).
hasClass
(
'
sidebar-open
'
))
{
$
(
"
body
"
).
removeClass
(
'
sidebar-open
'
);
$
(
"
body
"
).
removeClass
(
'
sidebar-collapse
'
)
}
else
{
$
(
"
body
"
).
addClass
(
'
sidebar-open
'
);
//Enable sidebar push menu
if
(
$
(
window
).
width
()
>
(
screenSizes
.
sm
-
1
))
{
$
(
"
body
"
).
toggleClass
(
'
sidebar-collapse
'
);
}
}
});
$
(
"
.content-wrapper
"
).
click
(
function
()
{
//Enable hide menu when clicking on the content-wrapper on small screens
if
(
$
(
window
).
width
()
<=
(
screenSizes
.
sm
-
1
)
&&
$
(
"
body
"
).
hasClass
(
"
sidebar-open
"
))
{
$
(
"
body
"
).
removeClass
(
'
sidebar-open
'
);
}
});
//Handle sidebar push menu for small screens
else
{
if
(
$
(
"
body
"
).
hasClass
(
'
sidebar-open
'
))
{
$
(
"
body
"
).
removeClass
(
'
sidebar-open
'
);
$
(
"
body
"
).
removeClass
(
'
sidebar-collapse
'
)
}
else
{
$
(
"
body
"
).
addClass
(
'
sidebar-open
'
);
}
}
});
};
$
(
"
.content-wrapper
"
).
click
(
function
()
{
//Enable hide menu when clicking on the content-wrapper on small screens
if
(
$
(
window
).
width
()
<=
(
screenSizes
.
sm
-
1
)
&&
$
(
"
body
"
).
hasClass
(
"
sidebar-open
"
))
{
$
(
"
body
"
).
removeClass
(
'
sidebar-open
'
);
}
});
/* Tree()
* ======
* Converts the sidebar into a multilevel
* tree view menu.
*
* @type Function
* @Usage: $.AdminLTE.tree('.sidebar')
*/
$
.
AdminLTE
.
tree
=
function
(
menu
)
{
var
_this
=
this
;
$
(
"
li a
"
,
$
(
menu
)).
click
(
function
(
e
)
{
//Get the clicked link and the next element
var
$this
=
$
(
this
);
var
checkElement
=
$this
.
next
();
//Check if the next element is a menu and is visible
if
((
checkElement
.
is
(
'
.treeview-menu
'
))
&&
(
checkElement
.
is
(
'
:visible
'
)))
{
//Close the menu
checkElement
.
slideUp
(
'
normal
'
,
function
()
{
checkElement
.
removeClass
(
'
menu-open
'
);
//Fix the layout in case the sidebar stretches over the height of the window
//_this.layout.fix();
});
checkElement
.
parent
(
"
li
"
).
removeClass
(
"
active
"
);
}
//If the menu is not visible
else
if
((
checkElement
.
is
(
'
.treeview-menu
'
))
&&
(
!
checkElement
.
is
(
'
:visible
'
)))
{
//Get the parent menu
var
parent
=
$this
.
parents
(
'
ul
'
).
first
();
//Close all open menus within the parent
var
ul
=
parent
.
find
(
'
ul:visible
'
).
slideUp
(
'
normal
'
);
//Remove the menu-open class from the parent
ul
.
removeClass
(
'
menu-open
'
);
//Get the parent li
var
parent_li
=
$this
.
parent
(
"
li
"
);
//Open the target menu and add the menu-open class
checkElement
.
slideDown
(
'
normal
'
,
function
()
{
//Add the class active to the parent li
checkElement
.
addClass
(
'
menu-open
'
);
parent
.
find
(
'
li.active
'
).
removeClass
(
'
active
'
);
parent_li
.
addClass
(
'
active
'
);
//Fix the layout in case the sidebar stretches over the height of the window
_this
.
layout
.
fix
();
});
}
//if this isn't a link, prevent the page from being redirected
if
(
checkElement
.
is
(
'
.treeview-menu
'
))
{
e
.
preventDefault
();
}
});
};
};
/* BoxWidget
* =========
* BoxWidget is plugin to handle collapsing and
* removing boxes from the screen.
*
* @type Object
* @usage $.AdminLTE.boxWidget.activate()
* Set all of your option in the main $.AdminLTE.options object
*/
$
.
AdminLTE
.
boxWidget
=
{
activate
:
function
()
{
var
o
=
$
.
AdminLTE
.
options
;
/* Tree()
* ======
* Converts the sidebar into a multilevel
* tree view menu.
*
* @type Function
* @Usage: $.AdminLTE.tree('.sidebar')
*/
$
.
AdminLTE
.
tree
=
function
(
menu
)
{
var
_this
=
this
;
//Listen for collapse event triggers
$
(
o
.
boxWidgetOptions
.
boxWidgetSelectors
.
collapse
).
click
(
function
(
e
)
{
e
.
preventDefault
();
_this
.
collapse
(
$
(
this
));
});
//Listen for remove event triggers
$
(
o
.
boxWidgetOptions
.
boxWidgetSelectors
.
remove
).
click
(
function
(
e
)
{
e
.
preventDefault
();
_this
.
remove
(
$
(
this
));
$
(
"
li a
"
,
$
(
menu
)).
click
(
function
(
e
)
{
//Get the clicked link and the next element
var
$this
=
$
(
this
);
var
checkElement
=
$this
.
next
();
//Check if the next element is a menu and is visible
if
((
checkElement
.
is
(
'
.treeview-menu
'
))
&&
(
checkElement
.
is
(
'
:visible
'
)))
{
//Close the menu
checkElement
.
slideUp
(
'
normal
'
,
function
()
{
checkElement
.
removeClass
(
'
menu-open
'
);
//Fix the layout in case the sidebar stretches over the height of the window
//_this.layout.fix();
});
checkElement
.
parent
(
"
li
"
).
removeClass
(
"
active
"
);
}
//If the menu is not visible
else
if
((
checkElement
.
is
(
'
.treeview-menu
'
))
&&
(
!
checkElement
.
is
(
'
:visible
'
)))
{
//Get the parent menu
var
parent
=
$this
.
parents
(
'
ul
'
).
first
();
//Close all open menus within the parent
var
ul
=
parent
.
find
(
'
ul:visible
'
).
slideUp
(
'
normal
'
);
//Remove the menu-open class from the parent
ul
.
removeClass
(
'
menu-open
'
);
//Get the parent li
var
parent_li
=
$this
.
parent
(
"
li
"
);
//Open the target menu and add the menu-open class
checkElement
.
slideDown
(
'
normal
'
,
function
()
{
//Add the class active to the parent li
checkElement
.
addClass
(
'
menu-open
'
);
parent
.
find
(
'
li.active
'
).
removeClass
(
'
active
'
);
parent_li
.
addClass
(
'
active
'
);
//Fix the layout in case the sidebar stretches over the height of the window
_this
.
layout
.
fix
();
});
}
//if this isn't a link, prevent the page from being redirected
if
(
checkElement
.
is
(
'
.treeview-menu
'
))
{
e
.
preventDefault
();
}
});
},
collapse
:
function
(
element
)
{
//Find the box parent
var
box
=
element
.
parents
(
"
.box
"
).
first
();
//Find the body and the footer
var
bf
=
box
.
find
(
"
.box-body, .box-footer
"
);
if
(
!
box
.
hasClass
(
"
collapsed-box
"
))
{
//Convert minus into plus
element
.
children
(
"
.fa-minus
"
).
removeClass
(
"
fa-minus
"
).
addClass
(
"
fa-plus
"
);
bf
.
slideUp
(
300
,
function
()
{
box
.
addClass
(
"
collapsed-box
"
);
};
/* BoxWidget
* =========
* BoxWidget is plugin to handle collapsing and
* removing boxes from the screen.
*
* @type Object
* @usage $.AdminLTE.boxWidget.activate()
* Set all of your option in the main $.AdminLTE.options object
*/
$
.
AdminLTE
.
boxWidget
=
{
activate
:
function
()
{
var
o
=
$
.
AdminLTE
.
options
;
var
_this
=
this
;
//Listen for collapse event triggers
$
(
o
.
boxWidgetOptions
.
boxWidgetSelectors
.
collapse
).
click
(
function
(
e
)
{
e
.
preventDefault
();
_this
.
collapse
(
$
(
this
));
});
}
else
{
//
Convert plus into minu
s
element
.
children
(
"
.fa-plus
"
).
removeClass
(
"
fa-plus
"
).
addClass
(
"
fa-minus
"
);
bf
.
slideDown
(
300
,
function
()
{
box
.
removeClass
(
"
collapsed-box
"
);
//
Listen for remove event trigger
s
$
(
o
.
boxWidgetOptions
.
boxWidgetSelectors
.
remove
).
click
(
function
(
e
)
{
e
.
preventDefault
();
_this
.
remove
(
$
(
this
)
);
});
}
},
remove
:
function
(
element
)
{
//Find the box parent
var
box
=
element
.
parents
(
"
.box
"
).
first
();
box
.
slideUp
();
},
options
:
$
.
AdminLTE
.
options
.
boxWidgetOptions
};
},
collapse
:
function
(
element
)
{
//Find the box parent
var
box
=
element
.
parents
(
"
.box
"
).
first
();
//Find the body and the footer
var
bf
=
box
.
find
(
"
.box-body, .box-footer
"
);
if
(
!
box
.
hasClass
(
"
collapsed-box
"
))
{
//Convert minus into plus
element
.
children
(
"
.fa-minus
"
).
removeClass
(
"
fa-minus
"
).
addClass
(
"
fa-plus
"
);
bf
.
slideUp
(
300
,
function
()
{
box
.
addClass
(
"
collapsed-box
"
);
});
}
else
{
//Convert plus into minus
element
.
children
(
"
.fa-plus
"
).
removeClass
(
"
fa-plus
"
).
addClass
(
"
fa-minus
"
);
bf
.
slideDown
(
300
,
function
()
{
box
.
removeClass
(
"
collapsed-box
"
);
});
}
},
remove
:
function
(
element
)
{
//Find the box parent
var
box
=
element
.
parents
(
"
.box
"
).
first
();
box
.
slideUp
();
},
options
:
$
.
AdminLTE
.
options
.
boxWidgetOptions
};
}
/* ------------------
* - Custom Plugins -
...
...
dist/js/app.min.js
浏览文件 @
3810f026
...
...
@@ -10,4 +10,4 @@
* @version 2.0.4
* @license MIT <http://opensource.org/licenses/MIT>
*/
"
use strict
"
;
if
(
"
undefined
"
==
typeof
jQuery
)
throw
new
Error
(
"
AdminLTE requires jQuery
"
);
$
.
AdminLTE
=
{},
$
.
AdminLTE
.
options
=
{
navbarMenuSlimscroll
:
!
0
,
navbarMenuSlimscrollWidth
:
"
3px
"
,
navbarMenuHeight
:
"
200px
"
,
sidebarToggleSelector
:
"
[data-toggle='offcanvas']
"
,
sidebarPushMenu
:
!
0
,
sidebarSlimScroll
:
!
0
,
enableBoxRefresh
:
!
0
,
enableBSToppltip
:
!
0
,
BSTooltipSelector
:
"
[data-toggle='tooltip']
"
,
enableFastclick
:
!
0
,
enableBoxWidget
:
!
0
,
boxWidgetOptions
:{
boxWidgetIcons
:{
collapse
:
"
fa fa-minus
"
,
open
:
"
fa fa-plus
"
,
remove
:
"
fa fa-times
"
},
boxWidgetSelectors
:{
remove
:
'
[data-widget="remove"]
'
,
collapse
:
'
[data-widget="collapse"]
'
}},
directChat
:{
enable
:
!
0
,
contactToggleSelector
:
'
[data-widget="chat-pane-toggle"]
'
},
colors
:{
lightBlue
:
"
#3c8dbc
"
,
red
:
"
#f56954
"
,
green
:
"
#00a65a
"
,
aqua
:
"
#00c0ef
"
,
yellow
:
"
#f39c12
"
,
blue
:
"
#0073b7
"
,
navy
:
"
#001F3F
"
,
teal
:
"
#39CCCC
"
,
olive
:
"
#3D9970
"
,
lime
:
"
#01FF70
"
,
orange
:
"
#FF851B
"
,
fuchsia
:
"
#F012BE
"
,
purple
:
"
#8E24AA
"
,
maroon
:
"
#D81B60
"
,
black
:
"
#222222
"
,
gray
:
"
#d2d6de
"
},
screenSizes
:{
xs
:
480
,
sm
:
768
,
md
:
992
,
lg
:
1200
}},
$
(
function
(){
var
a
=
$
.
AdminLTE
.
options
;
$
.
AdminLTE
.
layout
.
activate
(),
$
.
AdminLTE
.
tree
(
"
.sidebar
"
),
a
.
navbarMenuSlimscroll
&&
"
undefined
"
!=
typeof
$
.
fn
.
slimscroll
&&
$
(
"
.navbar .menu
"
).
slimscroll
({
height
:
"
200px
"
,
alwaysVisible
:
!
1
,
size
:
"
3px
"
}).
css
(
"
width
"
,
"
100%
"
),
a
.
sidebarPushMenu
&&
$
.
AdminLTE
.
pushMenu
(
a
.
sidebarToggleSelector
),
a
.
enableBSToppltip
&&
$
(
a
.
BSTooltipSelector
).
tooltip
(),
a
.
enableBoxWidget
&&
$
.
AdminLTE
.
boxWidget
.
activate
(),
a
.
enableFastclick
&&
"
undefined
"
!=
typeof
FastClick
&&
FastClick
.
attach
(
document
.
body
),
a
.
directChat
.
enable
&&
$
(
a
.
directChat
.
contactToggleSelector
).
click
(
function
(){
var
a
=
$
(
this
).
parents
(
"
.direct-chat
"
).
first
();
a
.
toggleClass
(
"
direct-chat-contacts-open
"
)}),
$
(
'
.btn-group[data-toggle="btn-toggle"]
'
).
each
(
function
(){
var
a
=
$
(
this
);
$
(
this
).
find
(
"
.btn
"
).
click
(
function
(
b
){
a
.
find
(
"
.btn.active
"
).
removeClass
(
"
active
"
),
$
(
this
).
addClass
(
"
active
"
),
b
.
preventDefault
()})})}),
$
.
AdminLTE
.
layout
=
{
activate
:
function
(){
var
a
=
this
;
a
.
fix
(),
a
.
fixSidebar
(),
$
(
window
,
"
.wrapper
"
).
resize
(
function
(){
a
.
fix
(),
a
.
fixSidebar
()})},
fix
:
function
(){
var
a
=
$
(
"
.main-header
"
).
outerHeight
()
+
$
(
"
.main-footer
"
).
outerHeight
(),
b
=
$
(
window
).
height
(),
c
=
$
(
"
.sidebar
"
).
height
();
$
(
"
body
"
).
hasClass
(
"
fixed
"
)?
$
(
"
.content-wrapper, .right-side
"
).
css
(
"
min-height
"
,
b
-
$
(
"
.main-footer
"
).
outerHeight
()):
b
>=
c
?
$
(
"
.content-wrapper, .right-side
"
).
css
(
"
min-height
"
,
b
-
a
):
$
(
"
.content-wrapper, .right-side
"
).
css
(
"
min-height
"
,
c
)},
fixSidebar
:
function
(){
return
$
(
"
body
"
).
hasClass
(
"
fixed
"
)?(
"
undefined
"
==
typeof
$
.
fn
.
slimScroll
&&
console
&&
console
.
error
(
"
Error: the fixed layout requires the slimscroll plugin!
"
),
void
(
$
.
AdminLTE
.
options
.
sidebarSlimScroll
&&
"
undefined
"
!=
typeof
$
.
fn
.
slimScroll
&&
(
$
(
"
.sidebar
"
).
slimScroll
({
destroy
:
!
0
}).
height
(
"
auto
"
),
$
(
"
.sidebar
"
).
slimscroll
({
height
:
$
(
window
).
height
()
-
$
(
"
.main-header
"
).
height
()
+
"
px
"
,
color
:
"
rgba(0,0,0,0.2)
"
,
size
:
"
3px
"
})))):
void
(
"
undefined
"
!=
typeof
$
.
fn
.
slimScroll
&&
$
(
"
.sidebar
"
).
slimScroll
({
destroy
:
!
0
}).
height
(
"
auto
"
))}},
$
.
AdminLTE
.
pushMenu
=
function
(
a
){
var
b
=
this
.
options
.
screenSizes
;
$
(
a
).
click
(
function
(
a
){
a
.
preventDefault
(),
$
(
window
).
width
()
>
b
.
sm
-
1
?
$
(
"
body
"
).
toggleClass
(
"
sidebar-collapse
"
):
$
(
"
body
"
).
hasClass
(
"
sidebar-open
"
)?(
$
(
"
body
"
).
removeClass
(
"
sidebar-open
"
),
$
(
"
body
"
).
removeClass
(
"
sidebar-collapse
"
)):
$
(
"
body
"
).
addClass
(
"
sidebar-open
"
)}),
$
(
"
.content-wrapper
"
).
click
(
function
(){
$
(
window
).
width
()
<=
b
.
sm
-
1
&&
$
(
"
body
"
).
hasClass
(
"
sidebar-open
"
)
&&
$
(
"
body
"
).
removeClass
(
"
sidebar-open
"
)})},
$
.
AdminLTE
.
tree
=
function
(
a
){
var
b
=
this
;
$
(
"
li a
"
,
$
(
a
)).
click
(
function
(
a
){
var
c
=
$
(
this
),
d
=
c
.
next
();
if
(
d
.
is
(
"
.treeview-menu
"
)
&&
d
.
is
(
"
:visible
"
))
d
.
slideUp
(
"
normal
"
,
function
(){
d
.
removeClass
(
"
menu-open
"
)}),
d
.
parent
(
"
li
"
).
removeClass
(
"
active
"
);
else
if
(
d
.
is
(
"
.treeview-menu
"
)
&&!
d
.
is
(
"
:visible
"
)){
var
e
=
c
.
parents
(
"
ul
"
).
first
(),
f
=
e
.
find
(
"
ul:visible
"
).
slideUp
(
"
normal
"
);
f
.
removeClass
(
"
menu-open
"
);
var
g
=
c
.
parent
(
"
li
"
);
d
.
slideDown
(
"
normal
"
,
function
(){
d
.
addClass
(
"
menu-open
"
),
e
.
find
(
"
li.active
"
).
removeClass
(
"
active
"
),
g
.
addClass
(
"
active
"
),
b
.
layout
.
fix
()})}
d
.
is
(
"
.treeview-menu
"
)
&&
a
.
preventDefault
()})},
$
.
AdminLTE
.
boxWidget
=
{
activate
:
function
(){
var
a
=
$
.
AdminLTE
.
options
,
b
=
this
;
$
(
a
.
boxWidgetOptions
.
boxWidgetSelectors
.
collapse
).
click
(
function
(
a
){
a
.
preventDefault
(),
b
.
collapse
(
$
(
this
))}),
$
(
a
.
boxWidgetOptions
.
boxWidgetSelectors
.
remove
).
click
(
function
(
a
){
a
.
preventDefault
(),
b
.
remove
(
$
(
this
))})},
collapse
:
function
(
a
){
var
b
=
a
.
parents
(
"
.box
"
).
first
(),
c
=
b
.
find
(
"
.box-body, .box-footer
"
);
b
.
hasClass
(
"
collapsed-box
"
)?(
a
.
children
(
"
.fa-plus
"
).
removeClass
(
"
fa-plus
"
).
addClass
(
"
fa-minus
"
),
c
.
slideDown
(
300
,
function
(){
b
.
removeClass
(
"
collapsed-box
"
)})):(
a
.
children
(
"
.fa-minus
"
).
removeClass
(
"
fa-minus
"
).
addClass
(
"
fa-plus
"
),
c
.
slideUp
(
300
,
function
(){
b
.
addClass
(
"
collapsed-box
"
)}))},
remove
:
function
(
a
){
var
b
=
a
.
parents
(
"
.box
"
).
first
();
b
.
slideUp
()},
options
:
$
.
AdminLTE
.
options
.
boxWidgetOptions
},
function
(
a
){
a
.
fn
.
boxRefresh
=
function
(
b
){
function
c
(
a
){
a
.
append
(
f
),
e
.
onLoadStart
.
call
(
a
)}
function
d
(
a
){
a
.
find
(
f
).
remove
(),
e
.
onLoadDone
.
call
(
a
)}
var
e
=
a
.
extend
({
trigger
:
"
.refresh-btn
"
,
source
:
""
,
onLoadStart
:
function
(){},
onLoadDone
:
function
(){}},
b
),
f
=
a
(
'
<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>
'
);
return
this
.
each
(
function
(){
if
(
""
===
e
.
source
)
return
void
(
console
&&
console
.
log
(
"
Please specify a source first - boxRefresh()
"
));
var
b
=
a
(
this
),
f
=
b
.
find
(
e
.
trigger
).
first
();
f
.
click
(
function
(
a
){
a
.
preventDefault
(),
c
(
b
),
b
.
find
(
"
.box-body
"
).
load
(
e
.
source
,
function
(){
d
(
b
)})})})}}(
jQuery
),
function
(
a
){
a
.
fn
.
todolist
=
function
(
b
){
var
c
=
a
.
extend
({
onCheck
:
function
(){},
onUncheck
:
function
(){}},
b
);
return
this
.
each
(
function
(){
"
undefined
"
!=
typeof
a
.
fn
.
iCheck
?(
a
(
"
input
"
,
this
).
on
(
"
ifChecked
"
,
function
(){
var
b
=
a
(
this
).
parents
(
"
li
"
).
first
();
b
.
toggleClass
(
"
done
"
),
c
.
onCheck
.
call
(
b
)}),
a
(
"
input
"
,
this
).
on
(
"
ifUnchecked
"
,
function
(){
var
b
=
a
(
this
).
parents
(
"
li
"
).
first
();
b
.
toggleClass
(
"
done
"
),
c
.
onUncheck
.
call
(
b
)})):
a
(
"
input
"
,
this
).
on
(
"
change
"
,
function
(){
var
b
=
a
(
this
).
parents
(
"
li
"
).
first
();
b
.
toggleClass
(
"
done
"
),
c
.
onCheck
.
call
(
b
)})})}}(
jQuery
);
\ No newline at end of file
"
use strict
"
;
function
_init
(){
$
.
AdminLTE
.
layout
=
{
activate
:
function
(){
var
a
=
this
;
a
.
fix
(),
a
.
fixSidebar
(),
$
(
window
,
"
.wrapper
"
).
resize
(
function
(){
a
.
fix
(),
a
.
fixSidebar
()})},
fix
:
function
(){
var
a
=
$
(
"
.main-header
"
).
outerHeight
()
+
$
(
"
.main-footer
"
).
outerHeight
(),
b
=
$
(
window
).
height
(),
c
=
$
(
"
.sidebar
"
).
height
();
$
(
"
body
"
).
hasClass
(
"
fixed
"
)?
$
(
"
.content-wrapper, .right-side
"
).
css
(
"
min-height
"
,
b
-
$
(
"
.main-footer
"
).
outerHeight
()):
b
>=
c
?
$
(
"
.content-wrapper, .right-side
"
).
css
(
"
min-height
"
,
b
-
a
):
$
(
"
.content-wrapper, .right-side
"
).
css
(
"
min-height
"
,
c
)},
fixSidebar
:
function
(){
return
$
(
"
body
"
).
hasClass
(
"
fixed
"
)?(
"
undefined
"
==
typeof
$
.
fn
.
slimScroll
&&
console
&&
console
.
error
(
"
Error: the fixed layout requires the slimscroll plugin!
"
),
void
(
$
.
AdminLTE
.
options
.
sidebarSlimScroll
&&
"
undefined
"
!=
typeof
$
.
fn
.
slimScroll
&&
(
$
(
"
.sidebar
"
).
slimScroll
({
destroy
:
!
0
}).
height
(
"
auto
"
),
$
(
"
.sidebar
"
).
slimscroll
({
height
:
$
(
window
).
height
()
-
$
(
"
.main-header
"
).
height
()
+
"
px
"
,
color
:
"
rgba(0,0,0,0.2)
"
,
size
:
"
3px
"
})))):
void
(
"
undefined
"
!=
typeof
$
.
fn
.
slimScroll
&&
$
(
"
.sidebar
"
).
slimScroll
({
destroy
:
!
0
}).
height
(
"
auto
"
))}},
$
.
AdminLTE
.
pushMenu
=
function
(
a
){
var
b
=
this
.
options
.
screenSizes
;
$
(
a
).
click
(
function
(
a
){
a
.
preventDefault
(),
$
(
window
).
width
()
>
b
.
sm
-
1
?
$
(
"
body
"
).
toggleClass
(
"
sidebar-collapse
"
):
$
(
"
body
"
).
hasClass
(
"
sidebar-open
"
)?(
$
(
"
body
"
).
removeClass
(
"
sidebar-open
"
),
$
(
"
body
"
).
removeClass
(
"
sidebar-collapse
"
)):
$
(
"
body
"
).
addClass
(
"
sidebar-open
"
)}),
$
(
"
.content-wrapper
"
).
click
(
function
(){
$
(
window
).
width
()
<=
b
.
sm
-
1
&&
$
(
"
body
"
).
hasClass
(
"
sidebar-open
"
)
&&
$
(
"
body
"
).
removeClass
(
"
sidebar-open
"
)})},
$
.
AdminLTE
.
tree
=
function
(
a
){
var
b
=
this
;
$
(
"
li a
"
,
$
(
a
)).
click
(
function
(
a
){
var
c
=
$
(
this
),
d
=
c
.
next
();
if
(
d
.
is
(
"
.treeview-menu
"
)
&&
d
.
is
(
"
:visible
"
))
d
.
slideUp
(
"
normal
"
,
function
(){
d
.
removeClass
(
"
menu-open
"
)}),
d
.
parent
(
"
li
"
).
removeClass
(
"
active
"
);
else
if
(
d
.
is
(
"
.treeview-menu
"
)
&&!
d
.
is
(
"
:visible
"
)){
var
e
=
c
.
parents
(
"
ul
"
).
first
(),
f
=
e
.
find
(
"
ul:visible
"
).
slideUp
(
"
normal
"
);
f
.
removeClass
(
"
menu-open
"
);
var
g
=
c
.
parent
(
"
li
"
);
d
.
slideDown
(
"
normal
"
,
function
(){
d
.
addClass
(
"
menu-open
"
),
e
.
find
(
"
li.active
"
).
removeClass
(
"
active
"
),
g
.
addClass
(
"
active
"
),
b
.
layout
.
fix
()})}
d
.
is
(
"
.treeview-menu
"
)
&&
a
.
preventDefault
()})},
$
.
AdminLTE
.
boxWidget
=
{
activate
:
function
(){
var
a
=
$
.
AdminLTE
.
options
,
b
=
this
;
$
(
a
.
boxWidgetOptions
.
boxWidgetSelectors
.
collapse
).
click
(
function
(
a
){
a
.
preventDefault
(),
b
.
collapse
(
$
(
this
))}),
$
(
a
.
boxWidgetOptions
.
boxWidgetSelectors
.
remove
).
click
(
function
(
a
){
a
.
preventDefault
(),
b
.
remove
(
$
(
this
))})},
collapse
:
function
(
a
){
var
b
=
a
.
parents
(
"
.box
"
).
first
(),
c
=
b
.
find
(
"
.box-body, .box-footer
"
);
b
.
hasClass
(
"
collapsed-box
"
)?(
a
.
children
(
"
.fa-plus
"
).
removeClass
(
"
fa-plus
"
).
addClass
(
"
fa-minus
"
),
c
.
slideDown
(
300
,
function
(){
b
.
removeClass
(
"
collapsed-box
"
)})):(
a
.
children
(
"
.fa-minus
"
).
removeClass
(
"
fa-minus
"
).
addClass
(
"
fa-plus
"
),
c
.
slideUp
(
300
,
function
(){
b
.
addClass
(
"
collapsed-box
"
)}))},
remove
:
function
(
a
){
var
b
=
a
.
parents
(
"
.box
"
).
first
();
b
.
slideUp
()},
options
:
$
.
AdminLTE
.
options
.
boxWidgetOptions
}}
if
(
"
undefined
"
==
typeof
jQuery
)
throw
new
Error
(
"
AdminLTE requires jQuery
"
);
$
.
AdminLTE
=
{},
$
.
AdminLTE
.
options
=
{
navbarMenuSlimscroll
:
!
0
,
navbarMenuSlimscrollWidth
:
"
3px
"
,
navbarMenuHeight
:
"
200px
"
,
sidebarToggleSelector
:
"
[data-toggle='offcanvas']
"
,
sidebarPushMenu
:
!
0
,
sidebarSlimScroll
:
!
0
,
enableBoxRefresh
:
!
0
,
enableBSToppltip
:
!
0
,
BSTooltipSelector
:
"
[data-toggle='tooltip']
"
,
enableFastclick
:
!
0
,
enableBoxWidget
:
!
0
,
boxWidgetOptions
:{
boxWidgetIcons
:{
collapse
:
"
fa fa-minus
"
,
open
:
"
fa fa-plus
"
,
remove
:
"
fa fa-times
"
},
boxWidgetSelectors
:{
remove
:
'
[data-widget="remove"]
'
,
collapse
:
'
[data-widget="collapse"]
'
}},
directChat
:{
enable
:
!
0
,
contactToggleSelector
:
'
[data-widget="chat-pane-toggle"]
'
},
colors
:{
lightBlue
:
"
#3c8dbc
"
,
red
:
"
#f56954
"
,
green
:
"
#00a65a
"
,
aqua
:
"
#00c0ef
"
,
yellow
:
"
#f39c12
"
,
blue
:
"
#0073b7
"
,
navy
:
"
#001F3F
"
,
teal
:
"
#39CCCC
"
,
olive
:
"
#3D9970
"
,
lime
:
"
#01FF70
"
,
orange
:
"
#FF851B
"
,
fuchsia
:
"
#F012BE
"
,
purple
:
"
#8E24AA
"
,
maroon
:
"
#D81B60
"
,
black
:
"
#222222
"
,
gray
:
"
#d2d6de
"
},
screenSizes
:{
xs
:
480
,
sm
:
768
,
md
:
992
,
lg
:
1200
}},
$
(
function
(){
var
a
=
$
.
AdminLTE
.
options
;
_init
(),
$
.
AdminLTE
.
layout
.
activate
(),
$
.
AdminLTE
.
tree
(
"
.sidebar
"
),
a
.
navbarMenuSlimscroll
&&
"
undefined
"
!=
typeof
$
.
fn
.
slimscroll
&&
$
(
"
.navbar .menu
"
).
slimscroll
({
height
:
"
200px
"
,
alwaysVisible
:
!
1
,
size
:
"
3px
"
}).
css
(
"
width
"
,
"
100%
"
),
a
.
sidebarPushMenu
&&
$
.
AdminLTE
.
pushMenu
(
a
.
sidebarToggleSelector
),
a
.
enableBSToppltip
&&
$
(
a
.
BSTooltipSelector
).
tooltip
(),
a
.
enableBoxWidget
&&
$
.
AdminLTE
.
boxWidget
.
activate
(),
a
.
enableFastclick
&&
"
undefined
"
!=
typeof
FastClick
&&
FastClick
.
attach
(
document
.
body
),
a
.
directChat
.
enable
&&
$
(
a
.
directChat
.
contactToggleSelector
).
click
(
function
(){
var
a
=
$
(
this
).
parents
(
"
.direct-chat
"
).
first
();
a
.
toggleClass
(
"
direct-chat-contacts-open
"
)}),
$
(
'
.btn-group[data-toggle="btn-toggle"]
'
).
each
(
function
(){
var
a
=
$
(
this
);
$
(
this
).
find
(
"
.btn
"
).
click
(
function
(
b
){
a
.
find
(
"
.btn.active
"
).
removeClass
(
"
active
"
),
$
(
this
).
addClass
(
"
active
"
),
b
.
preventDefault
()})})}),
function
(
a
){
a
.
fn
.
boxRefresh
=
function
(
b
){
function
c
(
a
){
a
.
append
(
f
),
e
.
onLoadStart
.
call
(
a
)}
function
d
(
a
){
a
.
find
(
f
).
remove
(),
e
.
onLoadDone
.
call
(
a
)}
var
e
=
a
.
extend
({
trigger
:
"
.refresh-btn
"
,
source
:
""
,
onLoadStart
:
function
(){},
onLoadDone
:
function
(){}},
b
),
f
=
a
(
'
<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>
'
);
return
this
.
each
(
function
(){
if
(
""
===
e
.
source
)
return
void
(
console
&&
console
.
log
(
"
Please specify a source first - boxRefresh()
"
));
var
b
=
a
(
this
),
f
=
b
.
find
(
e
.
trigger
).
first
();
f
.
click
(
function
(
a
){
a
.
preventDefault
(),
c
(
b
),
b
.
find
(
"
.box-body
"
).
load
(
e
.
source
,
function
(){
d
(
b
)})})})}}(
jQuery
),
function
(
a
){
a
.
fn
.
todolist
=
function
(
b
){
var
c
=
a
.
extend
({
onCheck
:
function
(){},
onUncheck
:
function
(){}},
b
);
return
this
.
each
(
function
(){
"
undefined
"
!=
typeof
a
.
fn
.
iCheck
?(
a
(
"
input
"
,
this
).
on
(
"
ifChecked
"
,
function
(){
var
b
=
a
(
this
).
parents
(
"
li
"
).
first
();
b
.
toggleClass
(
"
done
"
),
c
.
onCheck
.
call
(
b
)}),
a
(
"
input
"
,
this
).
on
(
"
ifUnchecked
"
,
function
(){
var
b
=
a
(
this
).
parents
(
"
li
"
).
first
();
b
.
toggleClass
(
"
done
"
),
c
.
onUncheck
.
call
(
b
)})):
a
(
"
input
"
,
this
).
on
(
"
change
"
,
function
(){
var
b
=
a
(
this
).
parents
(
"
li
"
).
first
();
b
.
toggleClass
(
"
done
"
),
c
.
onCheck
.
call
(
b
)})})}}(
jQuery
);
\ No newline at end of file
documentation/style.css
浏览文件 @
3810f026
...
...
@@ -6,6 +6,10 @@
font-size
:
16px
;
}
.content
{
z-index
:
500
;
}
#components
>
h3
{
font-size
:
25px
;
color
:
#000
;
...
...
@@ -20,7 +24,7 @@ ul {
}
.page-header
{
/*border-bottom: 1px solid #ddd; */
margin
:
20px
0
20px
0
;
margin
:
20px
0
10px
0
!important
;
position
:
relative
;
z-index
:
1
;
font-size
:
30px
;
...
...
@@ -46,6 +50,7 @@ ul {
margin-top
:
-60px
;
height
:
60px
;
visibility
:
hidden
;
z-index
:
-10
;
}
.lead
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录