All: Wrap source files with UMD return exports

Ref #9464
Ref gh-1029
This commit is contained in:
Rafael Xavier de Souza 2013-07-12 13:40:48 -03:00
parent 2651f4571e
commit 96e027e4b1
38 changed files with 609 additions and 99 deletions

View File

@ -18,6 +18,7 @@
"jquery": true,
"globals": {
"define": false,
"Globalize": false
}
}

View File

@ -12,9 +12,23 @@
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget( "ui.accordion", {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget( "ui.accordion", {
version: "@VERSION",
options: {
active: 0,
@ -562,4 +576,4 @@ $.widget( "ui.accordion", {
}
});
})( jQuery );
}));

View File

@ -14,7 +14,23 @@
* jquery.ui.position.js
* jquery.ui.menu.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget",
"./jquery.ui.position",
"./jquery.ui.menu"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
$.widget( "ui.autocomplete", {
version: "@VERSION",
@ -602,4 +618,6 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
}
});
}( jQuery ));
return $.ui.autocomplete;
}));

View File

@ -12,7 +12,21 @@
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
var lastActive,
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
@ -390,4 +404,6 @@ $.widget( "ui.buttonset", {
}
});
}( jQuery ) );
return $.ui.button;
}));

14
ui/jquery.ui.core.js vendored
View File

@ -8,7 +8,17 @@
*
* http://api.jqueryui.com/category/ui-core/
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
// $.ui might exist from components with no dependencies, e.g., $.ui.position
$.ui = $.ui || {};
@ -286,4 +296,4 @@ $.ui.plugin = {
}
};
})( jQuery );
}));

View File

@ -11,7 +11,20 @@
* Depends:
* jquery.ui.core.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
$.extend($.ui, { datepicker: { version: "@VERSION" } });
@ -2056,4 +2069,6 @@ $.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime();
$.datepicker.version = "@VERSION";
})(jQuery);
return $.datepicker;
}));

View File

@ -17,9 +17,28 @@
* jquery.ui.position.js
* jquery.ui.resizable.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget( "ui.dialog", {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget",
"./jquery.ui.button",
"./jquery.ui.draggable",
"./jquery.ui.mouse",
"./jquery.ui.position",
"./jquery.ui.resizable"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget( "ui.dialog", {
version: "@VERSION",
options: {
appendTo: "body",
@ -841,4 +860,4 @@ $.widget( "ui.dialog", {
}
});
}( jQuery ));
}));

View File

@ -13,7 +13,22 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.mouse",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
$.widget("ui.draggable", $.ui.mouse, {
version: "@VERSION",
@ -1004,4 +1019,6 @@ $.ui.plugin.add("draggable", "zIndex", {
}
});
})(jQuery);
return $.ui.draggable;
}));

View File

@ -14,7 +14,23 @@
* jquery.ui.mouse.js
* jquery.ui.draggable.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget",
"./jquery.ui.mouse",
"./jquery.ui.draggable"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
$.widget( "ui.droppable", {
version: "@VERSION",
@ -401,4 +417,6 @@ $.ui.ddmanager = {
}
};
})( jQuery );
return $.ui.droppable;
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.blind = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.blind = function( o, done ) {
// Create element
var el = $( this ),
rvertical = /up|down|vertical/,
@ -77,4 +90,4 @@ $.effects.effect.blind = function( o, done ) {
});
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.bounce = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.bounce = function( o, done ) {
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
@ -110,4 +123,4 @@ $.effects.effect.bounce = function( o, done ) {
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.clip = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.clip = function( o, done ) {
// Create element
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
@ -64,4 +77,4 @@ $.effects.effect.clip = function( o, done ) {
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.drop = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.drop = function( o, done ) {
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
@ -62,4 +75,4 @@ $.effects.effect.drop = function( o, done ) {
});
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.explode = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.explode = function( o, done ) {
var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
cells = rows,
@ -94,4 +107,4 @@ $.effects.effect.explode = function( o, done ) {
}
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.fade = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.fade = function( o, done ) {
var el = $( this ),
mode = $.effects.setMode( el, o.mode || "toggle" );
@ -27,4 +40,4 @@ $.effects.effect.fade = function( o, done ) {
});
};
})( jQuery );
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.fold = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.fold = function( o, done ) {
// Create element
var el = $( this ),
@ -73,4 +86,4 @@ $.effects.effect.fold = function( o, done ) {
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.highlight = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.highlight = function( o, done ) {
var elem = $( this ),
props = [ "backgroundImage", "backgroundColor", "opacity" ],
mode = $.effects.setMode( elem, o.mode || "show" ),
@ -47,4 +60,4 @@ $.effects.effect.highlight = function( o, done ) {
});
};
})(jQuery);
}));

