snipe-it/public/js/build/vendor.js

2 lines
605 KiB
JavaScript
Raw Normal View History

if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");!function(t){"use strict";function e(e,i){if(this.element=e,this.options=i,this.$overlay=t(i.overlayTemplate),""===i.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()}var i="lte.boxrefresh",n={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',onLoadStart:function(){},onLoadDone:function(t){return t}};function s(s){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,a=new e(o,r))}if("string"==typeof a){if(void 0===a[s])throw new Error("No method named "+s);a[s]()}})}e.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(t(this)),t.get(this.options.source,this.options.params,function(e){this.options.loadInContent&&t(this.element).find(this.options.content).html(e),this.options.onLoadDone.call(t(this),e),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},e.prototype._setUpListeners=function(){t(this.element).on("click",this.options.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},e.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},e.prototype._removeOverlay=function(){t(this.$overlay).remove()};var o=t.fn.boxRefresh;t.fn.boxRefresh=s,t.fn.boxRefresh.Constructor=e,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=o,this},t(window).on("load",function(){t('[data-widget="box-refresh"]').each(function(){s.call(t(this))})})}(jQuery),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this._setUpListeners()}var i="lte.boxwidget",n={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},s=".box-header",o=".box-body",a=".box-footer",r=".box-tools",l="collapsed-box";function h(s){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,a=new e(o,r))}if("string"==typeof s){if(void 0===a[s])throw new Error("No method named "+s);a[s]()}})}e.prototype.toggle=function(){t(this.element).is(".collapsed-box")?this.expand():this.collapse()},e.prototype.expand=function(){var e=t.Event("expanded.boxwidget"),i=t.Event("expanding.boxwidget"),n=this.options.collapseIcon,h=this.options.expandIcon;t(this.element).removeClass(l),t(this.element).children(s+", "+o+", "+a).children(r).find("."+h).removeClass(h).addClass(n),t(this.element).children(o+", "+a).slideDown(this.options.animationSpeed,function(){t(this.element).trigger(e)}.bind(this)).trigger(i)},e.prototype.collapse=function(){var e=t.Event("collapsed.boxwidget"),i=t.Event("collapsing.boxwidget"),n=this.options.collapseIcon,h=this.options.expandIcon;t(this.element).children(s+", "+o+", "+a).children(r).find("."+n).removeClass(n).addClass(h),t(this.element).children(o+", "+a).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(l),t(this.element).trigger(e)}.bind(this)).trigger(i)},e.prototype.remove=function(){var e=t.Event("removed.boxwidget"),i=t.Event("removing.boxwidget");t(this.element).slideUp(this.options.animationSpeed,function(){t(this.element).trigger(e),t(this.element).remove()}.bind(this)).trigger(i)},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.collapseTrigger,function(i){return i&&i.preventDefault(),e.toggle(t(this)),!1}),t(this.element).on("click",this.options.removeTrigger,function(i){return i&&i.preventDefault(),e.remove(t(this)),!1})};var u=t.fn.boxWidget;t.fn.boxWidget=h,t.fn.boxWidget.Constructor=e,t.fn.boxWidget.noConflict=function(){return t.fn.boxWidget=u,this},t(window).on("load",function(){t(".box").each(function(){h.call(t(this))})})}(jQuery),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this.hasBindedResi