]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Move keyCode into its own module
authorAlexander Schmitz <arschmitz@gmail.com>
Wed, 15 Jul 2015 22:03:01 +0000 (18:03 -0400)
committerAlexander Schmitz <arschmitz@gmail.com>
Sat, 8 Aug 2015 04:29:36 +0000 (00:29 -0400)
Ref #9647

13 files changed:
ui/accordion.js
ui/autocomplete.js
ui/button.js
ui/core.js
ui/datepicker.js
ui/dialog.js
ui/keycode.js [new file with mode: 0644]
ui/menu.js
ui/selectmenu.js
ui/slider.js
ui/spinner.js
ui/tabs.js
ui/tooltip.js

index 5a2c128c6b7466fc78af6ce9a7ce0a823a7973f7..6cc0533c09df649a2d0620a2e225a44957f8ca5c 100644 (file)
@@ -22,8 +22,9 @@
                // AMD. Register as an anonymous module.
                define( [
                        "jquery",
-                       "./core",
                        "./version",
+                       "./core",
+                       "./keycode",
                        "./widget"
                ], factory );
        } else {
index 1bf8c84be6cd6b4fdccc31bd7a67a4afda79d599..b535b3966c9cf0ca3c46a7d37069c3b90f355cc3 100644 (file)
@@ -23,6 +23,7 @@
                define( [
                        "jquery",
                        "./core",
+                       "./keycode",
                        "./widget",
                        "./position",
                        "./version",
index 8c9894044f7697658a1a08edb53399a58c1e33b5..ec6525d2b4a0ea54eaa27c1f15ec55f0cccd58a9 100644 (file)
@@ -24,6 +24,7 @@
                        "jquery",
                        "./core",
                        "./data",
+                       "./keycode",
                        "./version",
                        "./widget"
                ], factory );
index 006011f3c458fd89579da24626b685ba13d2222b..6c948d0589d7dcdbb961f8647b11408fc6357f2f 100644 (file)
@@ -26,6 +26,7 @@
                        "./focusable",
                        "./form",
                        "./ie",
+                       "./keycode",
                        "./version"
                ], factory );
        } else {
 
 $.extend( $.ui, {
 
-       keyCode: {
-               BACKSPACE: 8,
-               COMMA: 188,
-               DELETE: 46,
-               DOWN: 40,
-               END: 35,
-               ENTER: 13,
-               ESCAPE: 27,
-               HOME: 36,
-               LEFT: 37,
-               PAGE_DOWN: 34,
-               PAGE_UP: 33,
-               PERIOD: 190,
-               RIGHT: 39,
-               SPACE: 32,
-               TAB: 9,
-               UP: 38
-       },
-
        // Internal use only
        safeActiveElement: function( document ) {
                var activeElement;
index 372d87c60545d420c5b197360651e136951d2a7c..406a0124c6cd30a78d37295f1bc6ea0f92f4f59a 100644 (file)
@@ -22,8 +22,8 @@
                // AMD. Register as an anonymous module.
                define([
                        "jquery",
-                       "./core",
-                       "./version"
+                       "./version",
+                       "./keycode"
                ], factory );
        } else {
 
index 4dbf2ab34317da29407723ad9488e97e9bb90851..f17aaccd1de8198092c834b1bdc28799a4da1d92 100644 (file)
@@ -23,6 +23,7 @@
                define( [
                        "jquery",
                        "./core",
+                       "./keycode",
                        "./widget",
                        "./button",
                        "./draggable",
diff --git a/ui/keycode.js b/ui/keycode.js
new file mode 100644 (file)
index 0000000..17687fb
--- /dev/null
@@ -0,0 +1,45 @@
+/*!
+ * jQuery UI Keycode @VERSION
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Keycode
+//>>group: Core
+//>>description: Provide keycodes as keynames
+//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
+
+( 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 $.ui.keyCode = {
+       BACKSPACE: 8,
+       COMMA: 188,
+       DELETE: 46,
+       DOWN: 40,
+       END: 35,
+       ENTER: 13,
+       ESCAPE: 27,
+       HOME: 36,
+       LEFT: 37,
+       PAGE_DOWN: 34,
+       PAGE_UP: 33,
+       PERIOD: 190,
+       RIGHT: 39,
+       SPACE: 32,
+       TAB: 9,
+       UP: 38
+};
+
+} ) );
index e39fb0bdb85a35552153467c5b440b7011d48295..be59e73227e9a97a4bbf4d0062d1eb1ce53fc41e 100644 (file)
@@ -24,6 +24,7 @@
                        "jquery",
                        "./core",
                        "./version",
+                       "./keycode",
                        "./widget",
                        "./position"
                ], factory );
index fe1a7fa999ae737da242568a4b14b791ebbe8e32..dc8df9f1ba506df5de840d7b5a561572f65bda38 100644 (file)
                        "./core",
                        "./version",
                        "./escape-selector",
-                       "./widget",
+                       "./menu",
                        "./position",
-                       "./menu"
-               ], factory );
+                       "./version",
+                       "./widget" ], factory );
        } else {
 
                // Browser globals
index db5f341b3ca5acb9973856befbd92dfbcf9fca10..ff883a1ebb39d9fadc8ec4708b8b129bb029ea86 100644 (file)
@@ -22,7 +22,7 @@
                // AMD. Register as an anonymous module.
                define([
                        "jquery",
-                       "./core",
+                       "./keycode",
                        "./mouse",
                        "./version",
                        "./widget"
index fa07c9ab1c46c28df919ffaa8c8b8d2e66f55ba5..665bf58d0a976695da004f48ccd8887085d88f1b 100644 (file)
@@ -24,6 +24,7 @@
                        "jquery",
                        "./core",
                        "./version",
+                       "./keycode",
                        "./widget",
                        "./button"
                ], factory );
index 4cd80a1df4aa7d27ffa765eff91d3395a23ada0b..526dc6e826e31644964eb3a25743ef739e174339 100644 (file)
@@ -24,6 +24,7 @@
                        "jquery",
                        "./core",
                        "./escape-selector",
+                       "./keycode",
                        "./version",
                        "./widget"
                ], factory );
index c58bc65dc836a9ff505323e0b2b04932cf24410e..3d3322fb15fbdba170b4416cabc9f35f3569aba5 100644 (file)
                define( [
                        "jquery",
                        "./core",
+                       "./keycode",
+                       "./position",
                        "./version",
-                       "./widget",
-                       "./position"
-               ], factory );
+                       "./widget" ], factory );
        } else {
 
                // Browser globals