View File

@ -12,9 +12,23 @@
* jquery.ui.effect.js
* jquery.ui.effect-scale.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.puff = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect",
"./jquery.ui.effect-scale"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.puff = function( o, done ) {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || "hide" ),
hide = mode === "hide",
@ -47,4 +61,4 @@ $.effects.effect.puff = function( o, done ) {
elem.effect( o );
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.pulsate = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.pulsate = function( o, done ) {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || "show" ),
show = mode === "show",
@ -60,4 +73,4 @@ $.effects.effect.pulsate = function( o, done ) {
elem.dequeue();
};
})(jQuery);
}));

View File

@ -12,9 +12,23 @@
* jquery.ui.effect.js
* jquery.ui.effect-size.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.scale = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect",
"./jquery.ui.effect-size"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.scale = function( o, done ) {
// Create element
var el = $( this ),
@ -76,4 +90,4 @@ $.effects.effect.scale = function( o, done ) {
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.shake = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.shake = function( o, done ) {
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
@ -71,4 +84,4 @@ $.effects.effect.shake = function( o, done ) {
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.size = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.size = function( o, done ) {
// Create element
var original, baseline, factor,
@ -220,4 +233,4 @@ $.effects.effect.size = function( o, done ) {
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.slide = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.slide = function( o, done ) {
// Create element
var el = $( this ),
@ -61,4 +74,4 @@ $.effects.effect.slide = function( o, done ) {
});
};
})(jQuery);
}));

View File

@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.effects.effect.transfer = function( o, done ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.effect"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.effects.effect.transfer = function( o, done ) {
var elem = $( this ),
target = $( o.to ),
targetFixed = target.css( "position" ) === "fixed",
@ -44,4 +57,4 @@ $.effects.effect.transfer = function( o, done ) {
});
};
})(jQuery);
}));

View File

@ -8,7 +8,17 @@
*
* http://api.jqueryui.com/category/effects-core/
*/
(function($, undefined) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
var dataSpace = "ui-effects-";
@ -1282,4 +1292,6 @@ $.each( baseEasings, function( name, easeIn ) {
})();
})(jQuery);
return $.effects;
}));

21
ui/jquery.ui.menu.js vendored
View File

@ -13,9 +13,24 @@
* jquery.ui.widget.js
* jquery.ui.position.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget( "ui.menu", {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget",
"./jquery.ui.position"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget( "ui.menu", {
version: "@VERSION",
defaultElement: "<ul>",
delay: 300,
@ -627,4 +642,4 @@ $.widget( "ui.menu", {
}
});
}( jQuery ));
}));

19
ui/jquery.ui.mouse.js vendored
View File

@ -11,14 +11,27 @@
* Depends:
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
var mouseHandled = false;
$( document ).mouseup( function() {
mouseHandled = false;
});
$.widget("ui.mouse", {
return $.widget("ui.mouse", {
version: "@VERSION",
options: {
cancel: "input,textarea,button,select,option",
@ -174,4 +187,4 @@ $.widget("ui.mouse", {
_mouseCapture: function(/* event */) { return true; }
});
})(jQuery);
}));

View File

