-<html>
-<head>
- <title>The source code</title>
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body onload="prettyPrint();">
- <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.Action"></div>/**\r
+<html>\r
+<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js"><div id="cls-Ext.Action"></div>/**\r
* @class Ext.Action\r
* <p>An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it\r
* can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI\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
<div id="cfg-Ext.Action-text"></div>/**\r
* @cfg {String} text The text to set for all components using this action (defaults to '').\r
*/\r
* See {@link Ext.Component}.{@link Ext.Component#itemId itemId}.\r
*/\r
<div id="cfg-Ext.Action-scope"></div>/**\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
+ 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
},\r
\r
<div id="method-Ext.Action-setHandler"></div>/**\r
- * Sets the function that will be called by each component using this action when its primary event is triggered.\r
+ * Sets the function that will be called by each Component 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 {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
\r
<div id="method-Ext.Action-each"></div>/**\r
- * Executes the specified function once for each component currently tied to this action. The function passed\r
+ * Executes the specified function once for each Component 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
- * @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
execute : function(){\r
this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments);\r
}\r
-};
-</pre>
-</body>
+});\r
+</pre> \r
+</body>\r
</html>
\ No newline at end of file