aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChi Cheng <cloudream@gmail.com>2008-08-24 15:32:22 +0000
committerChi Cheng <cloudream@gmail.com>2008-08-24 15:32:22 +0000
commit293d6bc595be3848386f4d4f9fa702141ff61d8b (patch)
treea803fb4b8a3fcb1db3bfc38a0c6189cf0830404d
parentad3fd31b44d9f76eb5a3b657f523c4d26930725a (diff)
downloadjquery-ui-293d6bc595be3848386f4d4f9fa702141ff61d8b.tar.gz
jquery-ui-293d6bc595be3848386f4d4f9fa702141ff61d8b.zip
Spinner: use keyCode from ui.core.js
-rw-r--r--ui/ui.spinner.js26
1 files changed, 3 insertions, 23 deletions
diff --git a/ui/ui.spinner.js b/ui/ui.spinner.js
index 99b5eae89..7aba08a89 100644
--- a/ui/ui.spinner.js
+++ b/ui/ui.spinner.js
@@ -56,7 +56,7 @@ $.widget('ui.spinner', {
self._up(e);
})
.bind('keydown.spinner', function(e) {
- var KEYS = $.ui.spinner.keys;
+ var KEYS = $.keyCode;
if (e.keyCode == KEYS.SPACE || e.keyCode == KEYS.RETURN) {
$(this).addClass('ui-spinner-pressed');
if(!self.counter) self.counter = 1;
@@ -95,7 +95,7 @@ $.widget('ui.spinner', {
self._down(e);
})
.bind('keydown.spinner', function(e) {
- var KEYS = $.ui.spinner.keys;
+ var KEYS = $.keyCode;
if (e.keyCode == KEYS.SPACE || e.keyCode == KEYS.RETURN) {
$(this).addClass('ui-spinner-pressed');
if(!self.counter) self.counter = 1;
@@ -173,7 +173,7 @@ $.widget('ui.spinner', {
this._propagate('change', e);
},
_keydown: function(e) {
- var KEYS = $.ui.spinner.keys;
+ var KEYS = $.keyCode;
if(e.keyCode == KEYS.UP) this._up(e);
if(e.keyCode == KEYS.DOWN) this._down(e);
@@ -278,26 +278,6 @@ $.extend($.ui.spinner, {
}
return s;
}
- },
- keys: {
- BACKSPACE: 8,
- TAB: 9,
- RETURN: 13,
- ESC: 27,
- SPACE: 32,
- PAGEUP: 33,
- PAGEDOWN: 34,
- END: 35,
- HOME: 36,
- LEFT: 37,
- UP: 38,
- RIGHT: 39,
- DOWN: 40,
- DEL: 46,
- COMMA: 188,
- PERIOD: 190,
- NUMPAD_DECIMAL: 110,
- NUMPAD_SUBTRACT: 109
}
});