/*! 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 Colorlib * @support * @version 2.4.16-pre * @repository git://github.com/ColorlibHQ/AdminLTE.git * @license MIT */ if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");!function(o){"use strict";function s(t,e){if(this.element=t,this.options=e,this.$overlay=o(e.overlayTemplate),""===e.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()}var r="lte.boxrefresh",a={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'
',onLoadStart:function(){},onLoadDone:function(t){return t}},t='[data-widget="box-refresh"]';function e(i){return this.each(function(){var t=o(this),e=t.data(r);if(!e){var n=o.extend({},a,t.data(),"object"==typeof i&&i);t.data(r,e=new s(t,n))}if("string"==typeof e){if(void 0===e[i])throw new Error("No method named "+i);e[i]()}})}s.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(o(this)),o.get(this.options.source,this.options.params,function(t){this.options.loadInContent&&o(this.element).find(this.options.content).html(t),this.options.onLoadDone.call(o(this),t),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},s.prototype._setUpListeners=function(){o(this.element).on("click",this.options.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},s.prototype._addOverlay=function(){o(this.element).append(this.$overlay)},s.prototype._removeOverlay=function(){o(this.$overlay).remove()};var n=o.fn.boxRefresh;o.fn.boxRefresh=e,o.fn.boxRefresh.Constructor=s,o.fn.boxRefresh.noConflict=function(){return o.fn.boxRefresh=n,this},o(window).on("load",function(){o(t).each(function(){e.call(o(this))})})}(jQuery),function(o){"use strict";function s(t,e){this.element=t,this.options=e,this._setUpListeners()}var r="lte.boxwidget",a={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},t=".box",e=".collapsed-box",d=".box-header",c=".box-body",l=".box-footer",h=".box-tools",f="collapsed-box",p="collapsing.boxwidget",u="collapsed.boxwidget",g="expanding.boxwidget",v="expanded.boxwidget",n="removing.boxwidget",i="removed.boxwidget";function b(i){return this.each(function(){var t=o(this),e=t.data(r);if(!e){var n=o.extend({},a,t.data(),"object"==typeof i&&i);t.data(r,e=new s(t,n))}if("string"==typeof i){if(void 0===e[i])throw new Error("No method named "+i);e[i]()}})}s.prototype.toggle=function(){!o(this.element).is(e)?this.collapse():this.expand()},s.prototype.expand=function(){var t=o.Event(v),e=o.Event(g),n=this.options.collapseIcon,i=this.options.expandIcon;o(this.element).removeClass(f),o(this.element).children(d+", "+c+", "+l).children(h).find("."+i).removeClass(i).addClass(n),o(this.element).children(c+", "+l).slideDown(this.options.animationSpeed,function(){o(this.element).trigger(t)}.bind(this)).trigger(e)},s.prototype.collapse=function(){var t=o.Event(u),e=o.Event(p),n=this.options.collapseIcon,i=this.options.expandIcon;o(this.element).children(d+", "+c+", "+l).children(h).find("."+n).removeClass(n).addClass(i),o(this.element).children(c+", "+l).slideUp(this.options.animationSpeed,function(){o(this.element).addClass(f),o(this.element).trigger(t)}.bind(this)).trigger(e)},s.prototype.remove=function(){var t=o.Event(i),e=o.Event(n);o(this.element).slideUp(this.options.animationSpeed,function(){o(this.element).trigger(t),o(this.element).remove()}.bind(this)).trigger(e)},s.prototype._setUpListeners=function(){var e=this;o(this.element).on("click",this.options.collapseTrigger,function(t){return t&&t.preventDefault(),e.toggle(o(this)),!1}),o(this.element).on("click",this.options.removeTrigger,function(t){return t&&t.preventDefault(),e.remove(o(this)),!1})};var m=o.fn.boxWidget;o.fn.boxWidget=b,o.fn.boxWidget.Constructor=s,o.fn.boxWidget.noConflict=function(){return o.fn.boxWidget=m,this},o(window).on("load",function(){o(t).each(function(){b.call(o(this))})})}(jQuery),function(o){"use strict";function s(t,e){this.element=t,this.options=e,this.hasBindedResize=!1,this.init()}var r="lte.controlsidebar",a={slide:!0},e=".control-sidebar",t='[data-toggle="control-sidebar"]',n=".control-sidebar-open",i=".control-sidebar-bg",d=".wrapper",c=".layout-boxed",l="control-sidebar-open",h="collapsed.controlsidebar",f="expanded.controlsidebar";function p(i){return this.each(function(){var t=o(this),e=t.data(r);if(!e){var n=o.extend({},a,t.data(),"object"==typeof i&&i);t.data(r,e=new s(t,n))}"string"==typeof i&&e.toggle()})}s.prototype.init=function(){o(this.element).is(t)||o(this).on("click",this.toggle),this.fix(),o(window).resize(function(){this.fix()}.bind(this))},s.prototype.toggle=function(t){t&&t.preventDefault(),this.fix(),o(e).is(n)||o("body").is(n)?this.collapse():this.expand()},s.prototype.expand=function(){o(e).show(),this.options.slide?o(e).addClass(l):o("body").addClass(l),o(this.element).trigger(o.Event(f))},s.prototype.collapse=function(){o("body, "+e).removeClass(l),o(e).fadeOut(),o(this.element).trigger(o.Event(h))},s.prototype.fix=function(){o("body").is(c)&&this._fixForBoxed(o(i))},s.prototype._fixForBoxed=function(t){t.css({position:"absolute",height:o(d).height()})};var u=o.fn.controlSidebar;o.fn.controlSidebar=p,o.fn.controlSidebar.Constructor=s,o.fn.controlSidebar.noConflict=function(){return o.fn.controlSidebar=u,this},o(document).on("click",t,function(t){t&&t.preventDefault(),p.call(o(this),"toggle")})}(jQuery),function(i){"use strict";function o(t){this.element=t}var s="lte.directchat",t='[data-widget="chat-pane-toggle"]',e=".direct-chat",n="direct-chat-contacts-open";function r(n){return this.each(function(){var t=i(this),e=t.data(s);e||t.data(s,e=new o(t)),"string"==typeof n&&e.toggle(t)})}o.prototype.toggle=function(t){t.parents(e).first().toggleClass(n)};var a=i.fn.directChat;i.fn.directChat=r,i.fn.directChat.Constructor=o,i.fn.directChat.noConflict=function(){return i.fn.directChat=a,this},i(document).on("click",t,function(t){t&&t.preventDefault(),r.call(i(this),"toggle")})}(jQuery),function(o){"use strict";function s(t){this.options=t,this.init()}var r="lte.pushmenu",a={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},t=".sidebar-collapse",e=".main-sidebar",n=".content-wrapper",i=".sidebar-form .form-control",d='[data-toggle="push-menu"]',c=".sidebar-mini",l=".sidebar-expanded-on-hover",h=".fixed",f="sidebar-collapse",p="sidebar-open",u="sidebar-expanded-on-hover",g="sidebar-mini-expand-feature",v="expanded.pushMenu",b="collapsed.pushMenu";function m(i){return this.each(function(){var t=o(this),e=t.data(r);if(!e){var n=o.extend({},a,t.data(),"object"==typeof i&&i);t.data(r,e=new s(n))}"toggle"===i&&e.toggle()})}s.prototype.init=function(){(this.options.expandOnHover||o("body").is(c+h))&&(this.expandOnHover(),o("body").addClass(g)),o(n).click(function(){o(window).width()<=this.options.collapseScreenSize&&o("body").hasClass(p)&&this.close()}.bind(this)),o(i).click(function(t){t.stopPropagation()})},s.prototype.toggle=function(){var t=o(window).width(),e=!o("body").hasClass(f);t<=this.options.collapseScreenSize&&(e=o("body").hasClass(p)),e?this.close():this.open()},s.prototype.open=function(){o(window).width()>this.options.collapseScreenSize?o("body").removeClass(f).trigger(o.Event(v)):o("body").addClass(p).trigger(o.Event(v))},s.prototype.close=function(){o(window).width()>this.options.collapseScreenSize?o("body").addClass(f).trigger(o.Event(b)):o("body").removeClass(p+" "+f).trigger(o.Event(b))},s.prototype.expandOnHover=function(){o(e).hover(function(){o("body").is(c+t)&&o(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){o("body").is(l)&&this.collapse()}.bind(this))},s.prototype.expand=function(){setTimeout(function(){o("body").removeClass(f).addClass(u)},this.options.expandTransitionDelay)},s.prototype.collapse=function(){setTimeout(function(){o("body").removeClass(u).addClass(f)},this.options.expandTransitionDelay)};var y=o.fn.pushMenu;o.fn.pushMenu=m,o.fn.pushMenu.Constructor=s,o.fn.pushMenu.noConflict=function(){return o.fn.pushMenu=y,this},o(document).on("click",d,function(t){t.preventDefault(),m.call(o(this),"toggle")}),o(window).on("load",function(){m.call(o(d))})}(jQuery),function(o){"use strict";function s(t,e){this.element=t,this.options=e,this._setUpListeners()}var r="lte.todolist",a={onCheck:function(t){return t},onUnCheck:function(t){return t}},e={data:'[data-widget="todo-list"]'},n="done";function t(i){return this.each(function(){var t=o(this),e=t.data(r);if(!e){var n=o.extend({},a,t.data(),"object"==typeof i&&i);t.data(r,e=new s(t,n))}if("string"==typeof e){if(void 0===e[i])throw new Error("No method named "+i);e[i]()}})}s.prototype.toggle=function(t){t.parents(e.li).first().toggleClass(n),t.prop("checked")?this.check(t):this.unCheck(t)},s.prototype.check=function(t){this.options.onCheck.call(t)},s.prototype.unCheck=function(t){this.options.onUnCheck.call(t)},s.prototype._setUpListeners=function(){var t=this;o(this.element).on("change ifChanged","input:checkbox",function(){t.toggle(o(this))})};var i=o.fn.todoList;o.fn.todoList=t,o.fn.todoList.Constructor=s,o.fn.todoList.noConflict=function(){return o.fn.todoList=i,this},o(window).on("load",function(){o(e.data).each(function(){t.call(o(this))})})}(jQuery),function(s){"use strict";function i(t,e){this.element=t,this.options=e,s(this.element).addClass(h),s(a+n,this.element).addClass(l),this._setUpListeners()}var o="lte.tree",r={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},a=".treeview",d=".treeview-menu",c=".menu-open, .active",t='[data-widget="tree"]',n=".active",l="menu-open",h="tree",f="collapsed.tree",p="expanded.tree";function e(n){return this.each(function(){var t=s(this);if(!t.data(o)){var e=s.extend({},r,t.data(),"object"==typeof n&&n);t.data(o,new i(t,e))}})}i.prototype.toggle=function(t,e){var n=t.next(d),i=t.parent(),o=i.hasClass(l);i.is(a)&&(this.options.followLink&&"#"!==t.attr("href")||e.preventDefault(),o?this.collapse(n,i):this.expand(n,i))},i.prototype.expand=function(t,e){var n=s.Event(p);if(this.options.accordion){var i=e.siblings(c),o=i.children(d);this.collapse(o,i)}e.addClass(l),t.slideDown(this.options.animationSpeed,function(){s(this.element).trigger(n),e.height("auto")}.bind(this))},i.prototype.collapse=function(t,e){var n=s.Event(f);e.removeClass(l),t.slideUp(this.options.animationSpeed,function(){s(this.element).trigger(n),e.find(a).removeClass(l).find(d).hide()}.bind(this))},i.prototype._setUpListeners=function(){var e=this;s(this.element).on("click",this.options.trigger,function(t){e.toggle(s(this),t)})};var u=s.fn.tree;s.fn.tree=e,s.fn.tree.Constructor=i,s.fn.tree.noConflict=function(){return s.fn.tree=u,this},s(window).on("load",function(){s(t).each(function(){e.call(s(this))})})}(jQuery),function(a){"use strict";function o(t){this.options=t,this.bindedResize=!1,this.activate()}var s="lte.layout",r={slimscroll:!0,resetHeight:!0},d=".wrapper",c=".content-wrapper",l=".layout-boxed",h=".main-footer",f=".main-header",t=".main-sidebar",e="slimScrollDiv",p=".sidebar",u=".control-sidebar",n=".sidebar-menu",i=".main-header .logo",g="fixed",v="hold-transition";function b(i){return this.each(function(){var t=a(this),e=t.data(s);if(!e){var n=a.extend({},r,t.data(),"object"==typeof i&&i);t.data(s,e=new o(n))}if("string"==typeof i){if(void 0===e[i])throw new Error("No method named "+i);e[i]()}})}o.prototype.activate=function(){this.fix(),this.fixSidebar(),a("body").removeClass(v),this.options.resetHeight&&a("body, html, "+d).css({height:"auto","min-height":"100%"}),this.bindedResize||(a(window).resize(function(){this.fix(),this.fixSidebar(),a(i+", "+p).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),a(n).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),a(n).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},o.prototype.fix=function(){a(l+" > "+d).css("overflow","hidden");var t=a(h).outerHeight()||0,e=a(f).outerHeight()||0,n=e+t,i=a(window).height(),o=a(p).outerHeight()||0;if(a("body").hasClass(g))a(c).css("min-height",i-t);else{var s;s=o+e<=i?(a(c).css("min-height",i-n),i-n):(a(c).css("min-height",o),o);var r=a(u);void 0!==r&&r.height()>s&&a(c).css("min-height",r.height())}},o.prototype.fixSidebar=function(){a("body").hasClass(g)?this.options.slimscroll&&void 0!==a.fn.slimScroll&&0===a(t).find(e).length&&a(p).slimScroll({height:a(window).height()-a(f).height()+"px"}):void 0!==a.fn.slimScroll&&a(p).slimScroll({destroy:!0}).height("auto")};var m=a.fn.layout;a.fn.layout=b,a.fn.layout.Constuctor=o,a.fn.layout.noConflict=function(){return a.fn.layout=m,this},a(window).on("load",function(){b.call(a("body"))})}(jQuery);