You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
30 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. 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>&nbsp;</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>&nbsp;</span></a><div class='titl