Permalink
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...
1 parent 72bfafb commit 37602d7e645964e4f5e4d06ef313081c8eb60bf1 @arschmitz arschmitz committed Jul 16, 2015
Showing with 82 additions and 62 deletions.
  1. +2 −2 tests/unit/core/core.js
  2. +2 −1 ui/accordion.js
  3. +21 −54 ui/core.js
  4. +2 −1 ui/dialog.js
  5. +1 −0 ui/menu.js
  6. +1 −1 ui/selectmenu.js
  7. +1 −1 ui/tabs.js
  8. +3 −2 ui/tooltip.js
  9. +49 −0 ui/unique-id.js
@@ -1,9 +1,9 @@
define( [
"jquery",
"lib/common",
- "ui/core",
"ui/form",
- "ui/labels"
+ "ui/labels",
+ "ui/unique-id"
], function( $, common ) {
module( "core - jQuery extensions" );
View
@@ -23,8 +23,9 @@
define( [
"jquery",
"./version",
- "./core",
+ "./version",
"./keycode",
+ "./unique-id",
"./widget"
], factory );
} else {
View
@@ -12,58 +12,25 @@
//>>group: UI Core
//>>description: The core of jQuery UI, required for all interactions and widgets.
//>>docs: http://api.jqueryui.com/category/ui-core/
-//>>demos: http://jqueryui.com/
-( function( factory ) {
- if ( typeof define === "function" && define.amd ) {
-
- // AMD. Register as an anonymous module.
- define( [
- "jquery",
- "./data",
- "./disable-selection",
- "./focusable",
- "./form",
- "./ie",
- "./keycode",
- "./labels",
- "./jquery-1-7",
- "./plugin",
- "./safe-active-element",
- "./safe-blur",
- "./tabbable",
- "./scroll-parent",
- "./version"
- ], factory );
- } else {
-
- // Browser globals
- factory( jQuery );
- }
-}( function( $ ) {
-
-// plugins
-$.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" );
- }
- } );
- }
-} );
-
-} ) );
+// This file is deprecated in 1.12.0 to be removed in 1.13
+( function() {
+define( [
+ "jquery",
+ "./data",
+ "./disable-selection",
+ "./focusable",
+ "./form",
+ "./ie",
+ "./keycode",
+ "./labels",
+ "./jquery-1-7",
+ "./plugin",
+ "./safe-active-element",
+ "./safe-blur",
+ "./scroll-parent",
+ "./tabbable",
+ "./unique-id",
+ "./version"
+] );
+} )();
View
@@ -34,7 +34,8 @@
"./resizable",
"./safe-active-element",
"./safe-blur",
- "./tabbable"
+ "./tabbable",
+ "./unique-id"
], factory );
} else {
View
@@ -27,6 +27,7 @@
"./keycode",
"./position",
"./safe-active-element",
+ "./unique-id",
"./widget"
], factory );
} else {
View
@@ -22,13 +22,13 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
- "./core",
"./version",
"./escape-selector",
"./menu",
"./keycode",
"./labels",
"./position",
+ "./unique-id",
"./version",
"./widget"
], factory );
View
@@ -22,10 +22,10 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
- "./core",
"./escape-selector",
"./keycode",
"./safe-active-element",
+ "./unique-id",
"./version",
"./widget"
], factory );
View
@@ -22,11 +22,12 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
- "./core",
"./keycode",
"./position",
+ "./unique-id",
"./version",
- "./widget" ], factory );
+ "./widget"
+ ], factory );
} else {
// Browser globals
View
@@ -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

Please sign in to comment.