dashstrap 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.yardopts +1 -0
  4. data/Gemfile +8 -0
  5. data/LICENSE +339 -0
  6. data/README.md +40 -0
  7. data/Rakefile +13 -0
  8. data/TODO.org +3 -0
  9. data/app/assets/fonts/BYekan.eot +0 -0
  10. data/app/assets/fonts/BYekan.ttf +0 -0
  11. data/app/assets/fonts/BYekan.woff +0 -0
  12. data/app/assets/javascripts/dashstrap/application.js +2 -0
  13. data/app/assets/javascripts/dashstrap/functions.js +27 -0
  14. data/app/assets/javascripts/dashstrap/locales/translations.fa.js +5 -0
  15. data/app/assets/javascripts/dashstrap/modules/init.js +1 -0
  16. data/app/assets/javascripts/dashstrap/modules/list-view.js +376 -0
  17. data/app/assets/javascripts/dashstrap/modules/modules.js +79 -0
  18. data/app/assets/javascripts/dashstrap/modules/navigation.js +24 -0
  19. data/app/assets/javascripts/locales/translations.fa.js +5 -0
  20. data/app/assets/locales/templates.pot +92 -0
  21. data/app/assets/locales/translate.fa.pot +93 -0
  22. data/app/assets/stylesheets/dashstrap/ltr/application.css +17 -0
  23. data/app/assets/stylesheets/dashstrap/ltr/ltr.scss +15 -0
  24. data/app/assets/stylesheets/dashstrap/main.css.scss +63 -0
  25. data/app/assets/stylesheets/dashstrap/rtl/#application.css# +4 -0
  26. data/app/assets/stylesheets/dashstrap/rtl/application.css +18 -0
  27. data/app/assets/stylesheets/dashstrap/rtl/rtl.scss +38 -0
  28. data/app/assets/stylesheets/dashstrap/share.scss +7 -0
  29. data/app/assets/stylesheets/faalis/ltr/application.css +0 -0
  30. data/app/assets/stylesheets/faalis/rtl/application.css +0 -0
  31. data/app/assets/stylesheets/simple/ltr/application.css +4 -0
  32. data/app/assets/stylesheets/simple/rtl/application.css +5 -0
  33. data/app/assets/stylesheets/simple/rtl/rtl.scss +16 -0
  34. data/app/assets/stylesheets/simple/share.scss +11 -0
  35. data/app/views/angular/auth/groups/details.html +21 -0
  36. data/app/views/angular/auth/groups/index.html.slim +2 -0
  37. data/app/views/angular/auth/groups/new.html.slim +44 -0
  38. data/app/views/angular/auth/index.html +30 -0
  39. data/app/views/angular/auth/profile/edit.html +54 -0
  40. data/app/views/angular/auth/users/details.html +28 -0
  41. data/app/views/angular/auth/users/index.html +6 -0
  42. data/app/views/angular/auth/users/new.html +57 -0
  43. data/app/views/angular/fields/accordion/accordion-group.html +10 -0
  44. data/app/views/angular/fields/accordion/accordion.html +1 -0
  45. data/app/views/angular/fields/alert/alert.html +7 -0
  46. data/app/views/angular/fields/boolean/boolean.html +4 -0
  47. data/app/views/angular/fields/carousel/carousel.html +8 -0
  48. data/app/views/angular/fields/carousel/slide.html +7 -0
  49. data/app/views/angular/fields/control-combo/control-list.html +19 -0
  50. data/app/views/angular/fields/datepicker/datepicker.html +5 -0
  51. data/app/views/angular/fields/datepicker/day.html +21 -0
  52. data/app/views/angular/fields/datepicker/month.html +16 -0
  53. data/app/views/angular/fields/datepicker/popup.html +10 -0
  54. data/app/views/angular/fields/datepicker/year.html +16 -0
  55. data/app/views/angular/fields/datetime/datetime.html +10 -0
  56. data/app/views/angular/fields/datetime/time.html +25 -0
  57. data/app/views/angular/fields/float/float.html +4 -0
  58. data/app/views/angular/fields/image/image.html +1 -0
  59. data/app/views/angular/fields/integer/integer.html +4 -0
  60. data/app/views/angular/fields/modal/backdrop.html +4 -0
  61. data/app/views/angular/fields/modal/window.html +3 -0
  62. data/app/views/angular/fields/pagination/pager.html +4 -0
  63. data/app/views/angular/fields/pagination/pagination.html +7 -0
  64. data/app/views/angular/fields/popover/popover.html +8 -0
  65. data/app/views/angular/fields/progressbar/bar.html +1 -0
  66. data/app/views/angular/fields/progressbar/progress.html +1 -0
  67. data/app/views/angular/fields/progressbar/progressbar.html +3 -0
  68. data/app/views/angular/fields/rating/rating.html +5 -0
  69. data/app/views/angular/fields/relation/relation.html +43 -0
  70. data/app/views/angular/fields/string/string.html +22 -0
  71. data/app/views/angular/fields/tabs/tab.html +3 -0
  72. data/app/views/angular/fields/tabs/tabset.html +10 -0
  73. data/app/views/angular/fields/tag/tag.html +3 -0
  74. data/app/views/angular/fields/text/text.html +4 -0
  75. data/app/views/angular/fields/timepicker/timepicker.html +26 -0
  76. data/app/views/angular/fields/tooltip/tooltip-html-unsafe-popup.html +4 -0
  77. data/app/views/angular/fields/tooltip/tooltip-popup.html +4 -0
  78. data/app/views/angular/fields/typeahead/typeahead-match.html +1 -0
  79. data/app/views/angular/fields/typeahead/typeahead-popup.html +5 -0
  80. data/app/views/angular/index.html +448 -0
  81. data/app/views/angular/list-view/index.html +161 -0
  82. data/app/views/angular/modules.html +46 -0
  83. data/app/views/angular/nav.html.erb +273 -0
  84. data/app/views/dashstrap/.keep +0 -0
  85. data/app/views/devise/registrations/edit.html.erb +29 -0
  86. data/app/views/devise/registrations/new.html.erb +36 -0
  87. data/app/views/devise/sessions/new.html.erb +33 -0
  88. data/app/views/devise/shared/_links.erb +19 -0
  89. data/app/views/devise/shared/_omni_link.erb +15 -0
  90. data/app/views/faalis/dashboard/index.html.erb +44 -0
  91. data/app/views/faalis/dashboard/login_required_page.html.erb +5 -0
  92. data/app/views/layouts/dashstrap/.keep +0 -0
  93. data/app/views/layouts/faalis/application.html.erb +83 -0
  94. data/app/views/layouts/faalis/dashboard.html.erb +26 -0
  95. data/app/views/layouts/faalis/simple.html.erb +22 -0
  96. data/dashstrap.gemspec +39 -0
  97. data/lib/dashstrap/engine.rb +29 -0
  98. data/lib/dashstrap/version.rb +3 -0
  99. data/lib/dashstrap.rb +4 -0
  100. data/lib/generators/dashstrap/install_generator.rb +14 -0
  101. data/lib/generators/templates/js/list_view/README +31 -0
  102. data/lib/generators/templates/js/list_view/details.html.erb +25 -0
  103. data/lib/generators/templates/js/list_view/index.html.erb +89 -0
  104. data/lib/generators/templates/js/list_view/module.js.erb +10 -0
  105. data/lib/generators/templates/js/list_view/new.html.erb +81 -0
  106. data/lib/generators/templates/js/list_view/partials/add_controller.js.erb +103 -0
  107. data/lib/generators/templates/js/list_view/partials/config.js.erb +20 -0
  108. data/lib/generators/templates/js/list_view/partials/index_controller.js.erb +199 -0
  109. data/lib/generators/templates/js/list_view/partials/menu.js.erb +6 -0
  110. data/lib/generators/templates/stylesheets/application.css +13 -0
  111. data/lib/generators/templates/stylesheets/dashboard/ltr/application.css +1 -0
  112. data/lib/generators/templates/stylesheets/dashboard/rtl/application.css +1 -0
  113. data/lib/generators/templates/stylesheets/ltr/application.css +6 -0
  114. data/lib/generators/templates/stylesheets/rtl/application.css +4 -0
  115. data/lib/tasks/.keep +0 -0
  116. data/lib/tasks/build.rake +15 -0
  117. data/lib/tasks/grunt/Gruntfile.js +30 -0
  118. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  119. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  120. data/vendor/assets/fonts/fontawesome-webfont.svg +414 -0
  121. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  122. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  123. data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  124. data/vendor/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  125. data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  126. data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  127. data/vendor/assets/fonts/ionicons.eot +0 -0
  128. data/vendor/assets/fonts/ionicons.svg +1623 -0
  129. data/vendor/assets/fonts/ionicons.ttf +0 -0
  130. data/vendor/assets/fonts/ionicons.woff +0 -0
  131. data/vendor/assets/javascripts/.keep +0 -0
  132. data/vendor/assets/javascripts/AdminLTE/app.js +1037 -0
  133. data/vendor/assets/javascripts/AdminLTE/dashboard.js +254 -0
  134. data/vendor/assets/javascripts/bootstrap.js +2114 -0
  135. data/vendor/assets/javascripts/ui-bootstrap.js +3799 -0
  136. data/vendor/assets/stylesheets/.keep +0 -0
  137. data/vendor/assets/stylesheets/AdminLTE.css +3024 -0
  138. data/vendor/assets/stylesheets/bootstrap.css +7118 -0
  139. data/vendor/assets/stylesheets/rtl/AdminLTE.css +3032 -0
  140. data/vendor/assets/stylesheets/rtl/bootstrap-rtl.css +442 -0
  141. data/vendor/assets/stylesheets/rtl/bootstrap.css +6239 -0
  142. metadata +366 -0
