adminlte-rails 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +15 -0
  7. data/adminlte-rails.gemspec +21 -0
  8. data/lib/adminlte-rails.rb +6 -0
  9. data/lib/adminlte-rails/engine.rb +9 -0
  10. data/lib/adminlte-rails/source_file.rb +146 -0
  11. data/lib/adminlte-rails/version.rb +5 -0
  12. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  13. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  14. data/vendor/assets/fonts/fontawesome-webfont.svg +414 -0
  15. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  16. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  17. data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  18. data/vendor/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  19. data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  20. data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  21. data/vendor/assets/fonts/ionicons.eot +0 -0
  22. data/vendor/assets/fonts/ionicons.svg +1623 -0
  23. data/vendor/assets/fonts/ionicons.ttf +0 -0
  24. data/vendor/assets/fonts/ionicons.woff +0 -0
  25. data/vendor/assets/images/avatar.png +0 -0
  26. data/vendor/assets/images/avatar2.png +0 -0
  27. data/vendor/assets/images/avatar3.png +0 -0
  28. data/vendor/assets/javascripts/admin-lte.js +1054 -0
  29. data/vendor/assets/javascripts/bootstrap.min.js +7 -0
  30. data/vendor/assets/stylesheets/admin-lte.css +3535 -0
  31. data/vendor/assets/stylesheets/bootstrap.scss +7118 -0
  32. data/vendor/assets/stylesheets/datatables/dataTables.bootstrap.css +223 -0
  33. data/vendor/assets/stylesheets/datatables/images/sort_asc.png +0 -0
  34. data/vendor/assets/stylesheets/datatables/images/sort_asc_disabled.png +0 -0
  35. data/vendor/assets/stylesheets/datatables/images/sort_both.png +0 -0
  36. data/vendor/assets/stylesheets/datatables/images/sort_desc.png +0 -0
  37. data/vendor/assets/stylesheets/datatables/images/sort_desc_disabled.png +0 -0
  38. data/vendor/assets/stylesheets/font-awesome.scss +1338 -0
  39. data/vendor/assets/stylesheets/iCheck/all.scss +61 -0
  40. data/vendor/assets/stylesheets/iCheck/flat/_all.css +560 -0
  41. data/vendor/assets/stylesheets/iCheck/flat/aero.css +56 -0
  42. data/vendor/assets/stylesheets/iCheck/flat/aero.png +0 -0
  43. data/vendor/assets/stylesheets/iCheck/flat/aero@2x.png +0 -0
  44. data/vendor/assets/stylesheets/iCheck/flat/blue.css +56 -0
  45. data/vendor/assets/stylesheets/iCheck/flat/blue.png +0 -0
  46. data/vendor/assets/stylesheets/iCheck/flat/blue@2x.png +0 -0
  47. data/vendor/assets/stylesheets/iCheck/flat/flat.css +56 -0
  48. data/vendor/assets/stylesheets/iCheck/flat/flat.png +0 -0
  49. data/vendor/assets/stylesheets/iCheck/flat/flat@2x.png +0 -0
  50. data/vendor/assets/stylesheets/iCheck/flat/green.css +56 -0
  51. data/vendor/assets/stylesheets/iCheck/flat/green.png +0 -0
  52. data/vendor/assets/stylesheets/iCheck/flat/green@2x.png +0 -0
  53. data/vendor/assets/stylesheets/iCheck/flat/grey.css +56 -0
  54. data/vendor/assets/stylesheets/iCheck/flat/grey.png +0 -0
  55. data/vendor/assets/stylesheets/iCheck/flat/grey@2x.png +0 -0
  56. data/vendor/assets/stylesheets/iCheck/flat/orange.css +56 -0
  57. data/vendor/assets/stylesheets/iCheck/flat/orange.png +0 -0
  58. data/vendor/assets/stylesheets/iCheck/flat/orange@2x.png +0 -0
  59. data/vendor/assets/stylesheets/iCheck/flat/pink.css +56 -0
  60. data/vendor/assets/stylesheets/iCheck/flat/pink.png +0 -0
  61. data/vendor/assets/stylesheets/iCheck/flat/pink@2x.png +0 -0
  62. data/vendor/assets/stylesheets/iCheck/flat/purple.css +56 -0
  63. data/vendor/assets/stylesheets/iCheck/flat/purple.png +0 -0
  64. data/vendor/assets/stylesheets/iCheck/flat/purple@2x.png +0 -0
  65. data/vendor/assets/stylesheets/iCheck/flat/red.css +56 -0
  66. data/vendor/assets/stylesheets/iCheck/flat/red.png +0 -0
  67. data/vendor/assets/stylesheets/iCheck/flat/red@2x.png +0 -0
  68. data/vendor/assets/stylesheets/iCheck/flat/yellow.css +56 -0
  69. data/vendor/assets/stylesheets/iCheck/flat/yellow.png +0 -0
  70. data/vendor/assets/stylesheets/iCheck/flat/yellow@2x.png +0 -0
  71. data/vendor/assets/stylesheets/ionicons.scss +2183 -0
  72. metadata +184 -0
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,1054 @@
1
+ /*!
2
+ * Author: Abdullah A Almsaeed
3
+ * Date: 4 Jan 2014
4
+ * Description:
5
+ * This file should be included in all pages
6
+ !**/
7
+
8
+ /*
9
+ * Global variables. If you change any of these vars, don't forget
10
+ * to change the values in the less files!
11
+ */
12
+ var left_side_width = 220; //Sidebar width in pixels
13
+
14
+ $(function() {
15
+ "use strict";
16
+
17
+ //Enable sidebar toggle
18
+ $("[data-toggle='offcanvas']").click(function(e) {
19
+ e.preventDefault();
20
+
21
+ //If window is small enough, enable sidebar push menu
22
+ if ($(window).width() <= 992) {
23
+ $('.row-offcanvas').toggleClass('active');
24
+ $('.left-side').removeClass("collapse-left");
25
+ $(".right-side").removeClass("strech");
26
+ $('.row-offcanvas').toggleClass("relative");
27
+ } else {
28
+ //Else, enable content streching
29
+ $('.left-side').toggleClass("collapse-left");
30
+ $(".right-side").toggleClass("strech");
31
+ }
32
+ });
33
+
34
+ //Add hover support for touch devices
35
+ $('.btn').bind('touchstart', function() {
36
+ $(this).addClass('hover');
37
+ }).bind('touchend', function() {
38
+ $(this).removeClass('hover');
39
+ });
40
+
41
+ //Activate tooltips
42
+ $("[data-toggle='tooltip']").tooltip();
43
+
44
+ /*
45
+ * Add collapse and remove events to boxes
46
+ */
47
+ $("[data-widget='collapse']").click(function() {
48
+ //Find the box parent
49
+ var box = $(this).parents(".box").first();
50
+ //Find the body and the footer
51
+ var bf = box.find(".box-body, .box-footer");
52
+ if (!box.hasClass("collapsed-box")) {
53
+ box.addClass("collapsed-box");
54
+ //Convert minus into plus
55
+ $(this).children(".fa-minus").removeClass("fa-minus").addClass("fa-plus");
56
+ bf.slideUp();
57
+ } else {
58
+ box.removeClass("collapsed-box");
59
+ //Convert plus into minus
60
+ $(this).children(".fa-plus").removeClass("fa-plus").addClass("fa-minus");
61
+ bf.slideDown();
62
+ }
63
+ });
64
+
65
+ /*
66
+ * ADD SLIMSCROLL TO THE TOP NAV DROPDOWNS
67
+ * ---------------------------------------
68
+ */
69
+ $(".navbar .menu").slimscroll({
70
+ height: "200px",
71
+ alwaysVisible: false,
72
+ size: "3px"
73
+ }).css("width", "100%");
74
+
75
+ /*
76
+ * INITIALIZE BUTTON TOGGLE
77
+ * ------------------------
78
+ */
79
+ $('.btn-group[data-toggle="btn-toggle"]').each(function() {
80
+ var group = $(this);
81
+ $(this).find(".btn").click(function(e) {
82
+ group.find(".btn.active").removeClass("active");
83
+ $(this).addClass("active");
84
+ e.preventDefault();
85
+ });
86
+
87
+ });
88
+
89
+ $("[data-widget='remove']").click(function() {
90
+ //Find the box parent
91
+ var box = $(this).parents(".box").first();
92
+ box.slideUp();
93
+ });
94
+
95
+ /* Sidebar tree view */
96
+ $(".sidebar .treeview").tree();
97
+
98
+ /*
99
+ * Make sure that the sidebar is streched full height
100
+ * ---------------------------------------------
101
+ * We are gonna assign a min-height value every time the
102
+ * wrapper gets resized and upon page load. We will use
103
+ * Ben Alman's method for detecting the resize event.
104
+ *
105
+ **/
106
+ function _fix() {
107
+ //Get window height and the wrapper height
108
+ var height = $(window).height() - $("body > .header").height() - ($("body > .footer").outerHeight() || 0);
109
+ $(".wrapper").css("min-height", height + "px");
110
+ var content = $(".wrapper").height();
111
+ //If the wrapper height is greater than the window
112
+ if (content > height)
113
+ //then set sidebar height to the wrapper
114
+ $(".left-side, html, body").css("min-height", content + "px");
115
+ else {
116
+ //Otherwise, set the sidebar to the height of the window
117
+ $(".left-side, html, body").css("min-height", height + "px");
118
+ }
119
+ }
120
+ //Fire upon load
121
+ _fix();
122
+ //Fire when wrapper is resized
123
+ $(".wrapper").resize(function() {
124
+ _fix();
125
+ fix_sidebar();
126
+ });
127
+
128
+ //Fix the fixed layout sidebar scroll bug
129
+ fix_sidebar();
130
+
131
+ /*
132
+ * We are gonna initialize all checkbox and radio inputs to
133
+ * iCheck plugin in.
134
+ * You can find the documentation at http://fronteed.com/iCheck/
135
+ */
136
+ $("input[type='checkbox']:not(.simple), input[type='radio']:not(.simple)").iCheck({
137
+ checkboxClass: 'icheckbox_minimal',
138
+ radioClass: 'iradio_minimal'
139
+ });
140
+
141
+ });
142
+ function fix_sidebar() {
143
+ //Make sure the body tag has the .fixed class
144
+ if (!$("body").hasClass("fixed")) {
145
+ return;
146
+ }
147
+
148
+ //Add slimscroll
149
+ $(".sidebar").slimscroll({
150
+ height: ($(window).height() - $(".header").height()) + "px",
151
+ color: "rgba(0,0,0,0.2)"
152
+ });
153
+ }
154
+
155
+ /*END DEMO*/
156
+ $(window).load(function() {
157
+ /*! pace 0.4.17 */
158
+ (function() {
159
+ var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V = [].slice, W = {}.hasOwnProperty, X = function(a, b) {
160
+ function c() {
161
+ this.constructor = a
162
+ }
163
+ for (var d in b)
164
+ W.call(b, d) && (a[d] = b[d]);
165
+ return c.prototype = b.prototype, a.prototype = new c, a.__super__ = b.prototype, a
166
+ }, Y = [].indexOf || function(a) {
167
+ for (var b = 0, c = this.length; c > b; b++)
168
+ if (b in this && this[b] === a)
169
+ return b;
170
+ return-1
171
+ };
172
+ for (t = {catchupTime:500, initialRate:.03, minTime:500, ghostTime:500, maxProgressPerFrame:10, easeFactor:1.25, startOnPageLoad:!0, restartOnPushState:!0, restartOnRequestAfter:500, target:"body", elements:{checkInterval:100, selectors:["body"]}, eventLag:{minSamples:10, sampleCount:3, lagThreshold:3}, ajax:{trackMethods:["GET"], trackWebSockets:!1}}, B = function() {
173
+ var a;
174
+ return null != (a = "undefined" != typeof performance && null !== performance ? "function" == typeof performance.now ? performance.now() : void 0 : void 0) ? a : +new Date
175
+ }, D = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame, s = window.cancelAnimationFrame || window.mozCancelAnimationFrame, null == D && (D = function(a) {
176
+ return setTimeout(a, 50)
177
+ }, s = function(a) {
178
+ return clearTimeout(a)
179
+ }), F = function(a) {
180
+ var b, c;
181
+ return b = B(), (c = function() {
182
+ var d;
183
+ return d = B() - b, d >= 33 ? (b = B(), a(d, function() {
184
+ return D(c)
185
+ })) : setTimeout(c, 33 - d)
186
+ })()
187
+ }, E = function() {
188
+ var a, b, c;
189
+ return c = arguments[0], b = arguments[1], a = 3 <= arguments.length ? V.call(arguments, 2) : [], "function" == typeof c[b] ? c[b].apply(c, a) : c[b]
190
+ }, u = function() {
191
+ var a, b, c, d, e, f, g;
192
+ for (b = arguments[0], d = 2 <= arguments.length?V.call(arguments, 1):[], f = 0, g = d.length; g > f; f++)
193
+ if (c = d[f])
194
+ for (a in c)
195
+ W.call(c, a) && (e = c[a], null != b[a] && "object" == typeof b[a] && null != e && "object" == typeof e ? u(b[a], e) : b[a] = e);
196
+ return b
197
+ }, p = function(a) {
198
+ var b, c, d, e, f;
199
+ for (c = b = 0, e = 0, f = a.length; f > e; e++)
200
+ d = a[e], c += Math.abs(d), b++;
201
+ return c / b
202
+ }, w = function(a, b) {
203
+ var c, d, e;
204
+ if (null == a && (a = "options"), null == b && (b = !0), e = document.querySelector("[data-pace-" + a + "]")) {
205
+ if (c = e.getAttribute("data-pace-" + a), !b)
206
+ return c;
207
+ try {
208
+ return JSON.parse(c)
209
+ } catch (f) {
210
+ return d = f, "undefined" != typeof console && null !== console ? console.error("Error parsing inline pace options", d) : void 0
211
+ }
212
+ }
213
+ }, g = function() {
214
+ function a() {
215
+ }
216
+ return a.prototype.on = function(a, b, c, d) {
217
+ var e;
218
+ return null == d && (d = !1), null == this.bindings && (this.bindings = {}), null == (e = this.bindings)[a] && (e[a] = []), this.bindings[a].push({handler: b, ctx: c, once: d})
219
+ }, a.prototype.once = function(a, b, c) {
220
+ return this.on(a, b, c, !0)
221
+ }, a.prototype.off = function(a, b) {
222
+ var c, d, e;
223
+ if (null != (null != (d = this.bindings) ? d[a] : void 0)) {
224
+ if (null == b)
225
+ return delete this.bindings[a];
226
+ for (c = 0, e = []; c < this.bindings[a].length; )
227
+ this.bindings[a][c].handler === b ? e.push(this.bindings[a].splice(c, 1)) : e.push(c++);
228
+ return e
229
+ }
230
+ }, a.prototype.trigger = function() {
231
+ var a, b, c, d, e, f, g, h, i;
232
+ if (c = arguments[0], a = 2 <= arguments.length ? V.call(arguments, 1) : [], null != (g = this.bindings) ? g[c] : void 0) {
233
+ for (e = 0, i = []; e < this.bindings[c].length; )
234
+ h = this.bindings[c][e], d = h.handler, b = h.ctx, f = h.once, d.apply(null != b ? b : this, a), f ? i.push(this.bindings[c].splice(e, 1)) : i.push(e++);
235
+ return i
236
+ }
237
+ }, a
238
+ }(), null == window.Pace && (window.Pace = {}), u(Pace, g.prototype), C = Pace.options = u({}, t, window.paceOptions, w()), S = ["ajax", "document", "eventLag", "elements"], O = 0, Q = S.length; Q > O; O++)
239
+ I = S[O], C[I] === !0 && (C[I] = t[I]);
240
+ i = function(a) {
241
+ function b() {
242
+ return T = b.__super__.constructor.apply(this, arguments)
243
+ }
244
+ return X(b, a), b
245
+ }(Error), b = function() {
246
+ function a() {
247
+ this.progress = 0
248
+ }
249
+ return a.prototype.getElement = function() {
250
+ var a;
251
+ if (null == this.el) {
252
+ if (a = document.querySelector(C.target), !a)
253
+ throw new i;
254
+ this.el = document.createElement("div"), this.el.className = "pace pace-active", document.body.className = document.body.className.replace("pace-done", ""), document.body.className += " pace-running", this.el.innerHTML = '<div class="pace-progress">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>', null != a.firstChild ? a.insertBefore(this.el, a.firstChild) : a.appendChild(this.el)
255
+ }
256
+ return this.el
257
+ }, a.prototype.finish = function() {
258
+ var a;
259
+ return a = this.getElement(), a.className = a.className.replace("pace-active", ""), a.className += " pace-inactive", document.body.className = document.body.className.replace("pace-running", ""), document.body.className += " pace-done"
260
+ }, a.prototype.update = function(a) {
261
+ return this.progress = a, this.render()
262
+ }, a.prototype.destroy = function() {
263
+ try {
264
+ this.getElement().parentNode.removeChild(this.getElement())
265
+ } catch (a) {
266
+ i = a
267
+ }
268
+ return this.el = void 0
269
+ }, a.prototype.render = function() {
270
+ var a, b;
271
+ return null == document.querySelector(C.target) ? !1 : (a = this.getElement(), a.children[0].style.width = "" + this.progress + "%", (!this.lastRenderedProgress || this.lastRenderedProgress | 0 !== this.progress | 0) && (a.children[0].setAttribute("data-progress-text", "" + (0 | this.progress) + "%"), this.progress >= 100 ? b = "99" : (b = this.progress < 10 ? "0" : "", b += 0 | this.progress), a.children[0].setAttribute("data-progress", "" + b)), this.lastRenderedProgress = this.progress)
272
+ }, a.prototype.done = function() {
273
+ return this.progress >= 100
274
+ }, a
275
+ }(), h = function() {
276
+ function a() {
277
+ this.bindings = {}
278
+ }
279
+ return a.prototype.trigger = function(a, b) {
280
+ var c, d, e, f, g;
281
+ if (null != this.bindings[a]) {
282
+ for (f = this.bindings[a], g = [], d = 0, e = f.length; e > d; d++)
283
+ c = f[d], g.push(c.call(this, b));
284
+ return g
285
+ }
286
+ }, a.prototype.on = function(a, b) {
287
+ var c;
288
+ return null == (c = this.bindings)[a] && (c[a] = []), this.bindings[a].push(b)
289
+ }, a
290
+ }(), N = window.XMLHttpRequest, M = window.XDomainRequest, L = window.WebSocket, v = function(a, b) {
291
+ var c, d, e, f;
292
+ f = [];
293
+ for (d in b.prototype)
294
+ try {
295
+ e = b.prototype[d], null == a[d] && "function" != typeof e ? f.push(a[d] = e) : f.push(void 0)
296
+ } catch (g) {
297
+ c = g
298
+ }
299
+ return f
300
+ }, z = [], Pace.ignore = function() {
301
+ var a, b, c;
302
+ return b = arguments[0], a = 2 <= arguments.length ? V.call(arguments, 1) : [], z.unshift("ignore"), c = b.apply(null, a), z.shift(), c
303
+ }, Pace.track = function() {
304
+ var a, b, c;
305
+ return b = arguments[0], a = 2 <= arguments.length ? V.call(arguments, 1) : [], z.unshift("track"), c = b.apply(null, a), z.shift(), c
306
+ }, H = function(a) {
307
+ var b;
308
+ if (null == a && (a = "GET"), "track" === z[0])
309
+ return"force";
310
+ if (!z.length && C.ajax) {
311
+ if ("socket" === a && C.ajax.trackWebSockets)
312
+ return!0;
313
+ if (b = a.toUpperCase(), Y.call(C.ajax.trackMethods, b) >= 0)
314
+ return!0
315
+ }
316
+ return!1
317
+ }, j = function(a) {
318
+ function b() {
319
+ var a, c = this;
320
+ b.__super__.constructor.apply(this, arguments), a = function(a) {
321
+ var b;
322
+ return b = a.open, a.open = function(d, e) {
323
+ return H(d) && c.trigger("request", {type: d, url: e, request: a}), b.apply(a, arguments)
324
+ }
325
+ }, window.XMLHttpRequest = function(b) {
326
+ var c;
327
+ return c = new N(b), a(c), c
328
+ }, v(window.XMLHttpRequest, N), null != M && (window.XDomainRequest = function() {
329
+ var b;
330
+ return b = new M, a(b), b
331
+ }, v(window.XDomainRequest, M)), null != L && C.ajax.trackWebSockets && (window.WebSocket = function(a, b) {
332
+ var d;
333
+ return d = new L(a, b), H("socket") && c.trigger("request", {type: "socket", url: a, protocols: b, request: d}), d
334
+ }, v(window.WebSocket, L))
335
+ }
336
+ return X(b, a), b
337
+ }(h), P = null, x = function() {
338
+ return null == P && (P = new j), P
339
+ }, x().on("request", function(b) {
340
+ var c, d, e, f;
341
+ return f = b.type, e = b.request, Pace.running || C.restartOnRequestAfter === !1 && "force" !== H(f) ? void 0 : (d = arguments, c = C.restartOnRequestAfter || 0, "boolean" == typeof c && (c = 0), setTimeout(function() {
342
+ var b, c, g, h, i, j;
343
+ if (b = "socket" === f ? e.readyState < 2 : 0 < (h = e.readyState) && 4 > h) {
344
+ for (Pace.restart(), i = Pace.sources, j = [], c = 0, g = i.length; g > c; c++) {
345
+ if (I = i[c], I instanceof a) {
346
+ I.watch.apply(I, d);
347
+ break
348
+ }
349
+ j.push(void 0)
350
+ }
351
+ return j
352
+ }
353
+ }, c))
354
+ }), a = function() {
355
+ function a() {
356
+ var a = this;
357
+ this.elements = [], x().on("request", function() {
358
+ return a.watch.apply(a, arguments)
359
+ })
360
+ }
361
+ return a.prototype.watch = function(a) {
362
+ var b, c, d;
363
+ return d = a.type, b = a.request, c = "socket" === d ? new m(b) : new n(b), this.elements.push(c)
364
+ }, a
365
+ }(), n = function() {
366
+ function a(a) {
367
+ var b, c, d, e, f, g, h = this;
368
+ if (this.progress = 0, null != window.ProgressEvent)
369
+ for (c = null, a.addEventListener("progress", function(a) {
370
+ return h.progress = a.lengthComputable ? 100 * a.loaded / a.total : h.progress + (100 - h.progress) / 2
371
+ }), g = ["load", "abort", "timeout", "error"], d = 0, e = g.length; e > d; d++)
372
+ b = g[d], a.addEventListener(b, function() {
373
+ return h.progress = 100
374
+ });
375
+ else
376
+ f = a.onreadystatechange, a.onreadystatechange = function() {
377
+ var b;
378
+ return 0 === (b = a.readyState) || 4 === b ? h.progress = 100 : 3 === a.readyState && (h.progress = 50), "function" == typeof f ? f.apply(null, arguments) : void 0
379
+ }
380
+ }
381
+ return a
382
+ }(), m = function() {
383
+ function a(a) {
384
+ var b, c, d, e, f = this;
385
+ for (this.progress = 0, e = ["error", "open"], c = 0, d = e.length; d > c; c++)
386
+ b = e[c], a.addEventListener(b, function() {
387
+ return f.progress = 100
388
+ })
389
+ }
390
+ return a
391
+ }(), d = function() {
392
+ function a(a) {
393
+ var b, c, d, f;
394
+ for (null == a && (a = {}), this.elements = [], null == a.selectors && (a.selectors = []), f = a.selectors, c = 0, d = f.length; d > c; c++)
395
+ b = f[c], this.elements.push(new e(b))
396
+ }
397
+ return a
398
+ }(), e = function() {
399
+ function a(a) {
400
+ this.selector = a, this.progress = 0, this.check()
401
+ }
402
+ return a.prototype.check = function() {
403
+ var a = this;
404
+ return document.querySelector(this.selector) ? this.done() : setTimeout(function() {
405
+ return a.check()
406
+ }, C.elements.checkInterval)
407
+ }, a.prototype.done = function() {
408
+ return this.progress = 100
409
+ }, a
410
+ }(), c = function() {
411
+ function a() {
412
+ var a, b, c = this;
413
+ this.progress = null != (b = this.states[document.readyState]) ? b : 100, a = document.onreadystatechange, document.onreadystatechange = function() {
414
+ return null != c.states[document.readyState] && (c.progress = c.states[document.readyState]), "function" == typeof a ? a.apply(null, arguments) : void 0
415
+ }
416
+ }
417
+ return a.prototype.states = {loading: 0, interactive: 50, complete: 100}, a
418
+ }(), f = function() {
419
+ function a() {
420
+ var a, b, c, d, e, f = this;
421
+ this.progress = 0, a = 0, e = [], d = 0, c = B(), b = setInterval(function() {
422
+ var g;
423
+ return g = B() - c - 50, c = B(), e.push(g), e.length > C.eventLag.sampleCount && e.shift(), a = p(e), ++d >= C.eventLag.minSamples && a < C.eventLag.lagThreshold ? (f.progress = 100, clearInterval(b)) : f.progress = 100 * (3 / (a + 3))
424
+ }, 50)
425
+ }
426
+ return a
427
+ }(), l = function() {
428
+ function a(a) {
429
+ this.source = a, this.last = this.sinceLastUpdate = 0, this.rate = C.initialRate, this.catchup = 0, this.progress = this.lastProgress = 0, null != this.source && (this.progress = E(this.source, "progress"))
430
+ }
431
+ return a.prototype.tick = function(a, b) {
432
+ var c;
433
+ return null == b && (b = E(this.source, "progress")), b >= 100 && (this.done = !0), b === this.last ? this.sinceLastUpdate += a : (this.sinceLastUpdate && (this.rate = (b - this.last) / this.sinceLastUpdate), this.catchup = (b - this.progress) / C.catchupTime, this.sinceLastUpdate = 0, this.last = b), b > this.progress && (this.progress += this.catchup * a), c = 1 - Math.pow(this.progress / 100, C.easeFactor), this.progress += c * this.rate * a, this.progress = Math.min(this.lastProgress + C.maxProgressPerFrame, this.progress), this.progress = Math.max(0, this.progress), this.progress = Math.min(100, this.progress), this.lastProgress = this.progress, this.progress
434
+ }, a
435
+ }(), J = null, G = null, q = null, K = null, o = null, r = null, Pace.running = !1, y = function() {
436
+ return C.restartOnPushState ? Pace.restart() : void 0
437
+ }, null != window.history.pushState && (R = window.history.pushState, window.history.pushState = function() {
438
+ return y(), R.apply(window.history, arguments)
439
+ }), null != window.history.replaceState && (U = window.history.replaceState, window.history.replaceState = function() {
440
+ return y(), U.apply(window.history, arguments)
441
+ }), k = {ajax: a, elements: d, document: c, eventLag: f}, (A = function() {
442
+ var a, c, d, e, f, g, h, i;
443
+ for (Pace.sources = J = [], g = ["ajax", "elements", "document", "eventLag"], c = 0, e = g.length; e > c; c++)
444
+ a = g[c], C[a] !== !1 && J.push(new k[a](C[a]));
445
+ for (i = null != (h = C.extraSources)?h:[], d = 0, f = i.length; f > d; d++)
446
+ I = i[d], J.push(new I(C));
447
+ return Pace.bar = q = new b, G = [], K = new l
448
+ })(), Pace.stop = function() {
449
+ return Pace.trigger("stop"), Pace.running = !1, q.destroy(), r = !0, null != o && ("function" == typeof s && s(o), o = null), A()
450
+ }, Pace.restart = function() {
451
+ return Pace.trigger("restart"), Pace.stop(), Pace.start()
452
+ }, Pace.go = function() {
453
+ return Pace.running = !0, q.render(), r = !1, o = F(function(a, b) {
454
+ var c, d, e, f, g, h, i, j, k, m, n, o, p, s, t, u, v;
455
+ for (j = 100 - q.progress, d = o = 0, e = !0, h = p = 0, t = J.length; t > p; h = ++p)
456
+ for (I = J[h], m = null != G[h]?G[h]:G[h] = [], g = null != (v = I.elements)?v:[I], i = s = 0, u = g.length; u > s; i = ++s)
457
+ f = g[i], k = null != m[i] ? m[i] : m[i] = new l(f), e &= k.done, k.done || (d++, o += k.tick(a));
458
+ return c = o / d, q.update(K.tick(a, c)), n = B(), q.done() || e || r ? (q.update(100), Pace.trigger("done"), setTimeout(function() {
459
+ return q.finish(), Pace.running = !1, Pace.trigger("hide")
460
+ }, Math.max(C.ghostTime, Math.min(C.minTime, B() - n)))) : b()
461
+ })
462
+ }, Pace.start = function(a) {
463
+ u(C, a), Pace.running = !0;
464
+ try {
465
+ q.render()
466
+ } catch (b) {
467
+ i = b
468
+ }
469
+ return document.querySelector(".pace") ? (Pace.trigger("start"), Pace.go()) : setTimeout(Pace.start, 50)
470
+ }, "function" == typeof define && define.amd ? define('theme-app', [], function() {
471
+ return Pace
472
+ }) : "object" == typeof exports ? module.exports = Pace : C.startOnPageLoad && Pace.start()
473
+ }).call(this);
474
+ });
475
+
476
+ /*
477
+ * BOX REFRESH BUTTON
478
+ * ------------------
479
+ * This is a custom plugin to use with the compenet BOX. It allows you to add
480
+ * a refresh button to the box. It converts the box's state to a loading state.
481
+ *
482
+ * USAGE:
483
+ * $("#box-widget").boxRefresh( options );
484
+ * */
485
+ (function($) {
486
+ "use strict";
487
+
488
+ $.fn.boxRefresh = function(options) {
489
+
490
+ // Render options
491
+ var settings = $.extend({
492
+ //Refressh button selector
493
+ trigger: ".refresh-btn",
494
+ //File source to be loaded (e.g: ajax/src.php)
495
+ source: "",
496
+ //Callbacks
497
+ onLoadStart: function(box) {
498
+ }, //Right after the button has been clicked
499
+ onLoadDone: function(box) {
500
+ } //When the source has been loaded
501
+
502
+ }, options);
503
+
504
+ //The overlay
505
+ var overlay = $('<div class="overlay"></div><div class="loading-img"></div>');
506
+
507
+ return this.each(function() {
508
+ //if a source is specified
509
+ if (settings.source === "") {
510
+ if (console) {
511
+ console.log("Please specify a source first - boxRefresh()");
512
+ }
513
+ return;
514
+ }
515
+ //the box
516
+ var box = $(this);
517
+ //the button
518
+ var rBtn = box.find(settings.trigger).first();
519
+
520
+ //On trigger click
521
+ rBtn.click(function(e) {
522
+ e.preventDefault();
523
+ //Add loading overlay
524
+ start(box);
525
+
526
+ //Perform ajax call
527
+ box.find(".box-body").load(settings.source, function() {
528
+ done(box);
529
+ });
530
+
531
+
532
+ });
533
+
534
+ });
535
+
536
+ function start(box) {
537
+ //Add overlay and loading img
538
+ box.append(overlay);
539
+
540
+ settings.onLoadStart.call(box);
541
+ }
542
+
543
+ function done(box) {
544
+ //Remove overlay and loading img
545
+ box.find(overlay).remove();
546
+
547
+ settings.onLoadDone.call(box);
548
+ }
549
+
550
+ };
551
+
552
+ })(jQuery);
553
+
554
+ /*
555
+ * SIDEBAR MENU
556
+ * ------------
557
+ * This is a custom plugin for the sidebar menu. It provides a tree view.
558
+ *
559
+ * Usage:
560
+ * $(".sidebar).tree();
561
+ *
562
+ * Note: This plugin does not accept any options. Instead, it only requires a class
563
+ * added to the element that contains a sub-menu.
564
+ *
565
+ * When used with the sidebar, for example, it would look something like this:
566
+ * <ul class='sidebar-menu'>
567
+ * <li class="treeview active">
568
+ * <a href="#>Menu</a>
569
+ * <ul class='treeview-menu'>
570
+ * <li class='active'><a href=#>Level 1</a></li>
571
+ * </ul>
572
+ * </li>
573
+ * </ul>
574
+ *
575
+ * Add .active class to <li> elements if you want the menu to be open automatically
576
+ * on page load. See above for an example.
577
+ */
578
+ (function($) {
579
+ "use strict";
580
+
581
+ $.fn.tree = function() {
582
+
583
+ return this.each(function() {
584
+ var btn = $(this).children("a").first();
585
+ var menu = $(this).children(".treeview-menu").first();
586
+ var isActive = $(this).hasClass('active');
587
+
588
+ //initialize already active menus
589
+ if (isActive) {
590
+ menu.show();
591
+ btn.children(".fa-angle-left").first().removeClass("fa-angle-left").addClass("fa-angle-down");
592
+ }
593
+ //Slide open or close the menu on link click
594
+ btn.click(function(e) {
595
+ e.preventDefault();
596
+ if (isActive) {
597
+ //Slide up to close menu
598
+ menu.slideUp();
599
+ isActive = false;
600
+ btn.children(".fa-angle-down").first().removeClass("fa-angle-down").addClass("fa-angle-left");
601
+ btn.parent("li").removeClass("active");
602
+ } else {
603
+ //Slide down to open menu
604
+ menu.slideDown();
605
+ isActive = true;
606
+ btn.children(".fa-angle-left").first().removeClass("fa-angle-left").addClass("fa-angle-down");
607
+ btn.parent("li").addClass("active");
608
+ }
609
+ });
610
+
611
+ /* Add margins to submenu elements to give it a tree look */
612
+ menu.find("li > a").each(function() {
613
+ var pad = parseInt($(this).css("margin-left")) + 10;
614
+
615
+ $(this).css({"margin-left": pad + "px"});
616
+ });
617
+
618
+ });
619
+
620
+ };
621
+
622
+
623
+ }(jQuery));
624
+
625
+ /*
626
+ * TODO LIST CUSTOM PLUGIN
627
+ * -----------------------
628
+ * This plugin depends on iCheck plugin for checkbox and radio inputs
629
+ */
630
+ (function($) {
631
+ "use strict";
632
+
633
+ $.fn.todolist = function(options) {
634
+ // Render options
635
+ var settings = $.extend({
636
+ //When the user checks the input
637
+ onCheck: function(ele) {
638
+ },
639
+ //When the user unchecks the input
640
+ onUncheck: function(ele) {
641
+ }
642
+ }, options);
643
+
644
+ return this.each(function() {
645
+ $('input', this).on('ifChecked', function(event) {
646
+ var ele = $(this).parents("li").first();
647
+ ele.toggleClass("done");
648
+ settings.onCheck.call(ele);
649
+ });
650
+
651
+ $('input', this).on('ifUnchecked', function(event) {
652
+ var ele = $(this).parents("li").first();
653
+ ele.toggleClass("done");
654
+ settings.onUncheck.call(ele);
655
+ });
656
+ });
657
+ };
658
+
659
+ }(jQuery));
660
+
661
+ /* CENTER ELEMENTS */
662
+ (function($) {
663
+ "use strict";
664
+ jQuery.fn.center = function(parent) {
665
+ if (parent) {
666
+ parent = this.parent();
667
+ } else {
668
+ parent = window;
669
+ }
670
+ this.css({
671
+ "position": "absolute",
672
+ "top": ((($(parent).height() - this.outerHeight()) / 2) + $(parent).scrollTop() + "px"),
673
+ "left": ((($(parent).width() - this.outerWidth()) / 2) + $(parent).scrollLeft() + "px")
674
+ });
675
+ return this;
676
+ }
677
+ }(jQuery));
678
+
679
+ /*
680
+ * jQuery resize event - v1.1 - 3/14/2010
681
+ * http://benalman.com/projects/jquery-resize-plugin/
682
+ *
683
+ * Copyright (c) 2010 "Cowboy" Ben Alman
684
+ * Dual licensed under the MIT and GPL licenses.
685
+ * http://benalman.com/about/license/
686
+ */
687
+ (function($, h, c) {
688
+ var a = $([]), e = $.resize = $.extend($.resize, {}), i, k = "setTimeout", j = "resize", d = j + "-special-event", b = "delay", f = "throttleWindow";
689
+ e[b] = 250;
690
+ e[f] = true;
691
+ $.event.special[j] = {setup: function() {
692
+ if (!e[f] && this[k]) {
693
+ return false;
694
+ }
695
+ var l = $(this);
696
+ a = a.add(l);
697
+ $.data(this, d, {w: l.width(), h: l.height()});
698
+ if (a.length === 1) {
699
+ g();
700
+ }
701
+ }, teardown: function() {
702
+ if (!e[f] && this[k]) {
703
+ return false
704
+ }
705
+ var l = $(this);
706
+ a = a.not(l);
707
+ l.removeData(d);
708
+ if (!a.length) {
709
+ clearTimeout(i);
710
+ }
711
+ }, add: function(l) {
712
+ if (!e[f] && this[k]) {
713
+ return false
714
+ }
715
+ var n;
716
+ function m(s, o, p) {
717
+ var q = $(this), r = $.data(this, d);
718
+ r.w = o !== c ? o : q.width();
719
+ r.h = p !== c ? p : q.height();
720
+ n.apply(this, arguments)
721
+ }
722
+ if ($.isFunction(l)) {
723
+ n = l;
724
+ return m
725
+ } else {
726
+ n = l.handler;
727
+ l.handler = m
728
+ }
729
+ }};
730
+ function g() {
731
+ i = h[k](function() {
732
+ a.each(function() {
733
+ var n = $(this), m = n.width(), l = n.height(), o = $.data(this, d);
734
+ if (m !== o.w || l !== o.h) {
735
+ n.trigger(j, [o.w = m, o.h = l])
736
+ }
737
+ });
738
+ g()
739
+ }, e[b])
740
+ }}
741
+ )(jQuery, this);
742
+
743
+ /*!
744
+ * SlimScroll https://github.com/rochal/jQuery-slimScroll
745
+ * =======================================================
746
+ *
747
+ * Copyright (c) 2011 Piotr Rochala (http://rocha.la) Dual licensed under the MIT
748
+ */
749
+ (function(f) {
750
+ jQuery.fn.extend({slimScroll: function(h) {
751
+ var a = f.extend({width: "auto", height: "250px", size: "7px", color: "#000", position: "right", distance: "1px", start: "top", opacity: 0.4, alwaysVisible: !1, disableFadeOut: !1, railVisible: !1, railColor: "#333", railOpacity: 0.2, railDraggable: !0, railClass: "slimScrollRail", barClass: "slimScrollBar", wrapperClass: "slimScrollDiv", allowPageScroll: !1, wheelStep: 20, touchScrollStep: 200, borderRadius: "0px", railBorderRadius: "0px"}, h);
752
+ this.each(function() {
753
+ function r(d) {
754
+ if (s) {
755
+ d = d ||
756
+ window.event;
757
+ var c = 0;
758
+ d.wheelDelta && (c = -d.wheelDelta / 120);
759
+ d.detail && (c = d.detail / 3);
760
+ f(d.target || d.srcTarget || d.srcElement).closest("." + a.wrapperClass).is(b.parent()) && m(c, !0);
761
+ d.preventDefault && !k && d.preventDefault();
762
+ k || (d.returnValue = !1)
763
+ }
764
+ }
765
+ function m(d, f, h) {
766
+ k = !1;
767
+ var e = d, g = b.outerHeight() - c.outerHeight();
768
+ f && (e = parseInt(c.css("top")) + d * parseInt(a.wheelStep) / 100 * c.outerHeight(), e = Math.min(Math.max(e, 0), g), e = 0 < d ? Math.ceil(e) : Math.floor(e), c.css({top: e + "px"}));
769
+ l = parseInt(c.css("top")) / (b.outerHeight() - c.outerHeight());
770
+ e = l * (b[0].scrollHeight - b.outerHeight());
771
+ h && (e = d, d = e / b[0].scrollHeight * b.outerHeight(), d = Math.min(Math.max(d, 0), g), c.css({top: d + "px"}));
772
+ b.scrollTop(e);
773
+ b.trigger("slimscrolling", ~~e);
774
+ v();
775
+ p()
776
+ }
777
+ function C() {
778
+ window.addEventListener ? (this.addEventListener("DOMMouseScroll", r, !1), this.addEventListener("mousewheel", r, !1), this.addEventListener("MozMousePixelScroll", r, !1)) : document.attachEvent("onmousewheel", r)
779
+ }
780
+ function w() {
781
+ u = Math.max(b.outerHeight() / b[0].scrollHeight * b.outerHeight(), D);
782
+ c.css({height: u + "px"});
783
+ var a = u == b.outerHeight() ? "none" : "block";
784
+ c.css({display: a})
785
+ }
786
+ function v() {
787
+ w();
788
+ clearTimeout(A);
789
+ l == ~~l ? (k = a.allowPageScroll, B != l && b.trigger("slimscroll", 0 == ~~l ? "top" : "bottom")) : k = !1;
790
+ B = l;
791
+ u >= b.outerHeight() ? k = !0 : (c.stop(!0, !0).fadeIn("fast"), a.railVisible && g.stop(!0, !0).fadeIn("fast"))
792
+ }
793
+ function p() {
794
+ a.alwaysVisible || (A = setTimeout(function() {
795
+ a.disableFadeOut && s || (x || y) || (c.fadeOut("slow"), g.fadeOut("slow"))
796
+ }, 1E3))
797
+ }
798
+ var s, x, y, A, z, u, l, B, D = 30, k = !1, b = f(this);
799
+ if (b.parent().hasClass(a.wrapperClass)) {
800
+ var n = b.scrollTop(),
801
+ c = b.parent().find("." + a.barClass), g = b.parent().find("." + a.railClass);
802
+ w();
803
+ if (f.isPlainObject(h)) {
804
+ if ("height"in h && "auto" == h.height) {
805
+ b.parent().css("height", "auto");
806
+ b.css("height", "auto");
807
+ var q = b.parent().parent().height();
808
+ b.parent().css("height", q);
809
+ b.css("height", q)
810
+ }
811
+ if ("scrollTo"in h)
812
+ n = parseInt(a.scrollTo);
813
+ else if ("scrollBy"in h)
814
+ n += parseInt(a.scrollBy);
815
+ else if ("destroy"in h) {
816
+ c.remove();
817
+ g.remove();
818
+ b.unwrap();
819
+ return
820
+ }
821
+ m(n, !1, !0)
822
+ }
823
+ } else {
824
+ a.height = "auto" == a.height ? b.parent().height() : a.height;
825
+ n = f("<div></div>").addClass(a.wrapperClass).css({position: "relative",
826
+ overflow: "hidden", width: a.width, height: a.height});
827
+ b.css({overflow: "hidden", width: a.width, height: a.height});
828
+ var g = f("<div></div>").addClass(a.railClass).css({width: a.size, height: "100%", position: "absolute", top: 0, display: a.alwaysVisible && a.railVisible ? "block" : "none", "border-radius": a.railBorderRadius, background: a.railColor, opacity: a.railOpacity, zIndex: 90}), c = f("<div></div>").addClass(a.barClass).css({background: a.color, width: a.size, position: "absolute", top: 0, opacity: a.opacity, display: a.alwaysVisible ?
829
+ "block" : "none", "border-radius": a.borderRadius, BorderRadius: a.borderRadius, MozBorderRadius: a.borderRadius, WebkitBorderRadius: a.borderRadius, zIndex: 99}), q = "right" == a.position ? {right: a.distance} : {left: a.distance};
830
+ g.css(q);
831
+ c.css(q);
832
+ b.wrap(n);
833
+ b.parent().append(c);
834
+ b.parent().append(g);
835
+ a.railDraggable && c.bind("mousedown", function(a) {
836
+ var b = f(document);
837
+ y = !0;
838
+ t = parseFloat(c.css("top"));
839
+ pageY = a.pageY;
840
+ b.bind("mousemove.slimscroll", function(a) {
841
+ currTop = t + a.pageY - pageY;
842
+ c.css("top", currTop);
843
+ m(0, c.position().top, !1)
844
+ });
845
+ b.bind("mouseup.slimscroll", function(a) {
846
+ y = !1;
847
+ p();
848
+ b.unbind(".slimscroll")
849
+ });
850
+ return!1
851
+ }).bind("selectstart.slimscroll", function(a) {
852
+ a.stopPropagation();
853
+ a.preventDefault();
854
+ return!1
855
+ });
856
+ g.hover(function() {
857
+ v()
858
+ }, function() {
859
+ p()
860
+ });
861
+ c.hover(function() {
862
+ x = !0
863
+ }, function() {
864
+ x = !1
865
+ });
866
+ b.hover(function() {
867
+ s = !0;
868
+ v();
869
+ p()
870
+ }, function() {
871
+ s = !1;
872
+ p()
873
+ });
874
+ b.bind("touchstart", function(a, b) {
875
+ a.originalEvent.touches.length && (z = a.originalEvent.touches[0].pageY)
876
+ });
877
+ b.bind("touchmove", function(b) {
878
+ k || b.originalEvent.preventDefault();
879
+ b.originalEvent.touches.length &&
880
+ (m((z - b.originalEvent.touches[0].pageY) / a.touchScrollStep, !0), z = b.originalEvent.touches[0].pageY)
881
+ });
882
+ w();
883
+ "bottom" === a.start ? (c.css({top: b.outerHeight() - c.outerHeight()}), m(0, !0)) : "top" !== a.start && (m(f(a.start).position().top, null, !0), a.alwaysVisible || c.hide());
884
+ C()
885
+ }
886
+ });
887
+ return this
888
+ }});
889
+ jQuery.fn.extend({slimscroll: jQuery.fn.slimScroll})
890
+ })(jQuery);
891
+
892
+ /*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
893
+ (function(h) {
894
+ function F(a, b, d) {
895
+ var c = a[0], e = /er/.test(d) ? m : /bl/.test(d) ? s : l, f = d == H ? {checked: c[l], disabled: c[s], indeterminate: "true" == a.attr(m) || "false" == a.attr(w)} : c[e];
896
+ if (/^(ch|di|in)/.test(d) && !f)
897
+ D(a, e);
898
+ else if (/^(un|en|de)/.test(d) && f)
899
+ t(a, e);
900
+ else if (d == H)
901
+ for (e in f)
902
+ f[e] ? D(a, e, !0) : t(a, e, !0);
903
+ else if (!b || "toggle" == d) {
904
+ if (!b)
905
+ a[p]("ifClicked");
906
+ f ? c[n] !== u && t(a, e) : D(a, e)
907
+ }
908
+ }
909
+ function D(a, b, d) {
910
+ var c = a[0], e = a.parent(), f = b == l, A = b == m, B = b == s, K = A ? w : f ? E : "enabled", p = k(a, K + x(c[n])), N = k(a, b + x(c[n]));
911
+ if (!0 !== c[b]) {
912
+ if (!d &&
913
+ b == l && c[n] == u && c.name) {
914
+ var C = a.closest("form"), r = 'input[name="' + c.name + '"]', r = C.length ? C.find(r) : h(r);
915
+ r.each(function() {
916
+ this !== c && h(this).data(q) && t(h(this), b)
917
+ })
918
+ }
919
+ A ? (c[b] = !0, c[l] && t(a, l, "force")) : (d || (c[b] = !0), f && c[m] && t(a, m, !1));
920
+ L(a, f, b, d)
921
+ }
922
+ c[s] && k(a, y, !0) && e.find("." + I).css(y, "default");
923
+ e[v](N || k(a, b) || "");
924
+ B ? e.attr("aria-disabled", "true") : e.attr("aria-checked", A ? "mixed" : "true");
925
+ e[z](p || k(a, K) || "")
926
+ }
927
+ function t(a, b, d) {
928
+ var c = a[0], e = a.parent(), f = b == l, h = b == m, q = b == s, p = h ? w : f ? E : "enabled", t = k(a, p + x(c[n])),
929
+ u = k(a, b + x(c[n]));
930
+ if (!1 !== c[b]) {
931
+ if (h || !d || "force" == d)
932
+ c[b] = !1;
933
+ L(a, f, p, d)
934
+ }
935
+ !c[s] && k(a, y, !0) && e.find("." + I).css(y, "pointer");
936
+ e[z](u || k(a, b) || "");
937
+ q ? e.attr("aria-disabled", "false") : e.attr("aria-checked", "false");
938
+ e[v](t || k(a, p) || "")
939
+ }
940
+ function M(a, b) {
941
+ if (a.data(q)) {
942
+ a.parent().html(a.attr("style", a.data(q).s || ""));
943
+ if (b)
944
+ a[p](b);
945
+ a.off(".i").unwrap();
946
+ h(G + '[for="' + a[0].id + '"]').add(a.closest(G)).off(".i")
947
+ }
948
+ }
949
+ function k(a, b, d) {
950
+ if (a.data(q))
951
+ return a.data(q).o[b + (d ? "" : "Class")]
952
+ }
953
+ function x(a) {
954
+ return a.charAt(0).toUpperCase() +
955
+ a.slice(1)
956
+ }
957
+ function L(a, b, d, c) {
958
+ if (!c) {
959
+ if (b)
960
+ a[p]("ifToggled");
961
+ a[p]("ifChanged")[p]("if" + x(d))
962
+ }
963
+ }
964
+ var q = "iCheck", I = q + "-helper", u = "radio", l = "checked", E = "un" + l, s = "disabled", w = "determinate", m = "in" + w, H = "update", n = "type", v = "addClass", z = "removeClass", p = "trigger", G = "label", y = "cursor", J = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);
965
+ h.fn[q] = function(a, b) {
966
+ var d = 'input[type="checkbox"], input[type="' + u + '"]', c = h(), e = function(a) {
967
+ a.each(function() {
968
+ var a = h(this);
969
+ c = a.is(d) ?
970
+ c.add(a) : c.add(a.find(d))
971
+ })
972
+ };
973
+ if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))
974
+ return a = a.toLowerCase(), e(this), c.each(function() {
975
+ var c = h(this);
976
+ "destroy" == a ? M(c, "ifDestroyed") : F(c, !0, a);
977
+ h.isFunction(b) && b()
978
+ });
979
+ if ("object" != typeof a && a)
980
+ return this;
981
+ var f = h.extend({checkedClass: l, disabledClass: s, indeterminateClass: m, labelHover: !0, aria: !1}, a), k = f.handle, B = f.hoverClass || "hover", x = f.focusClass || "focus", w = f.activeClass || "active", y = !!f.labelHover, C = f.labelHoverClass ||
982
+ "hover", r = ("" + f.increaseArea).replace("%", "") | 0;
983
+ if ("checkbox" == k || k == u)
984
+ d = 'input[type="' + k + '"]';
985
+ -50 > r && (r = -50);
986
+ e(this);
987
+ return c.each(function() {
988
+ var a = h(this);
989
+ M(a);
990
+ var c = this, b = c.id, e = -r + "%", d = 100 + 2 * r + "%", d = {position: "absolute", top: e, left: e, display: "block", width: d, height: d, margin: 0, padding: 0, background: "#fff", border: 0, opacity: 0}, e = J ? {position: "absolute", visibility: "hidden"} : r ? d : {position: "absolute", opacity: 0}, k = "checkbox" == c[n] ? f.checkboxClass || "icheckbox" : f.radioClass || "i" + u, m = h(G + '[for="' + b + '"]').add(a.closest(G)),
991
+ A = !!f.aria, E = q + "-" + Math.random().toString(36).replace("0.", ""), g = '<div class="' + k + '" ' + (A ? 'role="' + c[n] + '" ' : "");
992
+ m.length && A && m.each(function() {
993
+ g += 'aria-labelledby="';
994
+ this.id ? g += this.id : (this.id = E, g += E);
995
+ g += '"'
996
+ });
997
+ g = a.wrap(g + "/>")[p]("ifCreated").parent().append(f.insert);
998
+ d = h('<ins class="' + I + '"/>').css(d).appendTo(g);
999
+ a.data(q, {o: f, s: a.attr("style")}).css(e);
1000
+ f.inheritClass && g[v](c.className || "");
1001
+ f.inheritID && b && g.attr("id", q + "-" + b);
1002
+ "static" == g.css("position") && g.css("position", "relative");
1003
+ F(a, !0, H);
1004
+ if (m.length)
1005
+ m.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i", function(b) {
1006
+ var d = b[n], e = h(this);
1007
+ if (!c[s]) {
1008
+ if ("click" == d) {
1009
+ if (h(b.target).is("a"))
1010
+ return;
1011
+ F(a, !1, !0)
1012
+ } else
1013
+ y && (/ut|nd/.test(d) ? (g[z](B), e[z](C)) : (g[v](B), e[v](C)));
1014
+ if (J)
1015
+ b.stopPropagation();
1016
+ else
1017
+ return!1
1018
+ }
1019
+ });
1020
+ a.on("click.i focus.i blur.i keyup.i keydown.i keypress.i", function(b) {
1021
+ var d = b[n];
1022
+ b = b.keyCode;
1023
+ if ("click" == d)
1024
+ return!1;
1025
+ if ("keydown" == d && 32 == b)
1026
+ return c[n] == u && c[l] || (c[l] ? t(a, l) : D(a, l)), !1;
1027
+ if ("keyup" == d && c[n] == u)
1028
+ !c[l] && D(a, l);
1029
+ else if (/us|ur/.test(d))
1030
+ g["blur" ==
1031
+ d ? z : v](x)
1032
+ });
1033
+ d.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i", function(b) {
1034
+ var d = b[n], e = /wn|up/.test(d) ? w : B;
1035
+ if (!c[s]) {
1036
+ if ("click" == d)
1037
+ F(a, !1, !0);
1038
+ else {
1039
+ if (/wn|er|in/.test(d))
1040
+ g[v](e);
1041
+ else
1042
+ g[z](e + " " + w);
1043
+ if (m.length && y && e == B)
1044
+ m[/ut|nd/.test(d) ? z : v](C)
1045
+ }
1046
+ if (J)
1047
+ b.stopPropagation();
1048
+ else
1049
+ return!1
1050
+ }
1051
+ })
1052
+ })
1053
+ }
1054
+ })(window.jQuery || window.Zepto);