aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-07-15 18:03:01 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-08-08 00:29:36 -0400
commitbddb7efe000cf60e455d48f28acef0ef2f295d9d (patch)
treeb1a4d336d52d47fbb74ec6de6b877b9c7b3911e5
parent677fdbf7bef71d12998191e0b97c2c5cd34349be (diff)
downloadjquery-ui-bddb7efe000cf60e455d48f28acef0ef2f295d9d.tar.gz
jquery-ui-bddb7efe000cf60e455d48f28acef0ef2f295d9d.zip
Core: Move keyCode into its own module
Ref #9647
-rw-r--r--ui/accordion.js3
-rw-r--r--ui/autocomplete.js1
-rw-r--r--ui/button.js1
-rw-r--r--ui/core.js20
-rw-r--r--ui/datepicker.js4
-rw-r--r--ui/dialog.js1
-rw-r--r--ui/keycode.js45
-rw-r--r--ui/menu.js1
-rw-r--r--ui/selectmenu.js6
-rw-r--r--ui/slider.js2
-rw-r--r--ui/spinner.js1
-rw-r--r--ui/tabs.js1
-rw-r--r--ui/tooltip.js6
13 files changed, 63 insertions, 29 deletions
diff --git a/ui/accordion.js b/ui/accordion.js
index 5a2c128c6..6cc0533c0 100644
--- a/ui/accordion.js
+++ b/ui/accordion.js
@@ -22,8 +22,9 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
- "./core",
"./version",
+ "./core",
+ "./keycode",
"./widget"
], factory );
} else {
diff --git a/ui/autocomplete.js b/ui/autocomplete.js
index 1bf8c84be..b535b3966 100644
--- a/ui/autocomplete.js
+++ b/ui/autocomplete.js
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./keycode",
"./widget",
"./position",
"./version",
diff --git a/ui/button.js b/ui/button.js
index 8c9894044..ec6525d2b 100644
--- a/ui/button.js
+++ b/ui/button.js
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./data",
+ "./keycode",
"./version",
"./widget"
], factory );
diff --git a/ui/core.js b/ui/core.js
index 006011f3c..6c948d058 100644
--- a/ui/core.js
+++ b/ui/core.js
@@ -26,6 +26,7 @@
"./focusable",
"./form",
"./ie",
+ "./keycode",
"./version"
], factory );
} else {
@@ -37,25 +38,6 @@
$.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;
diff --git a/ui/datepicker.js b/ui/datepicker.js
index 372d87c60..406a0124c 100644
--- a/ui/datepicker.js
+++ b/ui/datepicker.js
@@ -22,8 +22,8 @@
// AMD. Register as an anonymous module.
define([
"jquery",
- "./core",
- "./version"
+ "./version",
+ "./keycode"
], factory );
} else {
diff --git a/ui/dialog.js b/ui/dialog.js
index 4dbf2ab34..f17aaccd1 100644
--- a/ui/dialog.js
+++ b/ui/dialog.js
@@ -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
index 000000000..17687fbbd
--- /dev/null
+++ b/ui/keycode.js
@@ -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
+};
+
+} ) );
diff --git a/ui/menu.js b/ui/menu.js
index e39fb0bdb..be59e7322 100644
--- a/ui/menu.js
+++ b/ui/menu.js
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./version",
+ "./keycode",
"./widget",
"./position"
], factory );
diff --git a/ui/selectmenu.js b/ui/selectmenu.js
index fe1a7fa99..dc8df9f1b 100644
--- a/ui/selectmenu.js
+++ b/ui/selectmenu.js
@@ -25,10 +25,10 @@
"./core",
"./version",
"./escape-selector",
- "./widget",
+ "./menu",
"./position",
- "./menu"
- ], factory );
+ "./version",
+ "./widget" ], factory );
} else {
// Browser globals
diff --git a/ui/slider.js b/ui/slider.js
index db5f341b3..ff883a1eb 100644
--- a/ui/slider.js
+++ b/ui/slider.js
@@ -22,7 +22,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
- "./core",
+ "./keycode",
"./mouse",
"./version",
"./widget"
diff --git a/ui/spinner.js b/ui/spinner.js
index fa07c9ab1..665bf58d0 100644
--- a/ui/spinner.js
+++ b/ui/spinner.js
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./version",
+ "./keycode",
"./widget",
"./button"
], factory );
diff --git a/ui/tabs.js b/ui/tabs.js
index 4cd80a1df..526dc6e82 100644
--- a/ui/tabs.js
+++ b/ui/tabs.js
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./escape-selector",
+ "./keycode",
"./version",
"./widget"
], factory );
diff --git a/ui/tooltip.js b/ui/tooltip.js
index c58bc65dc..3d3322fb1 100644
--- a/ui/tooltip.js
+++ b/ui/tooltip.js
@@ -23,10 +23,10 @@
define( [
"jquery",
"./core",
+ "./keycode",
+ "./position",
"./version",
- "./widget",
- "./position"
- ], factory );
+ "./widget" ], factory );
} else {
// Browser globals