Permalink
Browse files

Core: Move keyCode into its own module

Ref #9647
  • Loading branch information...
1 parent 677fdbf commit bddb7efe000cf60e455d48f28acef0ef2f295d9d @arschmitz arschmitz committed Jul 15, 2015
Showing with 63 additions and 29 deletions.
  1. +2 −1 ui/accordion.js
  2. +1 −0 ui/autocomplete.js
  3. +1 −0 ui/button.js
  4. +1 −19 ui/core.js
  5. +2 −2 ui/datepicker.js
  6. +1 −0 ui/dialog.js
  7. +45 −0 ui/keycode.js
  8. +1 −0 ui/menu.js
  9. +3 −3 ui/selectmenu.js
  10. +1 −1 ui/slider.js
  11. +1 −0 ui/spinner.js
  12. +1 −0 ui/tabs.js
  13. +3 −3 ui/tooltip.js
View
@@ -22,8 +22,9 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
- "./core",
"./version",
+ "./core",
+ "./keycode",
"./widget"
], factory );
} else {
View
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./keycode",
"./widget",
"./position",
"./version",
View
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./data",
+ "./keycode",
"./version",
"./widget"
], factory );
View
@@ -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;
View
@@ -22,8 +22,8 @@
// AMD. Register as an anonymous module.
define([
"jquery",
- "./core",
- "./version"
+ "./version",
+ "./keycode"
], factory );
} else {
View
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./keycode",
"./widget",
"./button",
"./draggable",
View
@@ -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
+};
+
+} ) );
View
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./version",
+ "./keycode",
"./widget",
"./position"
], factory );
View
@@ -25,10 +25,10 @@
"./core",
"./version",
"./escape-selector",
- "./widget",
+ "./menu",
"./position",
- "./menu"
- ], factory );
+ "./version",
+ "./widget" ], factory );
} else {
// Browser globals
View
@@ -22,7 +22,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
- "./core",
+ "./keycode",
"./mouse",
"./version",
"./widget"
View
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./version",
+ "./keycode",
"./widget",
"./button"
], factory );
View
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./escape-selector",
+ "./keycode",
"./version",
"./widget"
], factory );
View
@@ -23,10 +23,10 @@
define( [
"jquery",
"./core",
+ "./keycode",
+ "./position",
"./version",
- "./widget",
- "./position"
- ], factory );
+ "./widget" ], factory );
} else {
// Browser globals

0 comments on commit bddb7ef

Please sign in to comment.