ext.messagebox.html.svn-base
来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· SVN-BASE 代码 · 共 531 行 · 第 1/3 页
SVN-BASE
531 行
<div class="body-wrap"> <div class="top-tools"> <a class="inner-link" href="#Ext.MessageBox-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.MessageBox-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.MessageBox-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="bookmark" href="../docs/?class=Ext.MessageBox"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div> <h1>Class Ext.MessageBox</h1> <table cellspacing="0"> <tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr> <tr><td class="label">Defined In:</td><td class="hd-info">MessageBox.js</td></tr> <tr><td class="label">Class:</td><td class="hd-info">MessageBox</td></tr> <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr> </table> <div class="description"> <p>Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.<p/><p>Note that the MessageBox is asynchronous. Unlike a regular JavaScript <code>alert</code> (which will haltbrowser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have codethat should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function(see the <code>function</code> parameter for <a ext:cls="Ext.MessageBox" ext:member="show" href="output/Ext.MessageBox.html#show">show</a> for more details).</p><p>Example usage:</p><pre><code><i>// Basic alert:</i>Ext.Msg.alert(<em>'Status'</em>, <em>'Changes saved successfully.'</em>);<i>// Prompt <b>for</b> user data and process the result using a callback:</i>Ext.Msg.prompt(<em>'Name'</em>, <em>'Please enter your name:'</em>, <b>function</b>(btn, text){ <b>if</b> (btn == <em>'ok'</em>){ <i>// process text value and close...</i> }});<i>// Show a dialog using config options:</i>Ext.Msg.show({ title:<em>'Save Changes?'</em>, msg: <em>'You are closing a tab that has unsaved changes. Would you like to save your changes?'</em>, buttons: Ext.Msg.YESNOCANCEL, fn: processResult, animEl: <em>'elId'</em>, icon: Ext.MessageBox.QUESTION});</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i> </div> <div class="hr"></div> <a id="Ext.MessageBox-props"></a> <h2>Public Properties</h2> <table cellspacing="0" class="member-table"> <tr> <th class="sig-header" colspan="2">Property</th> <th class="msource-header">Defined By</th> </tr> <tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-CANCEL"></a>
<b>CANCEL</b> : Object <div class="mdesc">
Button config that displays a single Cancel button </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-ERROR"></a>
<b>ERROR</b> : String <div class="mdesc">
The CSS class that provides the ERROR icon image </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-INFO"></a>
<b>INFO</b> : String <div class="mdesc">
The CSS class that provides the INFO icon image </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-OK"></a>
<b>OK</b> : Object <div class="mdesc">
Button config that displays a single OK button </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-OKCANCEL"></a>
<b>OKCANCEL</b> : Object <div class="mdesc">
Button config that displays OK and Cancel buttons </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-QUESTION"></a>
<b>QUESTION</b> : String <div class="mdesc">
The CSS class that provides the QUESTION icon image </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-WARNING"></a>
<b>WARNING</b> : String <div class="mdesc">
The CSS class that provides the WARNING icon image </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-YESNO"></a>
<b>YESNO</b> : Object <div class="mdesc">
Button config that displays Yes and No buttons </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-YESNOCANCEL"></a>
<b>YESNOCANCEL</b> : Object <div class="mdesc">
Button config that displays Yes, No and Cancel buttons </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-buttonText"></a>
<b>buttonText</b> : Object <div class="mdesc">
<div class="short">An object containing the default button text strings that can be overriden for localized language support.Supported ...</div>
<div class="long">
An object containing the default button text strings that can be overriden for localized language support.Supported properties are: ok, cancel, yes and no. Generally you should include a locale-specificresource file for handling language support across the framework.Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french </div>
</div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-defaultTextHeight"></a>
<b>defaultTextHeight</b> : Number <div class="mdesc">
The default height in pixels of the message box's multiline textarea if displayed (defaults to 75) </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-maxWidth"></a>
<b>maxWidth</b> : Number <div class="mdesc">
The maximum width in pixels of the message box (defaults to 600) </div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="property-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-minProgressWidth"></a>
<b>minProgressWidth</b> : Number <div class="mdesc">
<div class="short">The minimum width in pixels of the message box if it is a progress-style dialog. This is usefulfor setting a differ...</div>
<div class="long">
The minimum width in pixels of the message box if it is a progress-style dialog. This is usefulfor setting a different minimum width than text-only dialogs may need (defaults to 250) </div>
</div>
</td>
<td class="msource">MessageBox</td>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?