Вход Регистрация
Файл: templates/backend/default/assets/plugins/jquery-file-upload/js/vendor/jquery.ui.widget.min.js
Строк: 364
<?php
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e,t){var n=0,i=Array.prototype.slice,o=e.cleanData;e.cleanData=function(t){for(var n,i=0;null!=(n=t[i]);i++)try{e(n).triggerHandler("remove")}catch(a){}o(t)},e.widget=function(t,n,i){var o,a,s,r,l={},c=t.split(".")[0];t=t.split(".")[1],o=c+"-"+t,i||(i=n,n=e.Widget),e.expr[":"][o.toLowerCase()]=function(t){return!!e.data(t,o)},e[c]=e[c]||{},a=e[c][t],s=e[c][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new s(e,t)},e.extend(s,a,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),r=new n,r.options=e.widget.extend({},r.options),e.each(i,function(t,i){return e.isFunction(i)?(l[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},o=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,a=this._superApply;return this._super=e,this._superApply=o,t=i.apply(this,arguments),this._super=n,this._superApply=a,t}}(),void 0):(l[t]=i,void 0)}),s.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix:t},l,{constructor:s,namespace:c,widgetName:t,widgetFullName:o}),a?(e.each(a._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,s,n._proto)}),delete a._childConstructors):n._childConstructors.push(s),e.widget.bridge(t,s)},e.widget.extend=function(n){for(var o,a,s=i.call(arguments,1),r=0,l=s.length;l>r;r++)for(o in s[r])a=s[r][o],s[r].hasOwnProperty(o)&&a!==t&&(n[o]=e.isPlainObject(a)?e.isPlainObject(n[o])?e.widget.extend({},n[o],a):e.widget.extend({},a):a);return n},e.widget.bridge=function(n,o){var a=o.prototype.widgetFullName||n;e.fn[n]=function(s){var r="string"==typeof s,l=i.call(arguments,1),c=this;return s=!r&&l.length?e.widget.extend.apply(null,[s].concat(l)):s,r?this.each(function(){var i,o=e.data(this,a);return o?e.isFunction(o[s])&&"_"!==s.charAt(0)?(i=o[s].apply(o,l),i!==o&&i!==t?(c=i&&i.jquery?c.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+s+"' for "+n+" widget instance"):e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+s+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(s||{})._init():e.data(this,a,new o(s,this))}),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,i){var o,a,s,r=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n)if(r={},o=n.split("."),n=o.shift(),o.length){for(a=r[n]=e.widget.extend({},this.options[n]),s=0;s<o.length-1;s++)a[o[s]]=a[o[s]]||{},a=a[o[s]];if(n=o.pop(),i===t)return a[n]===t?null:a[n];a[n]=i}else{if(i===t)return this.options[n]===t?null:this.options[n];r[n]=i}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,i){var o,a=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=o=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,o=this.widget()),e.each(i,function(i,s){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof s?a[s]:s).apply(a,arguments):void 0}"string"!=typeof s&&(r.guid=s.guid=s.guid||r.guid||e.guid++);var l=i.match(/^(w+)s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,r):n.bind(c,r)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,i){var o,a,s=this.options[t];if(i=i||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],a=n.originalEvent)for(o in a)o in n||(n[o]=a[o]);return this.element.trigger(n,i),!(e.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,o,a){"string"==typeof o&&(o={effect:o});var s,r=o?o===!0||"number"==typeof o?n:o.effect||n:t;o=o||{},"number"==typeof o&&(o={duration:o}),s=!e.isEmptyObject(o),o.complete=a,o.delay&&i.delay(o.delay),s&&e.effects&&e.effects.effect[r]?i[t](o):r!==t&&i[r]?i[r](o.duration,o.easing,a):i.queue(function(n){e(this)[t](),a&&a.call(i[0]),n()})}})});
?>
Онлайн: 0
Реклама