ext.messagebox.html.svn-base
来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· SVN-BASE 代码 · 共 531 行 · 第 1/3 页
SVN-BASE
531 行
<b>setIcon</b>( <code>String icon</code> ) : Ext.MessageBox <div class="mdesc">
<div class="short">Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for defaultstyling, and the c...</div>
<div class="long">
Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for defaultstyling, and the class passed in is expected to supply the background image url. Pass in empty string ('')to clear any existing icon. The following built-in icon classes are supported, but you can also passin a custom class name:<pre>Ext.MessageBox.INFO
Ext.MessageBox.WARNING
Ext.MessageBox.QUESTION
Ext.MessageBox.ERROR</pre> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>icon</code> : String<div class="sub-desc">A CSS classname specifying the icon's background image url, or empty string to clear the icon</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-show"></a>
<b>show</b>( <code>Object config</code> ) : Ext.MessageBox <div class="mdesc">
<div class="short">Displays a new message box, or reinitializes an existing message box, based on the config optionspassed in. All disp...</div>
<div class="long">
Displays a new message box, or reinitializes an existing message box, based on the config optionspassed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally,although those calls are basic shortcuts and do not support all of the config options allowed here.The following config object properties are supported:<ul><li>animEl {String/Element} : An id or Element from which the message box should animate as it opens and closes (defaults to undefined)</li><li>buttons {Object/Boolean} : A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo', cancel:'Bar'}), or false to not show any buttons (defaults to false)</li><li>closable {Boolean} : False to hide the top-right close button (defaults to true). Note that progress and wait dialogs will ignore this property and always hide the close button as they can only be closed programmatically.</li><li>cls {String} : A custom CSS class to apply to the message box's container element</li><li>defaultTextHeight {Number} : The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)</li><li>fn {Function} : A callback function which is called when the dialog is dismissed eitherby clicking on the configured buttons, or on the dialog close button, or by pressingthe return button to enter input.<p>Progress and wait dialogs will ignore this option since they do not respond to useractions and can only be closed programmatically, so any required function should be calledby the same code after it closes the dialog. Parameters passed:</p><p><div class="mdetail-params"><ul><li><code>buttonId</code><div class="sub-desc">The ID of the button pressed, one of:<div class="sub-desc"><ul><li><b>ok</b></li><li><b>yes</b></li><li><b>no</b></li><li><b>cancel</b></li></ul></div></div></li><li><code>text</code><div class="sub-desc">Value of input field if <b>prompt</b> or <b>multiline</b> was selected</div></li></ul></div></p></li><li>scope {Object} : The scope of the callback function</li><li>icon {String} : A CSS class that provides a background image to be used as the body icon for the dialog (e.g., Ext.MessageBox.WARNING or 'custom-class', defaults to '')</li><li>iconCls {String} : The standard <a ext:cls="Ext.Window" ext:member="iconCls" href="output/Ext.Window.html#iconCls">Ext.Window.iconCls</a> to add an optional header icon (defaults to '')</li><li>maxWidth {Number} : The maximum width in pixels of the message box (defaults to 600)</li><li>minWidth {Number} : The minimum width in pixels of the message box (defaults to 100)</li><li>modal {Boolean} : False to allow user interaction with the page while the message box is displayed (defaults to true)</li><li>msg {String} : A string that will replace the existing message box body text (defaults to the XHTML-compliant non-breaking space character ' ')</li><li>multiline {Boolean} : True to prompt the user to enter multi-line text (defaults to false)</li><li>progress {Boolean} : True to display a progress bar (defaults to false)</li><li>progressText {String} : The text to display inside the progress bar if progress = true (defaults to '')</li><li>prompt {Boolean} : True to prompt the user to enter single-line text (defaults to false)</li><li>proxyDrag {Boolean} : True to display a lightweight proxy while dragging (defaults to false)</li><li>title {String} : The title text</li><li>value {String} : The string value to set into the active textbox element if displayed</li><li>wait {Boolean} : True to display a progress bar (defaults to false)</li><li>waitConfig {Object} : A <a ext:cls="Ext.ProgressBar" ext:member="waitConfig" href="output/Ext.ProgressBar.html#waitConfig">Ext.ProgressBar.waitConfig</a> object (applies only if wait = true)</li><li>width {Number} : The width of the dialog in pixels</li></ul>Example usage:<pre><code>Ext.Msg.show({ title: <em>'Address'</em>, msg: <em>'Please enter your address:'</em>, width: 300, buttons: Ext.MessageBox.OKCANCEL, multiline: true, fn: saveAddress, animEl: <em>'addAddressBtn'</em>, icon: Ext.MessageBox.INFO});</code></pre> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>config</code> : Object<div class="sub-desc">Configuration options</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-updateProgress"></a>
<b>updateProgress</b>( <code>Number value</code>, <code>String progressText</code>, <code>String msg</code> ) : Ext.MessageBox <div class="mdesc">
<div class="short">Updates a progress-style message box's text and progress bar. Only relevant on message boxesinitiated via Ext.Messa...</div>
<div class="long">
Updates a progress-style message box's text and progress bar. Only relevant on message boxesinitiated via <a ext:cls="Ext.MessageBox" ext:member="progress" href="output/Ext.MessageBox.html#progress">Ext.MessageBox.progress</a> or by calling <a ext:cls="Ext.MessageBox" ext:member="show" href="output/Ext.MessageBox.html#show">Ext.MessageBox.show</a> with progress: true. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>value</code> : Number<div class="sub-desc">Any number between 0 and 1 (e.g., .5, defaults to 0)</div></li><li><code>progressText</code> : String<div class="sub-desc">The progress text to display inside the progress bar (defaults to '')</div></li><li><code>msg</code> : String<div class="sub-desc">The message box's body text is replaced with the specified string (defaults to undefinedso that any existing body text will not get overwritten by default unless a new value is passed in)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-updateText"></a>
<b>updateText</b>( <span class="optional" title="Optional">[<code>String text</code>]</span> ) : Ext.MessageBox <div class="mdesc">
<div class="short">Updates the message box body text</div>
<div class="long">
Updates the message box body text <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>text</code> : String<div class="sub-desc">(optional) Replaces the message box element's innerHTML with the specified string (defaults tothe XHTML-compliant non-breaking space character '&#160;')</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MessageBox</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.MessageBox-wait"></a>
<b>wait</b>( <code>String msg</code>, <span class="optional" title="Optional">[<code>String title</code>]</span>, <span class="optional" title="Optional">[<code>Object config</code>]</span> ) : Ext.MessageBox <div class="mdesc">
<div class="short">Displays a message box with an infinitely auto-updating progress bar. This can be used to block userinteraction whi...</div>
<div class="long">
Displays a message box with an infinitely auto-updating progress bar. This can be used to block userinteraction while waiting for a long-running process to complete that does not have defined intervals.You are responsible for closing the message box when the process is complete. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>title</code> : String<div class="sub-desc">(optional) The title bar text</div></li><li><code>config</code> : Object<div class="sub-desc">(optional) A <a ext:cls="Ext.ProgressBar" ext:member="waitConfig" href="output/Ext.ProgressBar.html#waitConfig">Ext.ProgressBar.waitConfig</a> object</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MessageBox</td>
</tr>
</table> <a id="Ext.MessageBox-events"></a> <h2>Public Events</h2> <div class="no-members">This class has no public events.</div> </div>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?