ext.html.svn-base
来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· SVN-BASE 代码 · 共 945 行 · 第 1/4 页
SVN-BASE
945 行
By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash,you may want to set this to true. </div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
</table> <a id="Ext-methods"></a> <h2>Public Methods</h2> <table cellspacing="0" class="member-table"> <tr> <th class="sig-header" colspan="2">Method</th> <th class="msource-header">Defined By</th> </tr> <tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-addBehaviors"></a>
<b>addBehaviors</b>( <code>Object obj</code> ) : void <div class="mdesc">
<div class="short">Applies event listeners to elements by selectors when the document is ready.The event name is specified with an @ su...</div>
<div class="long">
Applies event listeners to elements by selectors when the document is ready.The event name is specified with an @ suffix.
<pre><code>Ext.addBehaviors({ <i>// add a listener <b>for</b> click on all anchors <b>in</b> element <b>with</b> id foo</i> <em>'#foo a@click'</em> : <b>function</b>(e, t){ <i>// <b>do</b> something</i> }, <i>// add the same listener to multiple selectors (separated by comma BEFORE the @)</i> <em>'#foo a, #bar span.some-class@mouseover'</em> : <b>function</b>(){ <i>// <b>do</b> something</i> }});</code></pre> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>obj</code> : Object<div class="sub-desc">The list of behaviors to apply</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-apply"></a>
<b>apply</b>( <code>Object obj</code>, <code>Object config</code>, <code>Object defaults</code> ) : Object <div class="mdesc">
<div class="short">Copies all the properties of config to obj.</div>
<div class="long">
Copies all the properties of config to obj. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>obj</code> : Object<div class="sub-desc">The receiver of the properties</div></li><li><code>config</code> : Object<div class="sub-desc">The source of the properties</div></li><li><code>defaults</code> : Object<div class="sub-desc">A different object that will also be applied for default values</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">returns obj</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-applyIf"></a>
<b>applyIf</b>( <code>Object obj</code>, <code>Object config</code> ) : Object <div class="mdesc">
<div class="short">Copies all the properties of config to obj if they don't already exist.</div>
<div class="long">
Copies all the properties of config to obj if they don't already exist. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>obj</code> : Object<div class="sub-desc">The receiver of the properties</div></li><li><code>config</code> : Object<div class="sub-desc">The source of the properties</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">returns obj</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-decode"></a>
<b>decode</b>( <code>String json</code> ) : Object <div class="mdesc">
<div class="short">Shorthand for <a ext:cls="Ext.util.JSON" ext:member="decode" href="output/Ext.util.JSON.html#decode">Ext.util.JSON.decode</a></div>
<div class="long">
Shorthand for <a ext:cls="Ext.util.JSON" ext:member="decode" href="output/Ext.util.JSON.html#decode">Ext.util.JSON.decode</a> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>json</code> : String<div class="sub-desc">The JSON string</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The resulting object</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-destroy"></a>
<b>destroy</b>( <code>Mixed arg1</code>, <span class="optional" title="Optional">[<code>Mixed arg2</code>]</span>, <span class="optional" title="Optional">[<code>Mixed etc...</code>]</span> ) : void <div class="mdesc">
<div class="short">Attempts to destroy any objects passed to it by removing all event listeners, removing them from theDOM (if applicab...</div>
<div class="long">
Attempts to destroy any objects passed to it by removing all event listeners, removing them from theDOM (if applicable) and calling their destroy functions (if available). This method is primarilyintended for arguments of type <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> and <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a>, but any subclass of<a ext:cls="Ext.util.Observable" href="output/Ext.util.Observable.html">Ext.util.Observable</a> can be passed in. Any number of elements and/or components can bepassed into this function in a single call as separate arguments. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>arg1</code> : Mixed<div class="sub-desc">An <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> or <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> to destroy</div></li><li><code>arg2</code> : Mixed<div class="sub-desc">(optional)</div></li><li><code>etc...</code> : Mixed<div class="sub-desc">(optional)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-each"></a>
<b>each</b>( <code>Array/NodeList/Mixed array</code>, <code>Function fn</code>, <code>Object scope</code> ) : void <div class="mdesc">
<div class="short">Iterates an array calling the passed function with each item, stopping if your function returns false. If thepassed ...</div>
<div class="long">
Iterates an array calling the passed function with each item, stopping if your function returns false. If thepassed array is not really an array, your function is called once with it.The supplied function is called with (Object item, Number index, Array allItems). <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>array</code> : Array/NodeList/Mixed<div class="sub-desc"></div></li><li><code>fn</code> : Function<div class="sub-desc"></div></li><li><code>scope</code> : Object<div class="sub-desc"></div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-encode"></a>
<b>encode</b>( <code>Mixed o</code> ) : String <div class="mdesc">
<div class="short">Shorthand for <a ext:cls="Ext.util.JSON" ext:member="encode" href="output/Ext.util.JSON.html#encode">Ext.util.JSON.encode</a></div>
<div class="long">
Shorthand for <a ext:cls="Ext.util.JSON" ext:member="encode" href="output/Ext.util.JSON.html#encode">Ext.util.JSON.encode</a> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>o</code> : Mixed<div class="sub-desc">The variable to encode</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>String</code><div class="sub-desc">The JSON string</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-escapeRe"></a>
<b>escapeRe</b>( <code>String str</code> ) : String <div class="mdesc">
<div class="short">Escapes the passed string for use in a regular expression</div>
<div class="long">
Escapes the passed string for use in a regular expression <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>str</code> : String<div class="sub-desc"></div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>String</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Ext</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext-extend"></a>
<b>extend</b>( <code>Function subclass</code>, <code>Function superclass</code>, <span class="optional" title="Optional">[<code>Object overrides</code>]</span> ) : Function <div class="mdesc">
<div class="short">Extends one class with another class and optionally overrides members with the passed literal. This classalso adds t...</div>
<div class="long">
Extends one class with another class and optionally overrides members with the passed literal. This classalso adds the function "override()" to the class that can be used to overridemembers on an instance.<p>This function also supports a 2-argument call in which the subclass's constructor isnot passed as an argument. In this form, the parameters are as follows:</p><p><div class="mdetail-params"><ul><li><code>superclass</code><div class="sub-desc">The class being extended</div></li><li><code>overrides</code><div class="sub-desc">A literal with members which are copied into the subclass'sprototype, and are therefore shared among all instances of the new class.<p>This may contain a special member named <tt><b>constructor</b></tt>. This is usedto define the constructor of the new class, and is returned. If this property is<i>not</i> specified, a constructor is generated and returned which just calls thesuperclass's constructor passing on its parameters.</p></div></li></ul></div></p><p>For example, to create a subclass of the Ext GridPanel:<pre><code>MyGridPanel = Ext.extend(Ext.grid.GridPanel, { constructor: <b>function</b>(config) { <i>// Your preprocessing here</i> MyGridPanel.superclass.constructor.apply(<b>this</b>, arguments); <i>// Your postprocessing here</i> }, yourMethod: <b>function</b>() { <i>// etc.</i> } });</code></pre></p> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>subclass</code> : Function<div class="sub-desc">The class inheriting the functionality</div></li><li><code>superclass</code> : Function<div class="sub-desc">The class being extended</div></li><li><code>overrides</code> : Object<div class="sub-desc">(optional) A literal with members which are copied into the subclass's
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?