adminlte_assets 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +153 -0
  4. data/lib/adminlte_assets/version.rb +3 -0
  5. data/lib/adminlte_assets.rb +11 -0
  6. data/lib/tasks/adminlte_assets_tasks.rake +4 -0
  7. data/vendor/assets/images/adminlte/avatar.png +0 -0
  8. data/vendor/assets/images/adminlte/avatar04.png +0 -0
  9. data/vendor/assets/images/adminlte/avatar2.png +0 -0
  10. data/vendor/assets/images/adminlte/avatar3.png +0 -0
  11. data/vendor/assets/images/adminlte/avatar5.png +0 -0
  12. data/vendor/assets/images/adminlte/boxed-bg.jpg +0 -0
  13. data/vendor/assets/images/adminlte/boxed-bg.png +0 -0
  14. data/vendor/assets/images/adminlte/credit/american-express.png +0 -0
  15. data/vendor/assets/images/adminlte/credit/cirrus.png +0 -0
  16. data/vendor/assets/images/adminlte/credit/mastercard.png +0 -0
  17. data/vendor/assets/images/adminlte/credit/mestro.png +0 -0
  18. data/vendor/assets/images/adminlte/credit/paypal.png +0 -0
  19. data/vendor/assets/images/adminlte/credit/paypal2.png +0 -0
  20. data/vendor/assets/images/adminlte/credit/visa.png +0 -0
  21. data/vendor/assets/images/adminlte/default-50x50.gif +0 -0
  22. data/vendor/assets/images/adminlte/icons.png +0 -0
  23. data/vendor/assets/images/adminlte/photo1.png +0 -0
  24. data/vendor/assets/images/adminlte/photo2.png +0 -0
  25. data/vendor/assets/images/adminlte/plugins/colorpicker/img/alpha-horizontal.png +0 -0
  26. data/vendor/assets/images/adminlte/plugins/colorpicker/img/alpha.png +0 -0
  27. data/vendor/assets/images/adminlte/plugins/colorpicker/img/hue-horizontal.png +0 -0
  28. data/vendor/assets/images/adminlte/plugins/colorpicker/img/hue.png +0 -0
  29. data/vendor/assets/images/adminlte/plugins/colorpicker/img/saturation.png +0 -0
  30. data/vendor/assets/images/adminlte/user1-128x128.jpg +0 -0
  31. data/vendor/assets/images/adminlte/user2-160x160.jpg +0 -0
  32. data/vendor/assets/images/adminlte/user3-128x128.jpg +0 -0
  33. data/vendor/assets/images/adminlte/user4-128x128.jpg +0 -0
  34. data/vendor/assets/images/adminlte/user5-128x128.jpg +0 -0
  35. data/vendor/assets/images/adminlte/user6-128x128.jpg +0 -0
  36. data/vendor/assets/images/adminlte/user7-128x128.jpg +0 -0
  37. data/vendor/assets/images/adminlte/user8-128x128.jpg +0 -0
  38. data/vendor/assets/javascripts/adminlte/app.js +731 -0
  39. data/vendor/assets/javascripts/adminlte/plugin_options.js +42 -0
  40. data/vendor/assets/javascripts/adminlte/plugins/colorpicker/all.js +12 -0
  41. data/vendor/assets/javascripts/adminlte/plugins/colorpicker/bootstrap-colorpicker.js +949 -0
  42. data/vendor/assets/javascripts/adminlte/plugins/daterangepicker/all.js +13 -0
  43. data/vendor/assets/javascripts/adminlte/plugins/daterangepicker/daterangepicker.js +1304 -0
  44. data/vendor/assets/javascripts/adminlte/plugins/daterangepicker/moment.js +3043 -0
  45. data/vendor/assets/javascripts/adminlte/plugins/select2/all.js +11 -0
  46. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/az.js +3 -0
  47. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/bg.js +3 -0
  48. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/ca.js +3 -0
  49. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/cs.js +3 -0
  50. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/da.js +3 -0
  51. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/de.js +3 -0
  52. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/en.js +3 -0
  53. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/es.js +3 -0
  54. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/et.js +3 -0
  55. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/eu.js +3 -0
  56. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/fa.js +3 -0
  57. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/fi.js +3 -0
  58. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/fr.js +3 -0
  59. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/gl.js +3 -0
  60. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/he.js +3 -0
  61. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/hi.js +3 -0
  62. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/hr.js +3 -0
  63. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/hu.js +3 -0
  64. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/id.js +3 -0
  65. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/is.js +3 -0
  66. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/it.js +3 -0
  67. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/ko.js +3 -0
  68. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/lt.js +3 -0
  69. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/lv.js +3 -0
  70. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/mk.js +3 -0
  71. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/nb.js +3 -0
  72. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/nl.js +3 -0
  73. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/pl.js +3 -0
  74. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/pt-BR.js +3 -0
  75. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/pt.js +3 -0
  76. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/ro.js +3 -0
  77. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/ru.js +3 -0
  78. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/sk.js +3 -0
  79. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/sr.js +3 -0
  80. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/sv.js +3 -0
  81. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/th.js +3 -0
  82. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/tr.js +3 -0
  83. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/uk.js +3 -0
  84. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/vi.js +3 -0
  85. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/zh-CN.js +3 -0
  86. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/zh-TW.js +3 -0
  87. data/vendor/assets/javascripts/adminlte/plugins/select2/select2.full.js +6114 -0
  88. data/vendor/assets/javascripts/adminlte/plugins/select2/select2.js +5403 -0
  89. data/vendor/assets/javascripts/adminlte/plugins/slimScroll/jquery.slimscroll.js +490 -0
  90. data/vendor/assets/script_css.rb +38 -0
  91. data/vendor/assets/script_js.rb +38 -0
  92. data/vendor/assets/stylesheets/adminlte/app.css +4215 -0
  93. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/bootstrap-colorpicker.scss +214 -0
  94. data/vendor/assets/stylesheets/adminlte/plugins/daterangepicker/daterangepicker-bs3.css +335 -0
  95. data/vendor/assets/stylesheets/adminlte/plugins/select2/select2.css +431 -0
  96. data/vendor/assets/stylesheets/adminlte/skins/_all-skins.css +1787 -0
  97. data/vendor/assets/stylesheets/adminlte/skins/_all-skins.min.css +1 -0
  98. data/vendor/assets/stylesheets/adminlte/skins/skin-black-light.css +175 -0
  99. data/vendor/assets/stylesheets/adminlte/skins/skin-black-light.min.css +1 -0
  100. data/vendor/assets/stylesheets/adminlte/skins/skin-black.css +153 -0
  101. data/vendor/assets/stylesheets/adminlte/skins/skin-black.min.css +1 -0
  102. data/vendor/assets/stylesheets/adminlte/skins/skin-blue-light.css +166 -0
  103. data/vendor/assets/stylesheets/adminlte/skins/skin-blue-light.min.css +1 -0
  104. data/vendor/assets/stylesheets/adminlte/skins/skin-blue.css +141 -0
  105. data/vendor/assets/stylesheets/adminlte/skins/skin-blue.min.css +1 -0
  106. data/vendor/assets/stylesheets/adminlte/skins/skin-green-light.css +155 -0
  107. data/vendor/assets/stylesheets/adminlte/skins/skin-green-light.min.css +1 -0
  108. data/vendor/assets/stylesheets/adminlte/skins/skin-green.css +133 -0
  109. data/vendor/assets/stylesheets/adminlte/skins/skin-green.min.css +1 -0
  110. data/vendor/assets/stylesheets/adminlte/skins/skin-purple-light.css +155 -0
  111. data/vendor/assets/stylesheets/adminlte/skins/skin-purple-light.min.css +1 -0
  112. data/vendor/assets/stylesheets/adminlte/skins/skin-purple.css +133 -0
  113. data/vendor/assets/stylesheets/adminlte/skins/skin-purple.min.css +1 -0
  114. data/vendor/assets/stylesheets/adminlte/skins/skin-red-light.css +155 -0
  115. data/vendor/assets/stylesheets/adminlte/skins/skin-red-light.min.css +1 -0
  116. data/vendor/assets/stylesheets/adminlte/skins/skin-red.css +133 -0
  117. data/vendor/assets/stylesheets/adminlte/skins/skin-red.min.css +1 -0
  118. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow-light.css +155 -0
  119. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow-light.min.css +1 -0
  120. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow.css +133 -0
  121. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow.min.css +1 -0
  122. metadata +248 -0
