adminlte2-rails 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/adminlte2/rails/version.rb +1 -1
- data/lib/generators/admin_lte2/templates/_admin_lte_2_header.html.erb +9 -1
- data/lib/generators/admin_lte2/templates/_admin_lte_2_sidebar.html.erb +7 -7
- data/lib/generators/admin_lte2/templates/admin_lte_2.html.erb +65 -4
- data/vendor/assets/javascripts/app.js +472 -267
- data/vendor/assets/stylesheets/AdminLTE/AdminLTE.css +457 -410
- data/vendor/assets/stylesheets/AdminLTE/skins/_all-skins.css +1057 -146
- data/vendor/assets/stylesheets/AdminLTE/skins/_all-skins.min.css +1 -1
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-black-light.css +175 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-black-light.min.css +1 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-black.css +27 -39
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-black.min.css +1 -1
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-blue-light.css +166 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-blue-light.min.css +1 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-blue.css +11 -21
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-blue.min.css +1 -1
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-green-light.css +155 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-green-light.min.css +1 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-green.css +10 -17
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-green.min.css +1 -1
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-purple-light.css +155 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-purple-light.min.css +1 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-purple.css +10 -17
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-purple.min.css +1 -1
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-red-light.css +155 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-red-light.min.css +1 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-red.css +10 -17
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-red.min.css +1 -1
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-yellow-light.css +155 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-yellow-light.min.css +1 -0
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-yellow.css +10 -17
- data/vendor/assets/stylesheets/AdminLTE/skins/skin-yellow.min.css +1 -1
- metadata +13 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c572cbc8c12791d3fc726536f67ad3c1507d0f77
|
4
|
+
data.tar.gz: d965133c397d915618115b5b843d55411305eb90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 521396842262051e20941be07e7ce87e5f6ea14c2d020368a46183add93adc8ec36acf6fc0ab5a73def3cc812297be474e054228f8a3a82e0b4663a7fe35fab8
|
7
|
+
data.tar.gz: f70bfb63e519a53c90e4c2edae10902c278b8413fbdadc7b2748cf8aeded5c601de2894b9653636f511242ea31d0f9dab6fb103d22c875360c8428fe63c944a5
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,12 @@
|
|
2
2
|
<header class="main-header">
|
3
3
|
|
4
4
|
<!-- Logo -->
|
5
|
-
<a href="/" class="logo"
|
5
|
+
<a href="/" class="logo">
|
6
|
+
<!-- mini logo for sidebar mini 50x50 pixels -->
|
7
|
+
<span class="logo-mini"><b>A</b>LT</span>
|
8
|
+
<!-- logo for regular state and mobile devices -->
|
9
|
+
<span class="logo-lg"><b>Admin</b>LTE</span>
|
10
|
+
</a>
|
6
11
|
|
7
12
|
<!-- Header Navbar -->
|
8
13
|
<nav class="navbar navbar-static-top" role="navigation">
|
@@ -144,6 +149,9 @@
|
|
144
149
|
</li>
|
145
150
|
</ul>
|
146
151
|
</li>
|
152
|
+
<li>
|
153
|
+
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
|
154
|
+
</li>
|
147
155
|
</ul>
|
148
156
|
</div>
|
149
157
|
</nav>
|
@@ -20,9 +20,9 @@
|
|
20
20
|
<form action="#" method="get" class="sidebar-form">
|
21
21
|
<div class="input-group">
|
22
22
|
<input type="text" name="q" class="form-control" placeholder="Search..."/>
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
<span class="input-group-btn">
|
24
|
+
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
|
25
|
+
</span>
|
26
26
|
</div>
|
27
27
|
</form>
|
28
28
|
<!-- /.search form -->
|
@@ -30,11 +30,11 @@
|
|
30
30
|
<!-- Sidebar Menu -->
|
31
31
|
<ul class="sidebar-menu">
|
32
32
|
<li class="header">HEADER</li>
|
33
|
-
|
34
|
-
<li class="active"><a href="#"><span>Link</span></a
|
35
|
-
<li><a href="#"><span>Another Link</span></a></li>
|
33
|
+
<!-- Optionally, you can add icons to the links -->
|
34
|
+
<li class="active"><a href="#"><i class='fa fa-link'></i> <span>Link</span></a></li>
|
35
|
+
<li><a href="#"><i class='fa fa-link'></i> <span>Another Link</span></a></li>
|
36
36
|
<li class="treeview">
|
37
|
-
<a href="#"><span>Multilevel</span> <i class="fa fa-angle-left pull-right"></i></a>
|
37
|
+
<a href="#"><i class='fa fa-link'></i> <span>Multilevel</span> <i class="fa fa-angle-left pull-right"></i></a>
|
38
38
|
<ul class="treeview-menu">
|
39
39
|
<li><a href="#">Link in level 2</a></li>
|
40
40
|
<li><a href="#">Link in level 2</a></li>
|
@@ -5,18 +5,18 @@
|
|
5
5
|
<title>AdminLTE 2 | Dashboard</title>
|
6
6
|
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
7
7
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
8
|
-
<link href="
|
8
|
+
<link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
|
9
9
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
10
10
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
11
11
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
12
12
|
<!--[if lt IE 9]>
|
13
|
-
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.
|
14
|
-
<script src="https://oss.maxcdn.com/libs/respond.js/1.
|
13
|
+
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.js"></script>
|
14
|
+
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
15
15
|
<![endif]-->
|
16
16
|
<%= csrf_meta_tags %>
|
17
17
|
</head>
|
18
18
|
|
19
|
-
<body class="skin-blue fixed <%= params[:controller].parameterize %> <%= action_name %>">
|
19
|
+
<body class="skin-blue sidebar-mini fixed <%= params[:controller].parameterize %> <%= action_name %>">
|
20
20
|
<div class="wrapper">
|
21
21
|
|
22
22
|
<%= render partial: 'layouts/admin_lte_2_header' %>
|
@@ -68,6 +68,67 @@
|
|
68
68
|
<strong>Copyright © 2015 <a href="#">Company</a>.</strong> All rights reserved.
|
69
69
|
</footer>
|
70
70
|
|
71
|
+
<aside class="control-sidebar control-sidebar-dark">
|
72
|
+
<!-- Create the tabs -->
|
73
|
+
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
|
74
|
+
<li class="active"><a href="#control-sidebar-home-tab" data-toggle="tab" aria-expanded="true"><i class="fa fa-home"></i></a></li>
|
75
|
+
<li class=""><a href="#control-sidebar-settings-tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-gears"></i></a></li>
|
76
|
+
</ul>
|
77
|
+
<!-- Tab panes -->
|
78
|
+
<div class="tab-content">
|
79
|
+
<!-- Home tab content -->
|
80
|
+
<div class="tab-pane active" id="control-sidebar-home-tab">
|
81
|
+
<h3 class="control-sidebar-heading">Recent Activity</h3>
|
82
|
+
<ul class="control-sidebar-menu">
|
83
|
+
<li>
|
84
|
+
<a href="javascript::;">
|
85
|
+
<i class="menu-icon fa fa-birthday-cake bg-red"></i>
|
86
|
+
<div class="menu-info">
|
87
|
+
<h4 class="control-sidebar-subheading">Langdon's Birthday</h4>
|
88
|
+
<p>Will be 23 on April 24th</p>
|
89
|
+
</div>
|
90
|
+
</a>
|
91
|
+
</li>
|
92
|
+
</ul><!-- /.control-sidebar-menu -->
|
93
|
+
|
94
|
+
<h3 class="control-sidebar-heading">Tasks Progress</h3>
|
95
|
+
<ul class="control-sidebar-menu">
|
96
|
+
<li>
|
97
|
+
<a href="javascript::;">
|
98
|
+
<h4 class="control-sidebar-subheading">
|
99
|
+
Custom Template Design
|
100
|
+
<span class="label label-danger pull-right">70%</span>
|
101
|
+
</h4>
|
102
|
+
<div class="progress progress-xxs">
|
103
|
+
<div class="progress-bar progress-bar-danger" style="width: 70%"></div>
|
104
|
+
</div>
|
105
|
+
</a>
|
106
|
+
</li>
|
107
|
+
</ul><!-- /.control-sidebar-menu -->
|
108
|
+
|
109
|
+
</div><!-- /.tab-pane -->
|
110
|
+
<!-- Stats tab content -->
|
111
|
+
<div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div><!-- /.tab-pane -->
|
112
|
+
<!-- Settings tab content -->
|
113
|
+
<div class="tab-pane" id="control-sidebar-settings-tab">
|
114
|
+
<form method="post">
|
115
|
+
<h3 class="control-sidebar-heading">General Settings</h3>
|
116
|
+
<div class="form-group">
|
117
|
+
<label class="control-sidebar-subheading">
|
118
|
+
Report panel usage
|
119
|
+
<input type="checkbox" class="pull-right" checked="">
|
120
|
+
</label>
|
121
|
+
<p>
|
122
|
+
Some information about this general settings option
|
123
|
+
</p>
|
124
|
+
</div><!-- /.form-group -->
|
125
|
+
</form>
|
126
|
+
</div><!-- /.tab-pane -->
|
127
|
+
</div>
|
128
|
+
</aside>
|
129
|
+
|
130
|
+
<div class="control-sidebar-bg" style="position: fixed; height: auto;"></div>
|
131
|
+
|
71
132
|
</div><!-- ./wrapper -->
|
72
133
|
|
73
134
|
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
* @Author Almsaeed Studio
|
8
8
|
* @Support <http://www.almsaeedstudio.com>
|
9
9
|
* @Email <support@almsaeedstudio.com>
|
10
|
-
* @version 2.0
|
10
|
+
* @version 2.1.0
|
11
11
|
* @license MIT <http://opensource.org/licenses/MIT>
|
12
12
|
*/
|
13
13
|
|
@@ -41,12 +41,20 @@ $.AdminLTE.options = {
|
|
41
41
|
navbarMenuSlimscroll: true,
|
42
42
|
navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
|
43
43
|
navbarMenuHeight: "200px", //The height of the inner menu
|
44
|
+
//General animation speed for JS animated elements such as box collapse/expand and
|
45
|
+
//sidebar treeview slide up/down. This options accepts an integer as milliseconds,
|
46
|
+
//'fast', 'normal', or 'slow'
|
47
|
+
animationSpeed: 500,
|
44
48
|
//Sidebar push menu toggle button selector
|
45
49
|
sidebarToggleSelector: "[data-toggle='offcanvas']",
|
46
50
|
//Activate sidebar push menu
|
47
51
|
sidebarPushMenu: true,
|
48
52
|
//Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
|
49
53
|
sidebarSlimScroll: true,
|
54
|
+
//Enable sidebar expand on hover effect for sidebar mini
|
55
|
+
//This option is forced to true if both the fixed layout and sidebar mini
|
56
|
+
//are used together
|
57
|
+
sidebarExpandOnHover: false,
|
50
58
|
//BoxRefresh Plugin
|
51
59
|
enableBoxRefresh: true,
|
52
60
|
//Bootstrap.js tooltip
|
@@ -57,18 +65,28 @@ $.AdminLTE.options = {
|
|
57
65
|
//choose to enable the plugin, make sure you load the script
|
58
66
|
//before AdminLTE's app.js
|
59
67
|
enableFastclick: true,
|
68
|
+
//Control Sidebar Options
|
69
|
+
enableControlSidebar: true,
|
70
|
+
controlSidebarOptions: {
|
71
|
+
//Which button should trigger the open/close event
|
72
|
+
toggleBtnSelector: "[data-toggle='control-sidebar']",
|
73
|
+
//The sidebar selector
|
74
|
+
selector: ".control-sidebar",
|
75
|
+
//Enable slide over content
|
76
|
+
slide: true
|
77
|
+
},
|
60
78
|
//Box Widget Plugin. Enable this plugin
|
61
79
|
//to allow boxes to be collapsed and/or removed
|
62
80
|
enableBoxWidget: true,
|
63
81
|
//Box Widget plugin options
|
64
82
|
boxWidgetOptions: {
|
65
83
|
boxWidgetIcons: {
|
66
|
-
//
|
67
|
-
collapse: 'fa
|
68
|
-
//
|
69
|
-
open: 'fa
|
70
|
-
//
|
71
|
-
remove: 'fa
|
84
|
+
//Collapse icon
|
85
|
+
collapse: 'fa-minus',
|
86
|
+
//Open icon
|
87
|
+
open: 'fa-plus',
|
88
|
+
//Remove icon
|
89
|
+
remove: 'fa-times'
|
72
90
|
},
|
73
91
|
boxWidgetSelectors: {
|
74
92
|
//Remove button selector
|
@@ -114,218 +132,457 @@ $.AdminLTE.options = {
|
|
114
132
|
}
|
115
133
|
};
|
116
134
|
|
117
|
-
/*
|
118
|
-
* -
|
119
|
-
*
|
120
|
-
*
|
135
|
+
/* ------------------
|
136
|
+
* - Implementation -
|
137
|
+
* ------------------
|
138
|
+
* The next block of code implements AdminLTE's
|
139
|
+
* functions and plugins as specified by the
|
140
|
+
* options above.
|
121
141
|
*/
|
142
|
+
$(function () {
|
143
|
+
//Extend options if external options exist
|
144
|
+
if (typeof AdminLTEOptions !== "undefined") {
|
145
|
+
$.extend(true,
|
146
|
+
$.AdminLTE.options,
|
147
|
+
AdminLTEOptions);
|
148
|
+
}
|
122
149
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
150
|
+
//Easy access to options
|
151
|
+
var o = $.AdminLTE.options;
|
152
|
+
|
153
|
+
//Set up the object
|
154
|
+
_init();
|
155
|
+
|
156
|
+
//Activate the layout maker
|
157
|
+
$.AdminLTE.layout.activate();
|
158
|
+
|
159
|
+
//Enable sidebar tree view controls
|
160
|
+
$.AdminLTE.tree('.sidebar');
|
161
|
+
|
162
|
+
//Enable control sidebar
|
163
|
+
if (o.enableControlSidebar) {
|
164
|
+
$.AdminLTE.controlSidebar.activate();
|
165
|
+
}
|
166
|
+
|
167
|
+
//Add slimscroll to navbar dropdown
|
168
|
+
if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
|
169
|
+
$(".navbar .menu").slimscroll({
|
170
|
+
height: o.navbarMenuHeight,
|
171
|
+
alwaysVisible: false,
|
172
|
+
size: o.navbarMenuSlimscrollWidth
|
173
|
+
}).css("width", "100%");
|
174
|
+
}
|
175
|
+
|
176
|
+
//Activate sidebar push menu
|
177
|
+
if (o.sidebarPushMenu) {
|
178
|
+
$.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
|
179
|
+
}
|
180
|
+
|
181
|
+
//Activate Bootstrap tooltip
|
182
|
+
if (o.enableBSToppltip) {
|
183
|
+
$('body').tooltip({
|
184
|
+
selector: o.BSTooltipSelector
|
185
|
+
});
|
186
|
+
}
|
187
|
+
|
188
|
+
//Activate box widget
|
189
|
+
if (o.enableBoxWidget) {
|
190
|
+
$.AdminLTE.boxWidget.activate();
|
191
|
+
}
|
192
|
+
|
193
|
+
//Activate fast click
|
194
|
+
if (o.enableFastclick && typeof FastClick != 'undefined') {
|
195
|
+
FastClick.attach(document.body);
|
196
|
+
}
|
197
|
+
|
198
|
+
//Activate direct chat widget
|
199
|
+
if (o.directChat.enable) {
|
200
|
+
$(o.directChat.contactToggleSelector).on('click', function () {
|
201
|
+
var box = $(this).parents('.direct-chat').first();
|
202
|
+
box.toggleClass('direct-chat-contacts-open');
|
203
|
+
});
|
204
|
+
}
|
205
|
+
|
206
|
+
/*
|
207
|
+
* INITIALIZE BUTTON TOGGLE
|
208
|
+
* ------------------------
|
209
|
+
*/
|
210
|
+
$('.btn-group[data-toggle="btn-toggle"]').each(function () {
|
211
|
+
var group = $(this);
|
212
|
+
$(this).find(".btn").on('click', function (e) {
|
213
|
+
group.find(".btn.active").removeClass("active");
|
214
|
+
$(this).addClass("active");
|
215
|
+
e.preventDefault();
|
216
|
+
});
|
217
|
+
|
218
|
+
});
|
219
|
+
});
|
220
|
+
|
221
|
+
/* ----------------------------------
|
222
|
+
* - Initialize the AdminLTE Object -
|
223
|
+
* ----------------------------------
|
224
|
+
* All AdminLTE functions are implemented below.
|
131
225
|
*/
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
226
|
+
function _init() {
|
227
|
+
|
228
|
+
/* Layout
|
229
|
+
* ======
|
230
|
+
* Fixes the layout height in case min-height fails.
|
231
|
+
*
|
232
|
+
* @type Object
|
233
|
+
* @usage $.AdminLTE.layout.activate()
|
234
|
+
* $.AdminLTE.layout.fix()
|
235
|
+
* $.AdminLTE.layout.fixSidebar()
|
236
|
+
*/
|
237
|
+
$.AdminLTE.layout = {
|
238
|
+
activate: function () {
|
239
|
+
var _this = this;
|
138
240
|
_this.fix();
|
139
241
|
_this.fixSidebar();
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
if (
|
153
|
-
$(".content-wrapper, .right-side").css('min-height', window_height -
|
242
|
+
$(window, ".wrapper").resize(function () {
|
243
|
+
_this.fix();
|
244
|
+
_this.fixSidebar();
|
245
|
+
});
|
246
|
+
},
|
247
|
+
fix: function () {
|
248
|
+
//Get window height and the wrapper height
|
249
|
+
var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
|
250
|
+
var window_height = $(window).height();
|
251
|
+
var sidebar_height = $(".sidebar").height();
|
252
|
+
//Set the min-height of the content and sidebar based on the
|
253
|
+
//the height of the document.
|
254
|
+
if ($("body").hasClass("fixed")) {
|
255
|
+
$(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
|
154
256
|
} else {
|
155
|
-
|
257
|
+
var postSetWidth;
|
258
|
+
if (window_height >= sidebar_height) {
|
259
|
+
$(".content-wrapper, .right-side").css('min-height', window_height - neg);
|
260
|
+
postSetWidth = window_height - neg;
|
261
|
+
} else {
|
262
|
+
$(".content-wrapper, .right-side").css('min-height', sidebar_height);
|
263
|
+
postSetWidth = sidebar_height;
|
264
|
+
}
|
265
|
+
|
266
|
+
//Fix for the control sidebar height
|
267
|
+
var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
|
268
|
+
if (typeof controlSidebar !== "undefined") {
|
269
|
+
if (controlSidebar.height() > postSetWidth)
|
270
|
+
$(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
|
271
|
+
}
|
272
|
+
|
156
273
|
}
|
157
|
-
}
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
274
|
+
},
|
275
|
+
fixSidebar: function () {
|
276
|
+
//Make sure the body tag has the .fixed class
|
277
|
+
if (!$("body").hasClass("fixed")) {
|
278
|
+
if (typeof $.fn.slimScroll != 'undefined') {
|
279
|
+
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
280
|
+
}
|
281
|
+
return;
|
282
|
+
} else if (typeof $.fn.slimScroll == 'undefined' && console) {
|
283
|
+
console.error("Error: the fixed layout requires the slimscroll plugin!");
|
164
284
|
}
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
color: "rgba(0,0,0,0.2)",
|
178
|
-
size: "3px"
|
179
|
-
});
|
285
|
+
//Enable slimscroll for fixed layout
|
286
|
+
if ($.AdminLTE.options.sidebarSlimScroll) {
|
287
|
+
if (typeof $.fn.slimScroll != 'undefined') {
|
288
|
+
//Destroy if it exists
|
289
|
+
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
290
|
+
//Add slimscroll
|
291
|
+
$(".sidebar").slimscroll({
|
292
|
+
height: ($(window).height() - $(".main-header").height()) + "px",
|
293
|
+
color: "rgba(0,0,0,0.2)",
|
294
|
+
size: "3px"
|
295
|
+
});
|
296
|
+
}
|
180
297
|
}
|
181
298
|
}
|
182
|
-
}
|
183
|
-
};
|
299
|
+
};
|
184
300
|
|
185
|
-
/* PushMenu()
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
$.AdminLTE.pushMenu =
|
193
|
-
|
194
|
-
|
301
|
+
/* PushMenu()
|
302
|
+
* ==========
|
303
|
+
* Adds the push menu functionality to the sidebar.
|
304
|
+
*
|
305
|
+
* @type Function
|
306
|
+
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
|
307
|
+
*/
|
308
|
+
$.AdminLTE.pushMenu = {
|
309
|
+
activate: function (toggleBtn) {
|
310
|
+
//Get the screen sizes
|
311
|
+
var screenSizes = $.AdminLTE.options.screenSizes;
|
195
312
|
|
196
|
-
|
197
|
-
|
198
|
-
|
313
|
+
//Enable sidebar toggle
|
314
|
+
$(toggleBtn).on('click', function (e) {
|
315
|
+
e.preventDefault();
|
199
316
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
317
|
+
//Enable sidebar push menu
|
318
|
+
if ($(window).width() > (screenSizes.sm - 1)) {
|
319
|
+
$("body").toggleClass('sidebar-collapse');
|
320
|
+
}
|
321
|
+
//Handle sidebar push menu for small screens
|
322
|
+
else {
|
323
|
+
if ($("body").hasClass('sidebar-open')) {
|
324
|
+
$("body").removeClass('sidebar-open');
|
325
|
+
$("body").removeClass('sidebar-collapse')
|
326
|
+
} else {
|
327
|
+
$("body").addClass('sidebar-open');
|
328
|
+
}
|
329
|
+
}
|
330
|
+
});
|
214
331
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
332
|
+
$(".content-wrapper").click(function () {
|
333
|
+
//Enable hide menu when clicking on the content-wrapper on small screens
|
334
|
+
if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
|
335
|
+
$("body").removeClass('sidebar-open');
|
336
|
+
}
|
337
|
+
});
|
221
338
|
|
222
|
-
|
339
|
+
//Enable expand on hover for sidebar mini
|
340
|
+
if ($.AdminLTE.options.sidebarExpandOnHover
|
341
|
+
|| ($('body').hasClass('fixed')
|
342
|
+
&& $('body').hasClass('sidebar-mini'))) {
|
343
|
+
this.expandOnHover();
|
344
|
+
}
|
223
345
|
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) {
|
242
|
-
//Close the menu
|
243
|
-
checkElement.slideUp('normal', function () {
|
244
|
-
checkElement.removeClass('menu-open');
|
245
|
-
//Fix the layout in case the sidebar stretches over the height of the window
|
246
|
-
//_this.layout.fix();
|
247
|
-
});
|
248
|
-
checkElement.parent("li").removeClass("active");
|
249
|
-
}
|
250
|
-
//If the menu is not visible
|
251
|
-
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
|
252
|
-
//Get the parent menu
|
253
|
-
var parent = $this.parents('ul').first();
|
254
|
-
//Close all open menus within the parent
|
255
|
-
var ul = parent.find('ul:visible').slideUp('normal');
|
256
|
-
//Remove the menu-open class from the parent
|
257
|
-
ul.removeClass('menu-open');
|
258
|
-
//Get the parent li
|
259
|
-
var parent_li = $this.parent("li");
|
260
|
-
|
261
|
-
//Open the target menu and add the menu-open class
|
262
|
-
checkElement.slideDown('normal', function () {
|
263
|
-
//Add the class active to the parent li
|
264
|
-
checkElement.addClass('menu-open');
|
265
|
-
parent.find('li.active').removeClass('active');
|
266
|
-
parent_li.addClass('active');
|
267
|
-
//Fix the layout in case the sidebar stretches over the height of the window
|
268
|
-
_this.layout.fix();
|
346
|
+
},
|
347
|
+
expandOnHover: function () {
|
348
|
+
var _this = this;
|
349
|
+
var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
|
350
|
+
//Expand sidebar on hover
|
351
|
+
$('.main-sidebar').hover(function () {
|
352
|
+
if ($('body').hasClass('sidebar-mini')
|
353
|
+
&& $("body").hasClass('sidebar-collapse')
|
354
|
+
&& $(window).width() > screenWidth) {
|
355
|
+
_this.expand();
|
356
|
+
}
|
357
|
+
}, function () {
|
358
|
+
if ($('body').hasClass('sidebar-mini')
|
359
|
+
&& $('body').hasClass('sidebar-expanded-on-hover')
|
360
|
+
&& $(window).width() > screenWidth) {
|
361
|
+
_this.collapse();
|
362
|
+
}
|
269
363
|
});
|
364
|
+
},
|
365
|
+
expand: function () {
|
366
|
+
$("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
|
367
|
+
},
|
368
|
+
collapse: function () {
|
369
|
+
if ($('body').hasClass('sidebar-expanded-on-hover')) {
|
370
|
+
$('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');
|
371
|
+
}
|
270
372
|
}
|
271
|
-
|
272
|
-
if (checkElement.is('.treeview-menu')) {
|
273
|
-
e.preventDefault();
|
274
|
-
}
|
275
|
-
});
|
276
|
-
};
|
373
|
+
};
|
277
374
|
|
278
|
-
/*
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
$.AdminLTE.boxWidget = {
|
288
|
-
activate: function () {
|
289
|
-
var o = $.AdminLTE.options;
|
375
|
+
/* Tree()
|
376
|
+
* ======
|
377
|
+
* Converts the sidebar into a multilevel
|
378
|
+
* tree view menu.
|
379
|
+
*
|
380
|
+
* @type Function
|
381
|
+
* @Usage: $.AdminLTE.tree('.sidebar')
|
382
|
+
*/
|
383
|
+
$.AdminLTE.tree = function (menu) {
|
290
384
|
var _this = this;
|
291
|
-
|
292
|
-
$(
|
293
|
-
|
294
|
-
|
385
|
+
var animationSpeed = $.AdminLTE.options.animationSpeed;
|
386
|
+
$("li a", $(menu)).on('click', function (e) {
|
387
|
+
//Get the clicked link and the next element
|
388
|
+
var $this = $(this);
|
389
|
+
var checkElement = $this.next();
|
390
|
+
|
391
|
+
//Check if the next element is a menu and is visible
|
392
|
+
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) {
|
393
|
+
//Close the menu
|
394
|
+
checkElement.slideUp(animationSpeed, function () {
|
395
|
+
checkElement.removeClass('menu-open');
|
396
|
+
//Fix the layout in case the sidebar stretches over the height of the window
|
397
|
+
//_this.layout.fix();
|
398
|
+
});
|
399
|
+
checkElement.parent("li").removeClass("active");
|
400
|
+
}
|
401
|
+
//If the menu is not visible
|
402
|
+
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
|
403
|
+
//Get the parent menu
|
404
|
+
var parent = $this.parents('ul').first();
|
405
|
+
//Close all open menus within the parent
|
406
|
+
var ul = parent.find('ul:visible').slideUp(animationSpeed);
|
407
|
+
//Remove the menu-open class from the parent
|
408
|
+
ul.removeClass('menu-open');
|
409
|
+
//Get the parent li
|
410
|
+
var parent_li = $this.parent("li");
|
411
|
+
|
412
|
+
//Open the target menu and add the menu-open class
|
413
|
+
checkElement.slideDown(animationSpeed, function () {
|
414
|
+
//Add the class active to the parent li
|
415
|
+
checkElement.addClass('menu-open');
|
416
|
+
parent.find('li.active').removeClass('active');
|
417
|
+
parent_li.addClass('active');
|
418
|
+
//Fix the layout in case the sidebar stretches over the height of the window
|
419
|
+
_this.layout.fix();
|
420
|
+
});
|
421
|
+
}
|
422
|
+
//if this isn't a link, prevent the page from being redirected
|
423
|
+
if (checkElement.is('.treeview-menu')) {
|
424
|
+
e.preventDefault();
|
425
|
+
}
|
295
426
|
});
|
427
|
+
};
|
296
428
|
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
//
|
310
|
-
|
311
|
-
|
312
|
-
|
429
|
+
/* ControlSidebar
|
430
|
+
* ==============
|
431
|
+
* Adds functionality to the right sidebar
|
432
|
+
*
|
433
|
+
* @type Object
|
434
|
+
* @usage $.AdminLTE.controlSidebar.activate(options)
|
435
|
+
*/
|
436
|
+
$.AdminLTE.controlSidebar = {
|
437
|
+
//instantiate the object
|
438
|
+
activate: function () {
|
439
|
+
//Get the object
|
440
|
+
var _this = this;
|
441
|
+
//Update options
|
442
|
+
var o = $.AdminLTE.options.controlSidebarOptions;
|
443
|
+
//Get the sidebar
|
444
|
+
var sidebar = $(o.selector);
|
445
|
+
//The toggle button
|
446
|
+
var btn = $(o.toggleBtnSelector);
|
447
|
+
|
448
|
+
//Listen to the click event
|
449
|
+
btn.on('click', function (e) {
|
450
|
+
e.preventDefault();
|
451
|
+
//If the sidebar is not open
|
452
|
+
if (!sidebar.hasClass('control-sidebar-open')
|
453
|
+
&& !$('body').hasClass('control-sidebar-open')) {
|
454
|
+
//Open the sidebar
|
455
|
+
_this.open(sidebar, o.slide);
|
456
|
+
} else {
|
457
|
+
_this.close(sidebar, o.slide);
|
458
|
+
}
|
459
|
+
});
|
460
|
+
|
461
|
+
//If the body has a boxed layout, fix the sidebar bg position
|
462
|
+
var bg = $(".control-sidebar-bg");
|
463
|
+
_this._fix(bg);
|
464
|
+
|
465
|
+
//If the body has a fixed layout, make the control sidebar fixed
|
466
|
+
if ($('body').hasClass('fixed')) {
|
467
|
+
_this._fixForFixed(sidebar);
|
468
|
+
} else {
|
469
|
+
//If the content height is less than the sidebar's height, force max height
|
470
|
+
if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
|
471
|
+
_this._fixForContent(sidebar);
|
472
|
+
}
|
473
|
+
}
|
474
|
+
},
|
475
|
+
//Open the control sidebar
|
476
|
+
open: function (sidebar, slide) {
|
477
|
+
var _this = this;
|
478
|
+
//Slide over content
|
479
|
+
if (slide) {
|
480
|
+
sidebar.addClass('control-sidebar-open');
|
481
|
+
} else {
|
482
|
+
//Push the content by adding the open class to the body instead
|
483
|
+
//of the sidebar itself
|
484
|
+
$('body').addClass('control-sidebar-open');
|
485
|
+
}
|
486
|
+
},
|
487
|
+
//Close the control sidebar
|
488
|
+
close: function (sidebar, slide) {
|
489
|
+
if (slide) {
|
490
|
+
sidebar.removeClass('control-sidebar-open');
|
491
|
+
} else {
|
492
|
+
$('body').removeClass('control-sidebar-open');
|
493
|
+
}
|
494
|
+
},
|
495
|
+
_fix: function (sidebar) {
|
496
|
+
var _this = this;
|
497
|
+
if ($("body").hasClass('layout-boxed')) {
|
498
|
+
sidebar.css('position', 'absolute');
|
499
|
+
sidebar.height($(".wrapper").height());
|
500
|
+
$(window).resize(function () {
|
501
|
+
_this._fix(sidebar);
|
502
|
+
});
|
503
|
+
} else {
|
504
|
+
sidebar.css({
|
505
|
+
'position': 'fixed',
|
506
|
+
'height': 'auto'
|
507
|
+
});
|
508
|
+
}
|
509
|
+
},
|
510
|
+
_fixForFixed: function (sidebar) {
|
511
|
+
sidebar.css({
|
512
|
+
'position': 'fixed',
|
513
|
+
'max-height': '100%',
|
514
|
+
'overflow': 'auto',
|
515
|
+
'padding-bottom': '50px'
|
516
|
+
});
|
517
|
+
},
|
518
|
+
_fixForContent: function (sidebar) {
|
519
|
+
$(".content-wrapper, .right-side").css('min-height', sidebar.height());
|
520
|
+
}
|
521
|
+
};
|
522
|
+
|
523
|
+
/* BoxWidget
|
524
|
+
* =========
|
525
|
+
* BoxWidget is a plugin to handle collapsing and
|
526
|
+
* removing boxes from the screen.
|
527
|
+
*
|
528
|
+
* @type Object
|
529
|
+
* @usage $.AdminLTE.boxWidget.activate()
|
530
|
+
* Set all your options in the main $.AdminLTE.options object
|
531
|
+
*/
|
532
|
+
$.AdminLTE.boxWidget = {
|
533
|
+
selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,
|
534
|
+
icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,
|
535
|
+
animationSpeed: $.AdminLTE.options.animationSpeed,
|
536
|
+
activate: function (_box) {
|
537
|
+
var _this = this;
|
538
|
+
if (! _box) {
|
539
|
+
_box = document; // activate all boxes per default
|
540
|
+
}
|
541
|
+
//Listen for collapse event triggers
|
542
|
+
$(_box).find(_this.selectors.collapse).on('click', function (e) {
|
543
|
+
e.preventDefault();
|
544
|
+
_this.collapse($(this));
|
313
545
|
});
|
314
|
-
|
315
|
-
//
|
316
|
-
|
317
|
-
|
318
|
-
|
546
|
+
|
547
|
+
//Listen for remove event triggers
|
548
|
+
$(_box).find(_this.selectors.remove).on('click', function (e) {
|
549
|
+
e.preventDefault();
|
550
|
+
_this.remove($(this));
|
319
551
|
});
|
552
|
+
},
|
553
|
+
collapse: function (element) {
|
554
|
+
var _this = this;
|
555
|
+
//Find the box parent
|
556
|
+
var box = element.parents(".box").first();
|
557
|
+
//Find the body and the footer
|
558
|
+
var box_content = box.find("> .box-body, > .box-footer");
|
559
|
+
if (!box.hasClass("collapsed-box")) {
|
560
|
+
//Convert minus into plus
|
561
|
+
element.children(":first")
|
562
|
+
.removeClass(_this.icons.collapse)
|
563
|
+
.addClass(_this.icons.open);
|
564
|
+
//Hide the content
|
565
|
+
box_content.slideUp(_this.animationSpeed, function () {
|
566
|
+
box.addClass("collapsed-box");
|
567
|
+
});
|
568
|
+
} else {
|
569
|
+
//Convert plus into minus
|
570
|
+
element.children(":first")
|
571
|
+
.removeClass(_this.icons.open)
|
572
|
+
.addClass(_this.icons.collapse);
|
573
|
+
//Show the content
|
574
|
+
box_content.slideDown(_this.animationSpeed, function () {
|
575
|
+
box.removeClass("collapsed-box");
|
576
|
+
});
|
577
|
+
}
|
578
|
+
},
|
579
|
+
remove: function (element) {
|
580
|
+
//Find the box parent
|
581
|
+
var box = element.parents(".box").first();
|
582
|
+
box.slideUp(this.animationSpeed);
|
320
583
|
}
|
321
|
-
}
|
322
|
-
|
323
|
-
//Find the box parent
|
324
|
-
var box = element.parents(".box").first();
|
325
|
-
box.slideUp();
|
326
|
-
},
|
327
|
-
options: $.AdminLTE.options.boxWidgetOptions
|
328
|
-
};
|
584
|
+
};
|
585
|
+
}
|
329
586
|
|
330
587
|
/* ------------------
|
331
588
|
* - Custom Plugins -
|
@@ -336,7 +593,7 @@ $.AdminLTE.boxWidget = {
|
|
336
593
|
/*
|
337
594
|
* BOX REFRESH BUTTON
|
338
595
|
* ------------------
|
339
|
-
* This is a custom plugin to use with the
|
596
|
+
* This is a custom plugin to use with the component BOX. It allows you to add
|
340
597
|
* a refresh button to the box. It converts the box's state to a loading state.
|
341
598
|
*
|
342
599
|
* @type plugin
|
@@ -348,7 +605,7 @@ $.AdminLTE.boxWidget = {
|
|
348
605
|
|
349
606
|
// Render options
|
350
607
|
var settings = $.extend({
|
351
|
-
//
|
608
|
+
//Refresh button selector
|
352
609
|
trigger: ".refresh-btn",
|
353
610
|
//File source to be loaded (e.g: ajax/src.php)
|
354
611
|
source: "",
|
@@ -377,7 +634,7 @@ $.AdminLTE.boxWidget = {
|
|
377
634
|
var rBtn = box.find(settings.trigger).first();
|
378
635
|
|
379
636
|
//On trigger click
|
380
|
-
rBtn.click
|
637
|
+
rBtn.on('click', function (e) {
|
381
638
|
e.preventDefault();
|
382
639
|
//Add loading overlay
|
383
640
|
start(box);
|
@@ -407,6 +664,23 @@ $.AdminLTE.boxWidget = {
|
|
407
664
|
|
408
665
|
})(jQuery);
|
409
666
|
|
667
|
+
/*
|
668
|
+
* EXPLICIT BOX ACTIVATION
|
669
|
+
* -----------------------
|
670
|
+
* This is a custom plugin to use with the component BOX. It allows you to activate
|
671
|
+
* a box inserted in the DOM after the app.js was loaded.
|
672
|
+
*
|
673
|
+
* @type plugin
|
674
|
+
* @usage $("#box-widget").activateBox();
|
675
|
+
*/
|
676
|
+
(function ($) {
|
677
|
+
|
678
|
+
$.fn.activateBox = function () {
|
679
|
+
$.AdminLTE.boxWidget.activate(this);
|
680
|
+
};
|
681
|
+
|
682
|
+
})(jQuery);
|
683
|
+
|
410
684
|
/*
|
411
685
|
* TODO LIST CUSTOM PLUGIN
|
412
686
|
* -----------------------
|
@@ -451,73 +725,4 @@ $.AdminLTE.boxWidget = {
|
|
451
725
|
}
|
452
726
|
});
|
453
727
|
};
|
454
|
-
}(jQuery));
|
455
|
-
|
456
|
-
/* ------------------
|
457
|
-
* - Implementation -
|
458
|
-
* ------------------
|
459
|
-
* The next block of code implements AdminLTE's
|
460
|
-
* functions and plugins as specified by the
|
461
|
-
* options above.
|
462
|
-
*/
|
463
|
-
$(function () {
|
464
|
-
//Easy access to options
|
465
|
-
var o = $.AdminLTE.options;
|
466
|
-
|
467
|
-
//Activate the layout maker
|
468
|
-
$.AdminLTE.layout.activate();
|
469
|
-
|
470
|
-
//Enable sidebar tree view controls
|
471
|
-
$.AdminLTE.tree('.sidebar');
|
472
|
-
|
473
|
-
//Add slimscroll to navbar dropdown
|
474
|
-
if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
|
475
|
-
$(".navbar .menu").slimscroll({
|
476
|
-
height: "200px",
|
477
|
-
alwaysVisible: false,
|
478
|
-
size: "3px"
|
479
|
-
}).css("width", "100%");
|
480
|
-
}
|
481
|
-
|
482
|
-
//Activate sidebar push menu
|
483
|
-
if (o.sidebarPushMenu) {
|
484
|
-
$.AdminLTE.pushMenu(o.sidebarToggleSelector);
|
485
|
-
}
|
486
|
-
|
487
|
-
//Activate Bootstrap tooltip
|
488
|
-
if (o.enableBSToppltip) {
|
489
|
-
$(o.BSTooltipSelector).tooltip();
|
490
|
-
}
|
491
|
-
|
492
|
-
//Activate box widget
|
493
|
-
if (o.enableBoxWidget) {
|
494
|
-
$.AdminLTE.boxWidget.activate();
|
495
|
-
}
|
496
|
-
|
497
|
-
//Activate fast click
|
498
|
-
if (o.enableFastclick && typeof FastClick != 'undefined') {
|
499
|
-
FastClick.attach(document.body);
|
500
|
-
}
|
501
|
-
|
502
|
-
//Activate direct chat widget
|
503
|
-
if (o.directChat.enable) {
|
504
|
-
$(o.directChat.contactToggleSelector).click(function () {
|
505
|
-
var box = $(this).parents('.direct-chat').first();
|
506
|
-
box.toggleClass('direct-chat-contacts-open');
|
507
|
-
});
|
508
|
-
}
|
509
|
-
|
510
|
-
/*
|
511
|
-
* INITIALIZE BUTTON TOGGLE
|
512
|
-
* ------------------------
|
513
|
-
*/
|
514
|
-
$('.btn-group[data-toggle="btn-toggle"]').each(function () {
|
515
|
-
var group = $(this);
|
516
|
-
$(this).find(".btn").click(function (e) {
|
517
|
-
group.find(".btn.active").removeClass("active");
|
518
|
-
$(this).addClass("active");
|
519
|
-
e.preventDefault();
|
520
|
-
});
|
521
|
-
|
522
|
-
});
|
523
|
-
});
|
728
|
+
}(jQuery));
|