|
|
/*This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License UsageThis file may be used under the terms of the GNU General Public License version 3.0 aspublished by the Free Software Foundation and appearing in the file LICENSE included in thepackaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales departmentat http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25*/Ext.data.JsonP.Ext_Action({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/Action.html#Ext-Action' target='_blank'>Action.js</a></div></pre><div class='doc-contents'><p>An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it\ncan be usefully shared among multiple components. Actions let you share handlers, configuration options and UI\nupdates across any components that support the Action interface (primarily <a href=\"#!/api/Ext.Toolbar\" rel=\"Ext.Toolbar\" class=\"docClass\">Ext.Toolbar</a>, <a href=\"#!/api/Ext.Button\" rel=\"Ext.Button\" class=\"docClass\">Ext.Button</a>\nand <a href=\"#!/api/Ext.menu.Menu\" rel=\"Ext.menu.Menu\" class=\"docClass\">Ext.menu.Menu</a> components).</p>\n\n\n<p>Aside from supporting the config object interface, any component that needs to use Actions must also support\nthe following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string),\nsetDisabled(boolean), setVisible(boolean) and setHandler(function).</p>\n\n\n<p>Example usage:<br></p>\n\n<pre><code>// Define the shared action. Each component below will have the same\n// display text and icon, and will display the same message on click.\nvar action = new <a href=\"#!/api/Ext.Action\" rel=\"Ext.Action\" class=\"docClass\">Ext.Action</a>({\n <a href=\"#!/api/Ext.Action-cfg-text\" rel=\"Ext.Action-cfg-text\" class=\"docClass\">text</a>: 'Do something',\n <a href=\"#!/api/Ext.Action-cfg-handler\" rel=\"Ext.Action-cfg-handler\" class=\"docClass\">handler</a>: function(){\n Ext.Msg.alert('Click', 'You did something.');\n },\n <a href=\"#!/api/Ext.Action-cfg-iconCls\" rel=\"Ext.Action-cfg-iconCls\" class=\"docClass\">iconCls</a>: 'do-something',\n <a href=\"#!/api/Ext.Action-cfg-itemId\" rel=\"Ext.Action-cfg-itemId\" class=\"docClass\">itemId</a>: 'myAction'\n});\n\nvar panel = new <a href=\"#!/api/Ext.Panel\" rel=\"Ext.Panel\" class=\"docClass\">Ext.Panel</a>({\n title: 'Actions',\n width: 500,\n height: 300,\n tbar: [\n // Add the action directly to a toolbar as a menu button\n action,\n {\n text: 'Action Menu',\n // Add the action to a menu as a text item\n menu: [action]\n }\n ],\n items: [\n // Add the action to the panel body as a standard button\n new <a href=\"#!/api/Ext.Button\" rel=\"Ext.Button\" class=\"docClass\">Ext.Button</a>(action)\n ],\n renderTo: <a href=\"#!/api/Ext-method-getBody\" rel=\"Ext-method-getBody\" class=\"docClass\">Ext.getBody</a>()\n});\n\n// Change the text for all components using the action\naction.setText('Something else');\n\n// Reference an action through a container using the itemId\nvar btn = panel.getComponent('myAction');\nvar aRef = btn.baseAction;\naRef.setText('New text');\n</code></pre>\n\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-disabled' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.Action'>Ext.Action</span><br/><a href='source/Action.html#Ext-Action-cfg-disabled' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Action-cfg-disabled' class='name not-expandable'>disabled</a><span> : Boolean</span></div><div class='description'><div class='short'><p>True to disable all components using this action, false to enable them (defaults to false).</p>\n</div><div class='long'><p>True to disable all components using this action, false to enable them (defaults to false).</p>\n</div></div></div><div id='cfg-handler' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='titl
|