@@ -0,0 +1,490 @@
1
+ /*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
2
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
3
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
4
+ *
5
+ * Version: 1.3.3
6
+ *
7
+ */
8
+ (function ($) {
9
+
10
+ $.fn.extend({
11
+ slimScroll: function (options) {
12
+
13
+ var defaults = {
14
+ // width in pixels of the visible scroll area
15
+ width: 'auto',
16
+ // height in pixels of the visible scroll area
17
+ height: '250px',
18
+ // width in pixels of the scrollbar and rail
19
+ size: '7px',
20
+ // scrollbar color, accepts any hex/color value
21
+ color: '#000',
22
+ // scrollbar position - left/right
23
+ position: 'right',
24
+ // distance in pixels between the side edge and the scrollbar
25
+ distance: '1px',
26
+ // default scroll position on load - top / bottom / $('selector')
27
+ start: 'top',
28
+ // sets scrollbar opacity
29
+ opacity: .4,
30
+ // enables always-on mode for the scrollbar
31
+ alwaysVisible: false,
32
+ // check if we should hide the scrollbar when user is hovering over
33
+ disableFadeOut: false,
34
+ // sets visibility of the rail
35
+ railVisible: false,
36
+ // sets rail color
37
+ railColor: '#333',
38
+ // sets rail opacity
39
+ railOpacity: .2,
40
+ // whether we should use jQuery UI Draggable to enable bar dragging
41
+ railDraggable: true,
42
+ // defautlt CSS class of the slimscroll rail
43
+ railClass: 'slimScrollRail',
44
+ // defautlt CSS class of the slimscroll bar
45
+ barClass: 'slimScrollBar',
46
+ // defautlt CSS class of the slimscroll wrapper
47
+ wrapperClass: 'slimScrollDiv',
48
+ // check if mousewheel should scroll the window if we reach top/bottom
49
+ allowPageScroll: false,
50
+ // scroll amount applied to each mouse wheel step
51
+ wheelStep: 20,
52
+ // scroll amount applied when user is using gestures
53
+ touchScrollStep: 200,
54
+ // sets border radius
55
+ borderRadius: '7px',
56
+ // sets border radius of the rail
57
+ railBorderRadius: '7px'
58
+ };
59
+
60
+ var o = $.extend(defaults, options);
61
+
62
+ // do it for every element that matches selector
63
+ this.each(function () {
64
+
65
+ var isOverPanel, isOverBar, isDragg, queueHide, touchDif,
66
+ barHeight, percentScroll, lastScroll,
67
+ divS = '<div></div>',
68
+ minBarHeight = 30,
69
+ releaseScroll = false;
70
+
71
+ // used in event handlers and for better minification
72
+ var me = $(this);
73
+
74
+ // ensure we are not binding it again
75
+ if (me.parent().hasClass(o.wrapperClass))
76
+ {
77
+ // start from last bar position
78
+ var offset = me.scrollTop();
79
+
80
+ // find bar and rail
81
+ bar = me.parent().find('.' + o.barClass);
82
+ rail = me.parent().find('.' + o.railClass);
83
+
84
+ getBarHeight();
85
+
86
+ // check if we should scroll existing instance
87
+ if ($.isPlainObject(options))
88
+ {
89
+ // Pass height: auto to an existing slimscroll object to force a resize after contents have changed
90
+ if ('height' in options && options.height == 'auto') {
91
+ me.parent().css('height', 'auto');
92
+ me.css('height', 'auto');
93
+ var height = me.parent().parent().height();
94
+ me.parent().css('height', height);
95
+ me.css('height', height);
96
+ }
97
+
98
+ if ('scrollTo' in options)
99
+ {
100
+ // jump to a static point
101
+ offset = parseInt(o.scrollTo);
102
+ }
103
+ else if ('scrollBy' in options)
104
+ {
105
+ // jump by value pixels
106
+ offset += parseInt(o.scrollBy);
107
+ }
108
+ else if ('destroy' in options)
109
+ {
110
+ // remove slimscroll elements
111
+ bar.remove();
112
+ rail.remove();
113
+ me.unwrap();
114
+ return;
115
+ }
116
+
117
+ // scroll content by the given offset
118
+ scrollContent(offset, false, true);
119
+ }
120
+
121
+ return;
122
+ }
123
+ else if ($.isPlainObject(options))
124
+ {
125
+ if ('destroy' in options)
126
+ {
127
+ return;
128
+ }
129
+ }
130
+
131
+ // optionally set height to the parent's height
132
+ o.height = (o.height == 'auto') ? me.parent().height() : o.height;
133
+
134
+ // wrap content
135
+ var wrapper = $(divS)
136
+ .addClass(o.wrapperClass)
137
+ .css({
138
+ position: 'relative',
139
+ overflow: 'hidden',
140
+ width: o.width,
141
+ height: o.height
142
+ });
143
+
144
+ // update style for the div
145
+ me.css({
146
+ overflow: 'hidden',
147
+ width: o.width,
148
+ height: o.height,
149
+ //Fix for IE10
150
+ "-ms-touch-action": "none"
151
+ });
152
+
153
+ // create scrollbar rail
154
+ var rail = $(divS)
155
+ .addClass(o.railClass)
156
+ .css({
157
+ width: o.size,
158
+ height: '100%',
159
+ position: 'absolute',
160
+ top: 0,
161
+ display: (o.alwaysVisible && o.railVisible) ? 'block' : 'none',
162
+ 'border-radius': o.railBorderRadius,
163
+ background: o.railColor,
164
+ opacity: o.railOpacity,
165
+ zIndex: 90
166
+ });
167
+
168
+ // create scrollbar
169
+ var bar = $(divS)
170
+ .addClass(o.barClass)
171
+ .css({
172
+ background: o.color,
173
+ width: o.size,
174
+ position: 'absolute',
175
+ top: 0,
176
+ opacity: o.opacity,
177
+ display: o.alwaysVisible ? 'block' : 'none',
178
+ 'border-radius': o.borderRadius,
179
+ BorderRadius: o.borderRadius,
180
+ MozBorderRadius: o.borderRadius,
181
+ WebkitBorderRadius: o.borderRadius,
182
+ zIndex: 99
183
+ });
184
+
185
+ // set position
186
+ var posCss = (o.position == 'right') ? {right: o.distance} : {left: o.distance};
187
+ rail.css(posCss);
188
+ bar.css(posCss);
189
+
190
+ // wrap it
191
+ me.wrap(wrapper);
192
+
193
+ // append to parent div
194
+ me.parent().append(bar);
195
+ me.parent().append(rail);
196
+
197
+ // make it draggable and no longer dependent on the jqueryUI
198
+ if (o.railDraggable) {
199
+ bar.bind("mousedown", function (e) {
200
+ var $doc = $(document);
201
+ isDragg = true;
202
+ t = parseFloat(bar.css('top'));
203
+ pageY = e.pageY;
204
+
205
+ $doc.bind("mousemove.slimscroll", function (e) {
206
+ currTop = t + e.pageY - pageY;
207
+ bar.css('top', currTop);
208
+ scrollContent(0, bar.position().top, false);// scroll content
209
+ });
210
+
211
+ $doc.bind("mouseup.slimscroll", function (e) {
212
+ isDragg = false;
213
+ hideBar();
214
+ $doc.unbind('.slimscroll');
215
+ });
216
+ return false;
217
+ }).bind("selectstart.slimscroll", function (e) {
218
+ e.stopPropagation();
219
+ e.preventDefault();
220
+ return false;
221
+ });
222
+ }
223
+
224
+ // on rail over
225
+ rail.hover(function () {
226
+ showBar();
227
+ }, function () {
228
+ hideBar();
229
+ });
230
+
231
+ // on bar over
232
+ bar.hover(function () {
233
+ isOverBar = true;
234
+ }, function () {
235
+ isOverBar = false;
236
+ });
237
+
238
+ // show on parent mouseover
239
+ me.hover(function () {
240
+ isOverPanel = true;
241
+ showBar();
242
+ hideBar();
243
+ }, function () {
244
+ isOverPanel = false;
245
+ hideBar();
246
+ });
247
+
248
+ if (window.navigator.msPointerEnabled) {
249
+ // support for mobile
250
+ me.bind('MSPointerDown', function (e, b) {
251
+ if (e.originalEvent.targetTouches.length)
252
+ {
253
+ // record where touch started
254
+ touchDif = e.originalEvent.targetTouches[0].pageY;
255
+ }
256
+ });
257
+
258
+ me.bind('MSPointerMove', function (e) {
259
+ // prevent scrolling the page if necessary
260
+ e.originalEvent.preventDefault();
261
+ if (e.originalEvent.targetTouches.length)
262
+ {
263
+ // see how far user swiped
264
+ var diff = (touchDif - e.originalEvent.targetTouches[0].pageY) / o.touchScrollStep;
265
+ // scroll content
266
+ scrollContent(diff, true);
267
+ touchDif = e.originalEvent.targetTouches[0].pageY;
268
+
269
+ }
270
+ });
271
+ } else {
272
+ // support for mobile
273
+ me.bind('touchstart', function (e, b) {
274
+ if (e.originalEvent.touches.length)
275
+ {
276
+ // record where touch started
277
+ touchDif = e.originalEvent.touches[0].pageY;
278
+ }
279
+ });
280
+
281
+ me.bind('touchmove', function (e) {
282
+ // prevent scrolling the page if necessary
283
+ if (!releaseScroll)
284
+ {
285
+ e.originalEvent.preventDefault();
286
+ }
287
+ if (e.originalEvent.touches.length)
288
+ {
289
+ // see how far user swiped
290
+ var diff = (touchDif - e.originalEvent.touches[0].pageY) / o.touchScrollStep;
291
+ // scroll content
292
+ scrollContent(diff, true);
293
+ touchDif = e.originalEvent.touches[0].pageY;
294
+ }
295
+ });
296
+ }
297
+
298
+ // set up initial height
299
+ getBarHeight();
300
+
301
+ // check start position
302
+ if (o.start === 'bottom')
303
+ {
304
+ // scroll content to bottom
305
+ bar.css({top: me.outerHeight() - bar.outerHeight()});
306
+ scrollContent(0, true);
307
+ }
308
+ else if (o.start !== 'top')
309
+ {
310
+ // assume jQuery selector
311
+ scrollContent($(o.start).position().top, null, true);
312
+
313
+ // make sure bar stays hidden
314
+ if (!o.alwaysVisible) {
315
+ bar.hide();
316
+ }
317
+ }
318
+
319
+ // attach scroll events
320
+ attachWheel();
321
+
322
+ function _onWheel(e)
323
+ {
324
+ // use mouse wheel only when mouse is over
325
+ if (!isOverPanel) {
326
+ return;
327
+ }
328
+
329
+ var e = e || window.event;
330
+
331
+ var delta = 0;
332
+ if (e.wheelDelta) {
333
+ delta = -e.wheelDelta / 120;
334
+ }
335
+ if (e.detail) {
336
+ delta = e.detail / 3;
337
+ }
338
+
339
+ var target = e.target || e.srcTarget || e.srcElement;
340
+ if ($(target).closest('.' + o.wrapperClass).is(me.parent())) {
341
+ // scroll content
342
+ scrollContent(delta, true);
343
+ }
344
+
345
+ // stop window scroll
346
+ if (e.preventDefault && !releaseScroll) {
347
+ e.preventDefault();
348
+ }
349
+ if (!releaseScroll) {
350
+ e.returnValue = false;
351
+ }
352
+ }
353
+
354
+ function scrollContent(y, isWheel, isJump)
355
+ {
356
+ releaseScroll = false;
357
+ var delta = y;
358
+ var maxTop = me.outerHeight() - bar.outerHeight();
359
+
360
+ if (isWheel)
361
+ {
362
+ // move bar with mouse wheel
363
+ delta = parseInt(bar.css('top')) + y * parseInt(o.wheelStep) / 100 * bar.outerHeight();
364
+
365
+ // move bar, make sure it doesn't go out
366
+ delta = Math.min(Math.max(delta, 0), maxTop);
367
+
368
+ // if scrolling down, make sure a fractional change to the
369
+ // scroll position isn't rounded away when the scrollbar's CSS is set
370
+ // this flooring of delta would happened automatically when
371
+ // bar.css is set below, but we floor here for clarity
372
+ delta = (y > 0) ? Math.ceil(delta) : Math.floor(delta);
373
+
374
+ // scroll the scrollbar
375
+ bar.css({top: delta + 'px'});
376
+ }
377
+
378
+ // calculate actual scroll amount
379
+ percentScroll = parseInt(bar.css('top')) / (me.outerHeight() - bar.outerHeight());
380
+ delta = percentScroll * (me[0].scrollHeight - me.outerHeight());
381
+
382
+ if (isJump)
383
+ {
384
+ delta = y;
385
+ var offsetTop = delta / me[0].scrollHeight * me.outerHeight();
386
+ offsetTop = Math.min(Math.max(offsetTop, 0), maxTop);
387
+ bar.css({top: offsetTop + 'px'});
388
+ }
389
+
390
+ // scroll content
391
+ me.scrollTop(delta);
392
+
393
+ // fire scrolling event
394
+ me.trigger('slimscrolling', ~~delta);
395
+
396
+ // ensure bar is visible
397
+ showBar();
398
+
399
+ // trigger hide when scroll is stopped
400
+ hideBar();
401
+ }
402
+
403
+ function attachWheel()
404
+ {
405
+ if (window.addEventListener)
406
+ {
407
+ this.addEventListener('DOMMouseScroll', _onWheel, false);
408
+ this.addEventListener('mousewheel', _onWheel, false);
409
+ }
410
+ else
411
+ {
412
+ document.attachEvent("onmousewheel", _onWheel)
413
+ }
414
+ }
415
+
416
+ function getBarHeight()
417
+ {
418
+ // calculate scrollbar height and make sure it is not too small
419
+ barHeight = Math.max((me.outerHeight() / me[0].scrollHeight) * me.outerHeight(), minBarHeight);
420
+ bar.css({height: barHeight + 'px'});
421
+
422
+ // hide scrollbar if content is not long enough
423
+ var display = barHeight == me.outerHeight() ? 'none' : 'block';
424
+ bar.css({display: display});
425
+ }
426
+
427
+ function showBar()
428
+ {
429
+ // recalculate bar height
430
+ getBarHeight();
431
+ clearTimeout(queueHide);
432
+
433
+ // when bar reached top or bottom
434
+ if (percentScroll == ~~percentScroll)
435
+ {
436
+ //release wheel
437
+ releaseScroll = o.allowPageScroll;
438
+
439
+ // publish approporiate event
440
+ if (lastScroll != percentScroll)
441
+ {
442
+ var msg = (~~percentScroll == 0) ? 'top' : 'bottom';
443
+ me.trigger('slimscroll', msg);
444
+ }
445
+ }
446
+ else
447
+ {
448
+ releaseScroll = false;
449
+ }
450
+ lastScroll = percentScroll;
451
+
452
+ // show only when required
453
+ if (barHeight >= me.outerHeight()) {
454
+ //allow window scroll
455
+ releaseScroll = true;
456
+ return;
457
+ }
458
+ bar.stop(true, true).fadeIn('fast');
459
+ if (o.railVisible) {
460
+ rail.stop(true, true).fadeIn('fast');
461
+ }
462
+ }
463
+
464
+ function hideBar()
465
+ {
466
+ // only hide when options allow it
467
+ if (!o.alwaysVisible)
468
+ {
469
+ queueHide = setTimeout(function () {
470
+ if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg)
471
+ {
472
+ bar.fadeOut('slow');
473
+ rail.fadeOut('slow');
474
+ }
475
+ }, 1000);
476
+ }
477
+ }
478
+
479
+ });
480
+
481
+ // maintain chainability
482
+ return this;
483
+ }
484
+ });
485
+
486
+ $.fn.extend({
487
+ slimscroll: $.fn.slimScroll
488
+ });
489
+
490
+ })(jQuery);
@@ -0,0 +1,38 @@
1
+ MIN_PATTERN = '.min'
2
+ CSS_PATTERN = '.css'
3
+
4
+ filenames_to_delete = []
5
+
6
+ # check for min styles
7
+ puts "================"
8
+ Dir.glob('stylesheets/adminlte/plugins/**/*.css') do |filename|
9
+ basename = File.basename(filename)
10
+ dirname = File.dirname(filename)
11
+
12
+ # check if non min versions exists
13
+ if basename.include? MIN_PATTERN
14
+ max_basename = basename.gsub(MIN_PATTERN, '')
15
+ if File.exist? File.join(dirname, max_basename)
16
+ puts "- File has max, add to remove #{filename}"
17
+ filenames_to_delete << filename
18
+ end
19
+ end
20
+ end
21
+
22
+ puts "================"
23
+ # check all non styles
24
+ Dir.glob('stylesheets/adminlte/plugins/**/*') do |filename|
25
+ next if File.directory? filename
26
+ basename = File.basename(filename)
27
+ unless basename.include? CSS_PATTERN
28
+ puts "- Non CSS file, add to remove #{filename}"
29
+ filenames_to_delete << filename
30
+ end
31
+ end
32
+
33
+ # delete files
34
+ puts "================"
35
+ filenames_to_delete.uniq!
36
+ puts "- Files to delete #{filenames_to_delete.size}"
37
+ n_deleted_files = File.delete *filenames_to_delete
38
+ puts "\t #{n_deleted_files} files deleted"
@@ -0,0 +1,38 @@
1
+ MIN_PATTERN = '.min'
2
+ JS_PATTERN = '.js'
3
+
4
+ filenames_to_delete = []
5
+
6
+ # check for min styles
7
+ puts "================"
8
+ Dir.glob('javascripts/adminlte/plugins/**/*.js') do |filename|
9
+ basename = File.basename(filename)
10
+ dirname = File.dirname(filename)
11
+
12
+ # check if non min versions exists
13
+ if basename.include? MIN_PATTERN
14
+ max_basename = basename.gsub(MIN_PATTERN, '')
15
+ if File.exist? File.join(dirname, max_basename)
16
+ puts "- File has max, add to remove #{filename}"
17
+ filenames_to_delete << filename
18
+ end
19
+ end
20
+ end
21
+
22
+ puts "================"
23
+ # check all non styles
24
+ Dir.glob('javascripts/adminlte/plugins/**/*') do |filename|
25
+ next if File.directory? filename
26
+ basename = File.basename(filename)
27
+ unless basename.include? JS_PATTERN
28
+ puts "- Non CSS file, add to remove #{filename}"
29
+ filenames_to_delete << filename
30
+ end
31
+ end
32
+
33
+ # delete files
34
+ puts "================"
35
+ filenames_to_delete.uniq!
36
+ puts "- Files to delete #{filenames_to_delete.size}"
37
+ n_deleted_files = File.delete *filenames_to_delete
38
+ puts "\t #{n_deleted_files} files deleted"