X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/src/core/Element.keys.js..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/src/core/src/dom/Element.keys.js diff --git a/src/core/Element.keys.js b/src/core/src/dom/Element.keys.js similarity index 66% rename from src/core/Element.keys.js rename to src/core/src/dom/Element.keys.js index b6f020b0..af02067e 100644 --- a/src/core/Element.keys.js +++ b/src/core/src/dom/Element.keys.js @@ -1,20 +1,14 @@ -/*! - * Ext JS Library 3.3.1 - * Copyright(c) 2006-2010 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ /** - * @class Ext.Element + * @class Ext.core.Element */ -Ext.Element.addMethods({ +Ext.core.Element.addMethods({ /** * Convenience method for constructing a KeyMap * @param {Number/Array/Object/String} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options: * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)} * @param {Function} fn The function to call * @param {Object} scope (optional) The scope (this reference) in which the specified function is executed. Defaults to this Element. - * @return {Ext.KeyMap} The KeyMap created + * @return {Ext.util.KeyMap} The KeyMap created */ addKeyListener : function(key, fn, scope){ var config; @@ -34,19 +28,19 @@ Ext.Element.addMethods({ scope: scope }; } - return new Ext.KeyMap(this, config); + return Ext.create('Ext.util.KeyMap', this, config); }, /** * Creates a KeyMap for this element - * @param {Object} config The KeyMap config. See {@link Ext.KeyMap} for more details - * @return {Ext.KeyMap} The KeyMap created + * @param {Object} config The KeyMap config. See {@link Ext.util.KeyMap} for more details + * @return {Ext.util.KeyMap} The KeyMap created */ addKeyMap : function(config){ - return new Ext.KeyMap(this, config); + return Ext.create('Ext.util.KeyMap', this, config); } }); -//Import the newly-added Ext.Element functions into CompositeElementLite. We call this here because -//Element.keys.js is the last extra Ext.Element include in the ext-all.js build -Ext.CompositeElementLite.importElementMethods(); \ No newline at end of file +//Import the newly-added Ext.core.Element functions into CompositeElementLite. We call this here because +//Element.keys.js is the last extra Ext.core.Element include in the ext-all.js build +Ext.CompositeElementLite.importElementMethods();