/*! AdminLTE app.js * ================ * Main JS application file for AdminLTE v2. This file * should be included in all pages. It controls some layout * options and implements exclusive AdminLTE plugins. * * @Author Almsaeed Studio * @Support * @Email * @version 2.4.0 * @repository git://github.com/almasaeed2010/AdminLTE.git * @license MIT */ if (typeof jQuery === "undefined") { throw new Error("AdminLTE requires jQuery") } +function (g) { var f = "lte.boxrefresh"; var c = { source: "", params: {}, trigger: ".refresh-btn", content: ".box-body", loadInContent: true, responseType: "", overlayTemplate: '
', onLoadStart: function () { }, onLoadDone: function (h) { return h } }; var b = { data: '[data-widget="box-refresh"]' }; var d = function (i, h) { this.element = i; this.options = h; this.$overlay = g(h.overlay); if (h.source === "") { throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.") } this._setUpListeners(); this.load() }; d.prototype.load = function () { this._addOverlay(); this.options.onLoadStart.call(g(this)); g.get(this.options.source, this.options.params, function (h) { if (this.options.loadInContent) { g(this.options.content).html(h) } this.options.onLoadDone.call(g(this), h); this._removeOverlay() }.bind(this), this.options.responseType !== "" && this.options.responseType) }; d.prototype._setUpListeners = function () { g(this.element).on("click", b.trigger, function (h) { if (h) { h.preventDefault() } this.load() }.bind(this)) }; d.prototype._addOverlay = function () { g(this.element).append(this.$overlay) }; d.prototype._removeOverlay = function () { g(this.element).remove(this.$overlay) }; function e(h) { return this.each(function () { var k = g(this); var j = k.data(f); if (!j) { var i = g.extend({}, c, k.data(), typeof h == "object" && h); k.data(f, (j = new d(k, i))) } if (typeof j == "string") { if (typeof j[h] == "undefined") { throw new Error("No method named " + h) } j[h]() } }) } var a = g.fn.boxRefresh; g.fn.boxRefresh = e; g.fn.boxRefresh.Constructor = d; g.fn.boxRefresh.noConflict = function () { g.fn.boxRefresh = a; return this }; g(window).on("load", function () { g(b.data).each(function () { e.call(g(this)) }) }) }(jQuery) + function (d) { var b = "lte.boxwidget"; var f = { animationSpeed: 500, collapseTrigger: '[data-widget="collapse"]', removeTrigger: '[data-widget="remove"]', collapseIcon: "fa-minus", expandIcon: "fa-plus", removeIcon: "fa-times" }; var a = { data: ".box", collapsed: ".collapsed-box", body: ".box-body", footer: ".box-footer", tools: ".box-tools" }; var h = { collapsed: "collapsed-box" }; var i = { collapsed: "collapsed.boxwidget", expanded: "expanded.boxwidget", removed: "removed.boxwidget" }; var e = function (k, j) { this.element = k; this.options = j; this._setUpListeners() }; e.prototype.toggle = function () { var j = !d(this.element).is(a.collapsed); if (j) { this.collapse() } else { this.expand() } }; e.prototype.expand = function () { var l = d.Event(i.expanded); var k = this.options.collapseIcon; var j = this.options.expandIcon; d(this.element).removeClass(h.collapsed); d(this.element).find(a.tools).find("." + j).removeClass(j).addClass(k); d(this.element).find(a.body + ", " + a.footer).slideDown(this.options.animationSpeed, function () { d(this.element).trigger(l) }.bind(this)) }; e.prototype.collapse = function () { var k = d.Event(i.collapsed); var l = this.options.collapseIcon; var j = this.options.expandIcon; d(this.element).find(a.tools).find("." + l).removeClass(l).addClass(j); d(this.element).find(a.body + ", " + a.footer).slideUp(this.options.animationSpeed, function () { d(this.element).addClass(h.collapsed); d(this.element).trigger(k) }.bind(this)) }; e.prototype.remove = function () { var j = d.Event(i.removed); d(this.element).slideUp(this.options.animationSpeed, function () { d(this.element).trigger(j); d(this.element).remove() }.bind(this)) }; e.prototype._setUpListeners = function () { var j = this; d(this.element).on("click", this.options.collapseTrigger, function (k) { if (k) { k.preventDefault() } j.toggle() }); d(this.element).on("click", this.options.removeTrigger, function (k) { if (k) { k.preventDefault() } j.remove() }) }; function g(j) { return this.each(function () { var m = d(this); var l = m.data(b); if (!l) { var k = d.extend({}, f, m.data(), typeof j == "object" && j); m.data(b, (l = new e(m, k))) } if (typeof j == "string") { if (typeof l[j] == "undefined") { throw new Error("No method named " + j) } l[j]() } }) } var c = d.fn.boxWidget; d.fn.boxWidget = g; d.fn.boxWidget.Constructor = e; d.fn.boxWidget.noConflict = function () { d.fn.boxWidget = c; return this }; d(window).on("load", function () { d(a.data).each(function () { g.call(d(this)) }) }) }(jQuery) + function (d) { var b = "lte.controlsidebar"; var e = { slide: true }; var a = { sidebar: ".control-sidebar", data: '[data-toggle="control-sidebar"]', open: ".control-sidebar-open", bg: ".control-sidebar-bg", wrapper: ".wrapper", content: ".content-wrapper", boxed: ".layout-boxed" }; var h = { open: "control-sidebar-open", fixed: "fixed" }; var i = { collapsed: "collapsed.controlsidebar", expanded: "expanded.controlsidebar" }; var g = function (k, j) { this.element = k; this.options = j; this.hasBindedResize = false; this.init() }; g.prototype.init = function () { if (!d(this.element).is(a.data)) { d(this).on("click", this.toggle) } this.fix(); d(window).resize(function () { this.fix() }.bind(this)) }; g.prototype.toggle = function (j) { if (j) { j.preventDefault() } this.fix(); if (!d(a.sidebar).is(a.open) && !d("body").is(a.open)) { this.expand() } else { this.collapse() } }; g.prototype.expand = function () { if (!this.options.slide) { d("body").addClass(h.open) } else { d(a.sidebar).addClass(h.open) } d(this.element).trigger(d.Event(i.expanded)) }; g.prototype.collapse = function () { d("body, " + a.sidebar).removeClass(h.open); d(this.element).trigger(d.Event(i.collapsed)) }; g.prototype.fix = function () { if (d("body").is(a.boxed)) { this._fixForBoxed(d(a.bg)) } }; g.prototype._fixForBoxed = function (j) { j.css({ position: "absolute", height: d(a.wrapper).height() }) }; function f(j) { return this.each(function () { var m = d(this); var l = m.data(b); if (!l) { var k = d.extend({}, e, m.data(), typeof j == "object" && j); m.data(b, (l = new g(m, k))) } if (typeof j == "string") { l.toggle() } }) } var c = d.fn.controlSidebar; d.fn.controlSidebar = f; d.fn.controlSidebar.Constructor = g; d.fn.controlSidebar.noConflict = function () { d.fn.controlSidebar = c; return this }; d(document).on("click", a.data, function (j) { if (j) { j.preventDefault() } f.call(d(this), "toggle") }) }(jQuery) + function (g) { var f = "lte.directchat"; var c = { data: '[data-widget="chat-pane-toggle"]', box: ".direct-chat" }; var e = { open: "direct-chat-contacts-open" }; var a = function (h) { this.element = h }; a.prototype.toggle = function (h) { h.parents(c.box).first().toggleClass(e.open) }; function d(h) { return this.each(function () { var j = g(this); var i = j.data(f); if (!i) { j.data(f, (i = new a(j))) } if (typeof h == "string") { i.toggle(j) } }) } var b = g.fn.directChat; g.fn.directChat = d; g.fn.directChat.Constructor = a; g.fn.directChat.noConflict = function () { g.fn.directChat = b; return this }; g(document).on("click", c.data, function (h) { if (h) { h.preventDefault() } d.call(g(this), "toggle") }) }(jQuery) + function (h) { var g = "lte.layout"; var c = { slimscroll: true, resetHeight: true }; var b = { wrapper: ".wrapper", contentWrapper: ".content-wrapper", layoutBoxed: ".layout-boxed", mainFooter: ".main-footer", mainHeader: ".main-header", sidebar: ".sidebar", controlSidebar: ".control-sidebar", fixed: ".fixed", sidebarMenu: ".sidebar-menu", logo: ".main-header .logo" }; var f = { fixed: "fixed", holdTransition: "hold-transition" }; var e = function (i) { this.options = i; this.bindedResize = false; this.activate() }; e.prototype.activate = function () { this.fix(); this.fixSidebar(); h("body").removeClass(f.holdTransition); if (this.options.resetHeight) { h("body, html, " + b.wrapper).css({ height: "auto", "min-height": "100%" }) } if (!this.bindedResize) { h(window).resize(function () { this.fix(); this.fixSidebar(); h(b.logo + ", " + b.sidebar).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend", function () { this.fix(); this.fixSidebar() }.bind(this)) }.bind(this)); this.bindedResize = true } h(b.sidebarMenu).on("expanded.tree", function () { this.fix(); this.fixSidebar() }.bind(this)); h(b.sidebarMenu).on("collapsed.tree", function () { this.fix(); this.fixSidebar() }.bind(this)) }; e.prototype.fix = function () { h(b.layoutBoxed + " > " + b.wrapper).css("overflow", "hidden"); var l = h(b.mainFooter).outerHeight() || 0; var n = h(b.mainHeader).outerHeight() + l; var m = h(window).height(); var i = h(b.sidebar).height() || 0; if (h("body").hasClass(f.fixed)) { h(b.contentWrapper).css("min-height", m - l) } else { var k; if (m >= i) { h(b.contentWrapper).css("min-height", m - n); k = m - n } else { h(b.contentWrapper).css("min-height", i); k = i } var j = h(b.controlSidebar); if (typeof j !== "undefined") { if (j.height() > k) { h(b.contentWrapper).css("min-height", j.height()) } } } }; e.prototype.fixSidebar = function () { if (!h("body").hasClass(f.fixed)) { if (typeof h.fn.slimScroll !== "undefined") { h(b.sidebar).slimScroll({ destroy: true }).height("auto") } return } if (this.options.slimscroll) { if (typeof h.fn.slimScroll !== "undefined") { h(b.sidebar).slimScroll({ destroy: true }).height("auto"); h(b.sidebar).slimScroll({ height: (h(window).height() - h(b.mainHeader).height()) + "px", color: "rgba(0,0,0,0.2)", size: "3px" }) } } }; function d(i) { return this.each(function () { var l = h(this); var k = l.data(g); if (!k) { var j = h.extend({}, c, l.data(), typeof i === "object" && i); l.data(g, (k = new e(j))) } if (typeof i === "string") { if (typeof k[i] === "undefined") { throw new Error("No method named " + i) } k[i]() } }) } var a = h.fn.layout; h.fn.layout = d; h.fn.layout.Constuctor = e; h.fn.layout.noConflict = function () { h.fn.layout = a; return this }; h(window).on("load", function () { d.call(h("body")) }) }(jQuery) + function (d) { var b = "lte.pushmenu"; var e = { collapseScreenSize: 767, expandOnHover: false, expandTransitionDelay: 200 }; var a = { collapsed: ".sidebar-collapse", open: ".sidebar-open", mainSidebar: ".main-sidebar", contentWrapper: ".content-wrapper", searchInput: ".sidebar-form .form-control" , button: '[data-toggle="push-menu"]', mini: ".sidebar-mini", expanded: ".sidebar-expanded-on-hover", layoutFixed: ".fixed" }; var h = { collapsed: "sidebar-collapse", open: "sidebar-open", mini: "sidebar-mini", expanded: "sidebar-expanded-on-hover", expandFeature: "sidebar-mini-expand-feature", layoutFixed: "fixed" }; var i = { expanded: "expanded.pushMenu", collapsed: "collapsed.pushMenu" }; var g = function (j) { this.options = j; this.init() }; g.prototype.init = function () { if (this.options.expandOnHover || (d("body").is(a.mini + a.layoutFixed))) { this.expandOnHover(); d("body").addClass(h.expandFeature) } d(a.contentWrapper).click(function () { if (d(window).width() <= this.options.collapseScreenSize && d("body").hasClass(h.open)) { this.close() } }.bind(this)); d(a.searchInput).click(function (j) { j.stopPropagation() }) }; g.prototype.toggle = function () { var k = d(window).width(); var j = !d("body").hasClass(h.collapsed); if (k <= this.options.collapseScreenSize) { j = d("body").hasClass(h.open) } if (!j) { this.open() } else { this.close() } }; g.prototype.open = function () { var j = d(window).width(); if (j > this.options.collapseScreenSize) { d("body").removeClass(h.collapsed).trigger(d.Event(i.expanded)) } else { d("body").addClass(h.open).trigger(d.Event(i.expanded)) } }; g.prototype.close = function () { var j = d(window).width(); if (j > this.options.collapseScreenSize) { d("body").addClass(h.collapsed).trigger(d.Event(i.collapsed)) } else { d("body").removeClass(h.open + " " + h.collapsed).trigger(d.Event(i.collapsed)) } }; g.prototype.expandOnHover = function () { d(a.mainSidebar).hover(function () { if (d("body").is(a.mini + a.collapsed) && d(window).width() > this.options.collapseScreenSize) { this.expand() } }.bind(this), function () { if (d("body").is(a.expanded)) { this.collapse() } }.bind(this)) }; g.prototype.expand = function () { setTimeout(function () { d("body").removeClass(h.collapsed).addClass(h.expanded) }, this.options.expandTransitionDelay) }; g.prototype.collapse = function () { setTimeout(function () { d("body").removeClass(h.expanded).addClass(h.collapsed) }, this.options.expandTransitionDelay) }; function f(j) { return this.each(function () { var m = d(this); var l = m.data(b); if (!l) { var k = d.extend({}, e, m.data(), typeof j == "object" && j); m.data(b, (l = new g(k))) } if (j == "toggle") { l.toggle() } }) } var c = d.fn.pushMenu; d.fn.pushMenu = f; d.fn.pushMenu.Constructor = g; d.fn.pushMenu.noConflict = function () { d.fn.pushMenu = c; return this }; d(document).on("click", a.button, function (j) { j.preventDefault(); f.call(d(this), "toggle") }); d(window).on("load", function () { f.call(d(a.button)) }) }(jQuery) + function (h) { var g = "lte.todolist"; var c = { onCheck: function (i) { return i }, onUnCheck: function (i) { return i } }; var b = { data: '[data-widget="todo-list"]' }; var e = { done: "done" }; var f = function (j, i) { this.element = j; this.options = i; this._setUpListeners() }; f.prototype.toggle = function (i) { i.parents(b.li).first().toggleClass(e.done); if (!i.prop("checked")) { this.unCheck(i); return } this.check(i) }; f.prototype.check = function (i) { this.options.onCheck.call(i) }; f.prototype.unCheck = function (i) { this.options.onUnCheck.call(i) }; f.prototype._setUpListeners = function () { var i = this; h(this.element).on("change ifChanged", "input:checkbox", function () { i.toggle(h(this)) }) }; function d(i) { return this.each(function () { var l = h(this); var k = l.data(g); if (!k) { var j = h.extend({}, c, l.data(), typeof i == "object" && i); l.data(g, (k = new f(l, j))) } if (typeof k == "string") { if (typeof k[i] == "undefined") { throw new Error("No method named " + i) } k[i]() } }) } var a = h.fn.todoList; h.fn.todoList = d; h.fn.todoList.Constructor = f; h.fn.todoList.noConflict = function () { h.fn.todoList = a; return this }; h(window).on("load", function () { h(b.data).each(function () { d.call(h(this)) }) }) }(jQuery) + function (e) { var b = "lte.tree"; var f = { animationSpeed: 500, accordion: true, followLink: false, trigger: ".treeview a" }; var a = { tree: ".tree", treeview: ".treeview", treeviewMenu: ".treeview-menu", open: ".menu-open, .active", li: "li", data: '[data-widget="tree"]', active: ".active" }; var h = { open: "menu-open", tree: "tree" }; var i = { collapsed: "collapsed.tree", expanded: "expanded.tree" }; var d = function (k, j) { this.element = k; this.options = j; e(this.element).addClass(h.tree); e(a.treeview + a.active, this.element).addClass(h.open); this._setUpListeners() }; d.prototype.toggle = function (n, m) { var l = n.next(a.treeviewMenu); var j = n.parent(); var k = j.hasClass(h.open); if (!j.is(a.treeview)) { return } if (!this.options.followLink || n.attr("href") == "#") { m.preventDefault() } if (k) { this.collapse(l, j) } else { this.expand(l, j) } }; d.prototype.expand = function (k, l) { var n = e.Event(i.expanded); if (this.options.accordion) { var j = l.siblings(a.open); var m = j.children(a.treeviewMenu); this.collapse(m, j) } l.addClass(h.open); k.slideDown(this.options.animationSpeed, function () { e(this.element).trigger(n) }.bind(this)) }; d.prototype.collapse = function (k, j) { var l = e.Event(i.collapsed); k.find(a.open).removeClass(h.open); j.removeClass(h.open); k.slideUp(this.options.animationSpeed, function () { k.find(a.open + " > " + a.treeview).slideUp(); e(this.element).trigger(l) }.bind(this)) }; d.prototype._setUpListeners = function () { var j = this; e(this.element).on("click", this.options.trigger, function (k) { j.toggle(e(this), k) }) }; function g(j) { return this.each(function () { var m = e(this); var l = m.data(b); if (!l) { var k = e.extend({}, f, m.data(), typeof j == "object" && j); m.data(b, new d(m, k)) } }) } var c = e.fn.tree; e.fn.tree = g; e.fn.tree.Constructor = d; e.fn.tree.noConflict = function () { e.fn.tree = c; return this }; e(window).on("load", function () { e(a.data).each(function () { g.call(e(this)) }) }) }(jQuery);