dashstrap 0.2.2 → 0.2.3

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