9 $(
'#sidebar-menu li ul').slideUp();
10 $(
'#sidebar-menu li').removeClass(
'active');
12 $(
'#sidebar-menu li').on(
'click touchstart',
function() {
13 var link = $(
'a',
this).attr(
'href');
16 window.location.href = link;
18 if ($(
this).is(
'.active')) {
19 $(
this).removeClass(
'active');
20 $(
'ul',
this).slideUp();
22 $(
'#sidebar-menu li').removeClass(
'active');
23 $(
'#sidebar-menu li ul').slideUp();
25 $(
this).addClass(
'active');
26 $(
'ul',
this).slideDown();
31 $(
'#menu_toggle').click(
function () {
32 if ($(
'body').hasClass(
'nav-md')) {
33 $(
'body').removeClass(
'nav-md').addClass(
'nav-sm');
34 $(
'.left_col').removeClass(
'scroll-view').removeAttr(
'style');
35 $(
'.sidebar-footer').hide();
37 if ($(
'#sidebar-menu li').hasClass(
'active')) {
38 $(
'#sidebar-menu li.active').addClass(
'active-sm').removeClass(
'active');
41 $(
'body').removeClass(
'nav-sm').addClass(
'nav-md');
42 $(
'.sidebar-footer').show();
44 if ($(
'#sidebar-menu li').hasClass(
'active-sm')) {
45 $(
'#sidebar-menu li.active-sm').addClass(
'active').removeClass(
'active-sm');
53 var
url = window.location;
54 $(
'#sidebar-menu a[href="' + url +
'"]').parent(
'li').addClass(
'current-page');
55 $(
'#sidebar-menu a').filter(
function () {
56 return this.href == url;
57 }).parent(
'li').addClass(
'current-page').parent(
'ul').slideDown().parent().addClass(
'active');
62 $(
".right_col").
css(
"min-height", $(window).height());
63 $(window).resize(
function () {
64 $(
".right_col").
css(
"min-height", $(window).height());
72 $(
'[data-toggle="tooltip"]').tooltip()
76 if ($(
".progress .progress-bar")[0]) {
77 $(
'.progress .progress-bar').progressbar();
81 if ($(
".js-switch")[0]) {
82 var elems = Array.prototype.slice.call(document.querySelectorAll(
'.js-switch'));
83 elems.forEach(
function (html) {
84 var switchery =
new Switchery(html, {
92 $(
'.close-link').click(
function () {
93 var content = $(
this).closest(
'div.x_panel');
98 $(
'.collapse-link').click(
function () {
99 var x_panel = $(
this).closest(
'div.x_panel');
100 var button = $(
this).find(
'i');
101 var content = x_panel.find(
'div.x_content');
102 content.slideToggle(200);
103 (x_panel.hasClass(
'fixed_height_390') ? x_panel.toggleClass(
'').toggleClass(
'fixed_height_390') :
'');
104 (x_panel.hasClass(
'fixed_height_320') ? x_panel.toggleClass(
'').toggleClass(
'fixed_height_320') :
'');
105 button.toggleClass(
'fa-chevron-up').toggleClass(
'fa-chevron-down');
106 setTimeout(
function () {
112 if ($(
"input.flat")[0]) {
113 $(document).ready(
function () {
114 $(
'input.flat').iCheck({
115 checkboxClass:
'icheckbox_flat-green',
116 radioClass:
'iradio_flat-green'
123 var __slice = [].slice;
125 (
function ($, window) {
128 Starrr = (
function () {
129 Starrr.prototype.defaults = {
132 change:
function (e, value) {
136 function Starrr($el, options) {
140 this.options = $.extend({}, this.defaults, options);
142 _ref = this.defaults;
145 if (this.$el.data(i) != null) {
146 this.options[i] = this.$el.data(i);
151 this.$el.on(
'mouseover.starrr',
'span',
function (e) {
152 return _this.syncRating(_this.$el.find(
'span').index(e.currentTarget) + 1);
154 this.$el.on(
'mouseout.starrr',
function () {
155 return _this.syncRating();
157 this.$el.on(
'click.starrr',
'span',
function (e) {
158 return _this.setRating(_this.$el.find(
'span').index(e.currentTarget) + 1);
160 this.$el.on(
'starrr:change', this.options.change);
163 Starrr.prototype.createStars =
function () {
164 var _i, _ref, _results;
167 for (_i = 1, _ref = this.options.numStars; 1 <= _ref ? _i <= _ref : _i >= _ref; 1 <= _ref ? _i++ : _i--) {
168 _results.push(this.$el.append(
"<span class='glyphicon .glyphicon-star-empty'></span>"));
173 Starrr.prototype.setRating =
function (rating) {
174 if (this.options.rating === rating) {
177 this.options.rating = rating;
179 return this.$el.trigger(
'starrr:change', rating);
182 Starrr.prototype.syncRating =
function (rating) {
185 rating || (rating = this.options.rating);
187 for (i = _i = 0, _ref = rating - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
188 this.$el.find(
'span').eq(i).removeClass(
'glyphicon-star-empty').addClass(
'glyphicon-star');
191 if (rating && rating < 5) {
192 for (i = _j = rating; rating <= 4 ? _j <= 4 : _j >= 4; i = rating <= 4 ? ++_j : --_j) {
193 this.$el.find(
'span').eq(i).removeClass(
'glyphicon-star').addClass(
'glyphicon-star-empty');
197 return this.$el.find(
'span').removeClass(
'glyphicon-star').addClass(
'glyphicon-star-empty');
205 starrr:
function () {
208 option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
209 return this.each(
function () {
212 data = $(
this).data(
'star-rating');
214 $(
this).data(
'star-rating', (data =
new Starrr($(
this), option)));
216 if (typeof option ===
'string') {
217 return data[option].apply(data, args);
222 })(window.jQuery, window);
225 return $(
".starrr").starrr();
228 $(document).ready(
function () {
230 $(
'#stars').on(
'starrr:change',
function (e, value) {
231 $(
'#count').html(value);
235 $(
'#stars-existing').on(
'starrr:change',
function (e, value) {
236 $(
'#count-existing').html(value);
242 $(
'table input').on(
'ifChecked',
function () {
244 $(
this).parent().parent().parent().addClass(
'selected');
247 $(
'table input').on(
'ifUnchecked',
function () {
249 $(
this).parent().parent().parent().removeClass(
'selected');
253 var check_state =
'';
254 $(
'.bulk_action input').on(
'ifChecked',
function () {
256 $(
this).parent().parent().parent().addClass(
'selected');
259 $(
'.bulk_action input').on(
'ifUnchecked',
function () {
261 $(
this).parent().parent().parent().removeClass(
'selected');
264 $(
'.bulk_action input#check-all').on(
'ifChecked',
function () {
265 check_state =
'check_all';
268 $(
'.bulk_action input#check-all').on(
'ifUnchecked',
function () {
269 check_state =
'uncheck_all';
273 function countChecked() {
274 if (check_state ==
'check_all') {
275 $(
".bulk_action input[name='table_records']").iCheck(
'check');
277 if (check_state ==
'uncheck_all') {
278 $(
".bulk_action input[name='table_records']").iCheck(
'uncheck');
280 var n = $(
".bulk_action input[name='table_records']:checked").length;
282 $(
'.column-title').hide();
283 $(
'.bulk-actions').show();
284 $(
'.action-cnt').html(n +
' Records Selected');
286 $(
'.column-title').show();
287 $(
'.bulk-actions').hide();
300 $(
".expand").on(
"click",
function () {
301 $(
this).next().slideToggle(200);
302 $expand = $(
this).find(
">:first-child");
304 if ($expand.text() ==
"+") {
315 $(document).ready(
function () {
317 $(
".scroll-view").niceScroll({
319 cursorcolor:
"rgba(42, 63, 84, 0.35)"
326 if (typeof NProgress !=
'undefined') {
327 $(document).ready(
function () {
331 $(window).load(
function () {