2015-07-15 22:31:39 +00:00
|
|
|
( function( factory ) {
|
2021-06-06 22:58:12 +00:00
|
|
|
"use strict";
|
|
|
|
|
2015-07-15 22:31:39 +00:00
|
|
|
if ( typeof define === "function" && define.amd ) {
|
|
|
|
|
|
|
|
// AMD. Register as an anonymous module.
|
|
|
|
define( [ "jquery", "./version" ], factory );
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// Browser globals
|
|
|
|
factory( jQuery );
|
|
|
|
}
|
2021-06-06 22:58:12 +00:00
|
|
|
} )( function( $ ) {
|
|
|
|
"use strict";
|
2015-07-15 22:31:39 +00:00
|
|
|
|
|
|
|
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
|
|
|
|
return $.ui.plugin = {
|
|
|
|
add: function( module, option, set ) {
|
|
|
|
var i,
|
|
|
|
proto = $.ui[ module ].prototype;
|
|
|
|
for ( i in set ) {
|
|
|
|
proto.plugins[ i ] = proto.plugins[ i ] || [];
|
|
|
|
proto.plugins[ i ].push( [ option, set[ i ] ] );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
call: function( instance, name, args, allowDisconnected ) {
|
|
|
|
var i,
|
|
|
|
set = instance.plugins[ name ];
|
|
|
|
|
|
|
|
if ( !set ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-03-31 04:31:10 +00:00
|
|
|
if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||
|
|
|
|
instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
|
2015-07-15 22:31:39 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( i = 0; i < set.length; i++ ) {
|
|
|
|
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
|
|
|
set[ i ][ 1 ].apply( instance.element, args );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2021-06-06 22:58:12 +00:00
|
|
|
} );
|