git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git]
/
src
/
widgets
/
Action.js
diff --git
a/src/widgets/Action.js
b/src/widgets/Action.js
index
6d28288
..
f1c5599
100644
(file)
--- a/
src/widgets/Action.js
+++ b/
src/widgets/Action.js
@@
-1,5
+1,5
@@
/*!
/*!
- * Ext JS Library 3.
0
.0
+ * Ext JS Library 3.
1
.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
@@
-57,13
+57,7
@@
aRef.setText('New text');
* @constructor
\r
* @param {Object} config The configuration options
\r
*/
\r
* @constructor
\r
* @param {Object} config The configuration options
\r
*/
\r
-Ext.Action = function(config){
\r
- this.initialConfig = config;
\r
- this.itemId = config.itemId = (config.itemId || config.id || Ext.id());
\r
- this.items = [];
\r
-}
\r
-
\r
-Ext.Action.prototype = {
\r
+Ext.Action = Ext.extend(Object, {
\r
/**
\r
* @cfg {String} text The text to set for all components using this action (defaults to '').
\r
*/
\r
/**
\r
* @cfg {String} text The text to set for all components using this action (defaults to '').
\r
*/
\r
@@
-96,9
+90,16
@@
Ext.Action.prototype = {
* See {@link Ext.Component}.{@link Ext.Component#itemId itemId}.
\r
*/
\r
/**
\r
* See {@link Ext.Component}.{@link Ext.Component#itemId itemId}.
\r
*/
\r
/**
\r
- * @cfg {Object} scope The scope in which the {@link #handler} function will execute.
\r
+ * @cfg {Object} scope The scope (<tt><b>this</b></tt> reference) in which the
\r
+ * <code>{@link #handler}</code> is executed. Defaults to this Button.
\r
*/
\r
\r
*/
\r
\r
+ constructor : function(config){
\r
+ this.initialConfig = config;
\r
+ this.itemId = config.itemId = (config.itemId || config.id || Ext.id());
\r
+ this.items = [];
\r
+ },
\r
+
\r
// private
\r
isAction : true,
\r
\r
// private
\r
isAction : true,
\r
\r
@@
-198,10
+199,10
@@
Ext.Action.prototype = {
},
\r
\r
/**
\r
},
\r
\r
/**
\r
- * Sets the function that will be called by each
c
omponent using this action when its primary event is triggered.
\r
+ * Sets the function that will be called by each
C
omponent using this action when its primary event is triggered.
\r
* @param {Function} fn The function that will be invoked by the action's components. The function
\r
* will be called with no arguments.
\r
* @param {Function} fn The function that will be invoked by the action's components. The function
\r
* will be called with no arguments.
\r
- * @param {Object} scope The scope
in which the function will execute
\r
+ * @param {Object} scope The scope
(<code>this</code> reference) in which the function is executed. Defaults to the Component firing the event.
\r
*/
\r
setHandler : function(fn, scope){
\r
this.initialConfig.handler = fn;
\r
*/
\r
setHandler : function(fn, scope){
\r
this.initialConfig.handler = fn;
\r
@@
-210,10
+211,10
@@
Ext.Action.prototype = {
},
\r
\r
/**
\r
},
\r
\r
/**
\r
- * Executes the specified function once for each
c
omponent currently tied to this action. The function passed
\r
+ * Executes the specified function once for each
C
omponent currently tied to this action. The function passed
\r
* in should accept a single argument that will be an object that supports the basic Action config/method interface.
\r
* @param {Function} fn The function to execute for each component
\r
* in should accept a single argument that will be an object that supports the basic Action config/method interface.
\r
* @param {Function} fn The function to execute for each component
\r
- * @param {Object} scope The scope
in which the function will execute
\r
+ * @param {Object} scope The scope
(<code>this</code> reference) in which the function is executed. Defaults to the Component.
\r
*/
\r
each : function(fn, scope){
\r
Ext.each(this.items, fn, scope);
\r
*/
\r
each : function(fn, scope){
\r
Ext.each(this.items, fn, scope);
\r
@@
-249,4
+250,4
@@
Ext.Action.prototype = {
execute : function(){
\r
this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments);
\r
}
\r
execute : function(){
\r
this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments);
\r
}
\r
-}
;
+}
);
\r