@@ -0,0 +1,1037 @@
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
+ //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();
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");
101
+ }
102
+ }
103
+ //Fire upon load
104
+ _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
+ 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
+
124
+ });
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
+ });
136
+ }
137
+
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
+
459
+ /*
460
+ * BOX REFRESH BUTTON
461
+ * ------------------
462
+ * This is a custom plugin to use with the compenet BOX. It allows you to add
463
+ * a refresh button to the box. It converts the box's state to a loading state.
464
+ *
465
+ * USAGE:
466
+ * $("#box-widget").boxRefresh( options );
467
+ * */
468
+ (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
+ });
513
+
514
+
515
+ });
516
+
517
+ });
518
+
519
+ function start(box) {
520
+ //Add overlay and loading img
521
+ box.append(overlay);
522
+
523
+ settings.onLoadStart.call(box);
524
+ }
525
+
526
+ function done(box) {
527
+ //Remove overlay and loading img
528
+ box.find(overlay).remove();
529
+
530
+ settings.onLoadDone.call(box);
531
+ }
532
+
533
+ };
534
+
535
+ })(jQuery);
536
+
537
+ /*
538
+ * SIDEBAR MENU
539
+ * ------------
540
+ * This is a custom plugin for the sidebar menu. It provides a tree view.
541
+ *
542
+ * Usage:
543
+ * $(".sidebar).tree();
544
+ *
545
+ * Note: This plugin does not accept any options. Instead, it only requires a class
546
+ * added to the element that contains a sub-menu.
547
+ *
548
+ * When used with the sidebar, for example, it would look something like this:
549
+ * <ul class='sidebar-menu'>
550
+ * <li class="treeview active">
551
+ * <a href="#>Menu</a>
552
+ * <ul class='treeview-menu'>
553
+ * <li class='active'><a href=#>Level 1</a></li>
554
+ * </ul>
555
+ * </li>
556
+ * </ul>
557
+ *
558
+ * Add .active class to <li> elements if you want the menu to be open automatically
559
+ * on page load. See above for an example.
560
+ */
561
+ (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
+ });
593
+
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;
597
+
598
+ $(this).css({"margin-left": pad + "px"});
599
+ });
600
+
601
+ });
602
+
603
+ };
604
+
605
+
606
+ }(jQuery));
607
+
608
+ /*
609
+ * TODO LIST CUSTOM PLUGIN
610
+ * -----------------------
611
+ * This plugin depends on iCheck plugin for checkbox and radio inputs
612
+ */
613
+ (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
+ };
641
+
642
+ }(jQuery));
643
+
644
+ /* CENTER ELEMENTS */
645
+ (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;
659
+ }
660
+ }(jQuery));
661
+
662
+ /*
663
+ * jQuery resize event - v1.1 - 3/14/2010
664
+ * http://benalman.com/projects/jquery-resize-plugin/
665
+ *
666
+ * Copyright (c) 2010 "Cowboy" Ben Alman
667
+ * Dual licensed under the MIT and GPL licenses.
668
+ * http://benalman.com/about/license/
669
+ */
670
+ (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
+ }}
724
+ )(jQuery, this);
725
+
726
+ /*!
727
+ * SlimScroll https://github.com/rochal/jQuery-slimScroll
728
+ * =======================================================
729
+ *
730
+ * Copyright (c) 2011 Piotr Rochala (http://rocha.la) Dual licensed under the MIT
731
+ */
732
+ (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})
873
+ })(jQuery);
874
+
875
+ /*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
876
+ (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
+ }
891
+ }
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) || "")
922
+ }
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
+ }
931
+ }
932
+ function k(a, b, d) {
933
+ if (a.data(q))
934
+ return a.data(q).o[b + (d ? "" : "Class")]
935
+ }
936
+ function x(a) {
937
+ return a.charAt(0).toUpperCase() +
938
+ a.slice(1)
939
+ }
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))
945
+ }
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
+ }
1037
+ })(window.jQuery || window.Zepto);