Permalink
Please
sign in to comment.
Browse files
Core: Movie uniqueId into its own module and deprecate core module
uniqueId was the last thing in the core module, and it is now just a helper which require all the modules it used to contain. Closes #9647
- Loading branch information
Showing
with
82 additions
and 62 deletions.
- +2 −2 tests/unit/core/core.js
- +2 −1 ui/accordion.js
- +21 −54 ui/core.js
- +2 −1 ui/dialog.js
- +1 −0 ui/menu.js
- +1 −1 ui/selectmenu.js
- +1 −1 ui/tabs.js
- +3 −2 ui/tooltip.js
- +49 −0 ui/unique-id.js
@@ -0,0 +1,49 @@ | ||
/*! | ||
* jQuery UI Unique ID @VERSION | ||
* http://jqueryui.com | ||
* | ||
* Copyright jQuery Foundation and other contributors | ||
* Released under the MIT license. | ||
* http://jquery.org/license | ||
*/ | ||
|
||
//>>label: uniqueId | ||
//>>group: Core | ||
//>>description: Functions to generate and remove uniqueId's | ||
//>>docs: http://api.jqueryui.com/uniqueId/ | ||
|
||
( function( factory ) { | ||
if ( typeof define === "function" && define.amd ) { | ||
|
||
// AMD. Register as an anonymous module. | ||
define( [ "jquery", "./version" ], factory ); | ||
} else { | ||
|
||
// Browser globals | ||
factory( jQuery ); | ||
} | ||
} ( function( $ ) { | ||
|
||
return $.fn.extend( { | ||
uniqueId: ( function() { | ||
var uuid = 0; | ||
|
||
return function() { | ||
return this.each( function() { | ||
if ( !this.id ) { | ||
this.id = "ui-id-" + ( ++uuid ); | ||
} | ||
} ); | ||
}; | ||
} )(), | ||
|
||
removeUniqueId: function() { | ||
return this.each( function() { | ||
if ( /^ui-id-\d+$/.test( this.id ) ) { | ||
$( this ).removeAttr( "id" ); | ||
} | ||
} ); | ||
} | ||
} ); | ||
|
||
} ) ); |
0 comments on commit
37602d7