@ -8,7 +8,17 @@
*
* http://api.jqueryui.com/position/
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
(function() {
$.ui = $.ui || {};
@ -498,4 +508,7 @@ $.ui.position = {
})();
})();
}( jQuery ) );
return $.ui.position;
}));

View File

@ -12,9 +12,23 @@
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget( "ui.progressbar", {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget( "ui.progressbar", {
version: "@VERSION",
options: {
max: 100,
@ -146,4 +160,4 @@ $.widget( "ui.progressbar", {
}
});
})( jQuery );
}));

View File

@ -13,7 +13,22 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.mouse",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
$.widget("ui.resizable", $.ui.mouse, {
version: "@VERSION",
@ -1021,4 +1036,6 @@ $.ui.plugin.add("resizable", "grid", {
});
})(jQuery);
return $.ui.resizable;
}));

View File

@ -13,9 +13,24 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget("ui.selectable", $.ui.mouse, {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.mouse",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget("ui.selectable", $.ui.mouse, {
version: "@VERSION",
options: {
appendTo: "body",
@ -274,4 +289,4 @@ $.widget("ui.selectable", $.ui.mouse, {
});
})(jQuery);
}));

View File

@ -16,7 +16,7 @@
*/
(function( $, undefined ) {
$.widget( "ui.selectmenu", {
return $.widget( "ui.selectmenu", {
version: "@VERSION",
defaultElement: "<select>",
options: {

View File

@ -13,9 +13,24 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget( "ui.slider", $.ui.mouse, {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.mouse",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget( "ui.slider", $.ui.mouse, {
version: "@VERSION",
widgetEventPrefix: "slide",
@ -679,4 +694,4 @@ $.widget( "ui.slider", $.ui.mouse, {
}
});
}(jQuery));
}));

View File

@ -13,9 +13,24 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget("ui.sortable", $.ui.mouse, {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.mouse",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget("ui.sortable", $.ui.mouse, {
version: "@VERSION",
widgetEventPrefix: "sort",
ready: false,
@ -1297,4 +1312,4 @@ $.widget("ui.sortable", $.ui.mouse, {
});
})(jQuery);
}));

View File

@ -13,7 +13,22 @@
* jquery.ui.widget.js
* jquery.ui.button.js
*/
(function( $ ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget",
"./jquery.ui.button"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
function spinner_modifier( fn ) {
return function() {
@ -26,7 +41,7 @@ function spinner_modifier( fn ) {
};
}
$.widget( "ui.spinner", {
return $.widget( "ui.spinner", {
version: "@VERSION",
defaultElement: "<input>",
widgetEventPrefix: "spin",
@ -502,4 +517,4 @@ $.widget( "ui.spinner", {
}
});
}( jQuery ) );
}));

20
ui/jquery.ui.tabs.js vendored
View File

@ -12,9 +12,23 @@
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget( "ui.tabs", {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget( "ui.tabs", {
version: "@VERSION",
delay: 300,
options: {
@ -855,4 +869,4 @@ $.widget( "ui.tabs", {
}
});
})( jQuery );
}));

View File

@ -13,9 +13,24 @@
* jquery.ui.widget.js
* jquery.ui.position.js
*/
(function( $ ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
$.widget( "ui.tooltip", {
// AMD. Register as an anonymous module.
define([
"jquery",
"./jquery.ui.core",
"./jquery.ui.widget",
"./jquery.ui.position"
], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
return $.widget( "ui.tooltip", {
version: "@VERSION",
options: {
content: function() {
@ -431,4 +446,4 @@ $.widget( "ui.tooltip", {
}
});
}( jQuery ) );
}));

View File

@ -8,7 +8,17 @@
*
* http://api.jqueryui.com/jQuery.widget/
*/
(function( $, undefined ) {
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
var widget_uuid = 0,
widget_slice = Array.prototype.slice;
@ -529,4 +539,6 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
};
});
})( jQuery );
return $.widget;
}));