96b2bb191eeffe06925f6c6294c519ab778ad1f4.svn-base 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. <div class="body-wrap">
  2. <div class="top-tools">
  3. <a class="inner-link" href="#Ext.MessageBox-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
  4. <a class="inner-link" href="#Ext.MessageBox-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
  5. <a class="inner-link" href="#Ext.MessageBox-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
  6. <a class="bookmark" href="../docs/?class=Ext.MessageBox"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
  7. </div>
  8. <h1>Class Ext.MessageBox</h1>
  9. <table cellspacing="0">
  10. <tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr>
  11. <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/MessageBox.js" target="_blank">MessageBox.js</a></td></tr>
  12. <tr><td class="label">Class:</td><td class="hd-info">MessageBox</td></tr>
  13. <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
  14. </table>
  15. <div class="description">
  16. <p>Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.<p/>
  17. <p>Note that the MessageBox is asynchronous. Unlike a regular JavaScript <code>alert</code> (which will halt
  18. browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code
  19. that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function
  20. (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>
  21. <p>Example usage:</p>
  22. <pre><code><i>// Basic alert:</i>
  23. Ext.Msg.alert(<em>'Status'</em>, <em>'Changes saved successfully.'</em>);
  24. <i>// Prompt <b>for</b> user data and process the result using a callback:</i>
  25. Ext.Msg.prompt(<em>'Name'</em>, <em>'Please enter your name:'</em>, <b>function</b>(btn, text){
  26. <b>if</b> (btn == <em>'ok'</em>){
  27. <i>// process text value and close...</i>
  28. }
  29. });
  30. <i>// Show a dialog using config options:</i>
  31. Ext.Msg.show({
  32. title:<em>'Save Changes?'</em>,
  33. msg: <em>'Your are closing a tab that has unsaved changes. Would you like to save your changes?'</em>,
  34. buttons: Ext.Msg.YESNOCANCEL,
  35. fn: processResult,
  36. animEl: <em>'elId'</em>,
  37. icon: Ext.MessageBox.QUESTION
  38. });</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i> </div>
  39. <div class="hr"></div>
  40. <a id="Ext.MessageBox-props"></a>
  41. <h2>Public Properties</h2>
  42. <table cellspacing="0" class="member-table">
  43. <tr>
  44. <th class="sig-header" colspan="2">Property</th>
  45. <th class="msource-header">Defined By</th>
  46. </tr>
  47. <tr class="property-row">
  48. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  49. <td class="sig">
  50. <a id="Ext.MessageBox-CANCEL"></a>
  51. <b>CANCEL</b> : Object <div class="mdesc">
  52. Button config that displays a single Cancel button </div>
  53. </td>
  54. <td class="msource">MessageBox</td>
  55. </tr>
  56. <tr class="property-row alt">
  57. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  58. <td class="sig">
  59. <a id="Ext.MessageBox-ERROR"></a>
  60. <b>ERROR</b> : String <div class="mdesc">
  61. The CSS class that provides the ERROR icon image </div>
  62. </td>
  63. <td class="msource">MessageBox</td>
  64. </tr>
  65. <tr class="property-row">
  66. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  67. <td class="sig">
  68. <a id="Ext.MessageBox-INFO"></a>
  69. <b>INFO</b> : String <div class="mdesc">
  70. The CSS class that provides the INFO icon image </div>
  71. </td>
  72. <td class="msource">MessageBox</td>
  73. </tr>
  74. <tr class="property-row alt">
  75. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  76. <td class="sig">
  77. <a id="Ext.MessageBox-OK"></a>
  78. <b>OK</b> : Object <div class="mdesc">
  79. Button config that displays a single OK button </div>
  80. </td>
  81. <td class="msource">MessageBox</td>
  82. </tr>
  83. <tr class="property-row">
  84. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  85. <td class="sig">
  86. <a id="Ext.MessageBox-OKCANCEL"></a>
  87. <b>OKCANCEL</b> : Object <div class="mdesc">
  88. Button config that displays OK and Cancel buttons </div>
  89. </td>
  90. <td class="msource">MessageBox</td>
  91. </tr>
  92. <tr class="property-row alt">
  93. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  94. <td class="sig">
  95. <a id="Ext.MessageBox-QUESTION"></a>
  96. <b>QUESTION</b> : String <div class="mdesc">
  97. The CSS class that provides the QUESTION icon image </div>
  98. </td>
  99. <td class="msource">MessageBox</td>
  100. </tr>
  101. <tr class="property-row">
  102. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  103. <td class="sig">
  104. <a id="Ext.MessageBox-WARNING"></a>
  105. <b>WARNING</b> : String <div class="mdesc">
  106. The CSS class that provides the WARNING icon image </div>
  107. </td>
  108. <td class="msource">MessageBox</td>
  109. </tr>
  110. <tr class="property-row alt">
  111. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  112. <td class="sig">
  113. <a id="Ext.MessageBox-YESNO"></a>
  114. <b>YESNO</b> : Object <div class="mdesc">
  115. Button config that displays Yes and No buttons </div>
  116. </td>
  117. <td class="msource">MessageBox</td>
  118. </tr>
  119. <tr class="property-row">
  120. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  121. <td class="sig">
  122. <a id="Ext.MessageBox-YESNOCANCEL"></a>
  123. <b>YESNOCANCEL</b> : Object <div class="mdesc">
  124. Button config that displays Yes, No and Cancel buttons </div>
  125. </td>
  126. <td class="msource">MessageBox</td>
  127. </tr>
  128. <tr class="property-row alt expandable">
  129. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  130. <td class="sig">
  131. <a id="Ext.MessageBox-buttonText"></a>
  132. <b>buttonText</b> : Object <div class="mdesc">
  133. <div class="short">An object containing the default button text strings that can be overriden for localized language support.
  134. Supported ...</div>
  135. <div class="long">
  136. An object containing the default button text strings that can be overriden for localized language support.
  137. Supported properties are: ok, cancel, yes and no. Generally you should include a locale-specific
  138. resource file for handling language support across the framework.
  139. Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french </div>
  140. </div>
  141. </td>
  142. <td class="msource">MessageBox</td>
  143. </tr>
  144. <tr class="property-row">
  145. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  146. <td class="sig">
  147. <a id="Ext.MessageBox-defaultTextHeight"></a>
  148. <b>defaultTextHeight</b> : Number <div class="mdesc">
  149. The default height in pixels of the message box's multiline textarea if displayed (defaults to 75) </div>
  150. </td>
  151. <td class="msource">MessageBox</td>
  152. </tr>
  153. <tr class="property-row alt">
  154. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  155. <td class="sig">
  156. <a id="Ext.MessageBox-maxWidth"></a>
  157. <b>maxWidth</b> : Number <div class="mdesc">
  158. The maximum width in pixels of the message box (defaults to 600) </div>
  159. </td>
  160. <td class="msource">MessageBox</td>
  161. </tr>
  162. <tr class="property-row expandable">
  163. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  164. <td class="sig">
  165. <a id="Ext.MessageBox-minProgressWidth"></a>
  166. <b>minProgressWidth</b> : Number <div class="mdesc">
  167. <div class="short">The minimum width in pixels of the message box if it is a progress-style dialog. This is useful
  168. for setting a differ...</div>
  169. <div class="long">
  170. The minimum width in pixels of the message box if it is a progress-style dialog. This is useful
  171. for setting a different minimum width than text-only dialogs may need (defaults to 250) </div>
  172. </div>
  173. </td>
  174. <td class="msource">MessageBox</td>
  175. </tr>
  176. <tr class="property-row alt">
  177. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  178. <td class="sig">
  179. <a id="Ext.MessageBox-minWidth"></a>
  180. <b>minWidth</b> : Number <div class="mdesc">
  181. The minimum width in pixels of the message box (defaults to 100) </div>
  182. </td>
  183. <td class="msource">MessageBox</td>
  184. </tr>
  185. </table>
  186. <a id="Ext.MessageBox-methods"></a>
  187. <h2>Public Methods</h2>
  188. <table cellspacing="0" class="member-table">
  189. <tr>
  190. <th class="sig-header" colspan="2">Method</th>
  191. <th class="msource-header">Defined By</th>
  192. </tr>
  193. <tr class="method-row expandable">
  194. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  195. <td class="sig">
  196. <a id="Ext.MessageBox-alert"></a>
  197. <b>alert</b>(&nbsp;<code>String title</code>, <code>String msg</code>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : Ext.MessageBox <div class="mdesc">
  198. <div class="short">Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
  199. If a c...</div>
  200. <div class="long">
  201. Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
  202. If a callback function is passed it will be called after the user clicks the button, and the
  203. id of the button that was clicked will be passed as the only parameter to the callback
  204. (could also be the top-right close button). <div class="mdetail-params">
  205. <strong>Parameters:</strong>
  206. <ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the callback function</div></li> </ul>
  207. <strong>Returns:</strong>
  208. <ul>
  209. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  210. </ul>
  211. </div>
  212. </div>
  213. </div>
  214. </td>
  215. <td class="msource">MessageBox</td>
  216. </tr>
  217. <tr class="method-row alt expandable">
  218. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  219. <td class="sig">
  220. <a id="Ext.MessageBox-confirm"></a>
  221. <b>confirm</b>(&nbsp;<code>String title</code>, <code>String msg</code>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : Ext.MessageBox <div class="mdesc">
  222. <div class="short">Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
  223. If a callback funct...</div>
  224. <div class="long">
  225. Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
  226. If a callback function is passed it will be called after the user clicks either button,
  227. and the id of the button that was clicked will be passed as the only parameter to the callback
  228. (could also be the top-right close button). <div class="mdetail-params">
  229. <strong>Parameters:</strong>
  230. <ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the callback function</div></li> </ul>
  231. <strong>Returns:</strong>
  232. <ul>
  233. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  234. </ul>
  235. </div>
  236. </div>
  237. </div>
  238. </td>
  239. <td class="msource">MessageBox</td>
  240. </tr>
  241. <tr class="method-row expandable">
  242. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  243. <td class="sig">
  244. <a id="Ext.MessageBox-getDialog"></a>
  245. <b>getDialog</b>() : Ext.Window <div class="mdesc">
  246. <div class="short">Returns a reference to the underlying <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> element</div>
  247. <div class="long">
  248. Returns a reference to the underlying <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> element <div class="mdetail-params">
  249. <strong>Parameters:</strong>
  250. <ul><li>None.</li> </ul>
  251. <strong>Returns:</strong>
  252. <ul>
  253. <li><code>Ext.Window</code><div class="sub-desc">The window</div></li>
  254. </ul>
  255. </div>
  256. </div>
  257. </div>
  258. </td>
  259. <td class="msource">MessageBox</td>
  260. </tr>
  261. <tr class="method-row alt expandable">
  262. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  263. <td class="sig">
  264. <a id="Ext.MessageBox-hide"></a>
  265. <b>hide</b>() : Ext.MessageBox <div class="mdesc">
  266. <div class="short">Hides the message box if it is displayed</div>
  267. <div class="long">
  268. Hides the message box if it is displayed <div class="mdetail-params">
  269. <strong>Parameters:</strong>
  270. <ul><li>None.</li> </ul>
  271. <strong>Returns:</strong>
  272. <ul>
  273. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  274. </ul>
  275. </div>
  276. </div>
  277. </div>
  278. </td>
  279. <td class="msource">MessageBox</td>
  280. </tr>
  281. <tr class="method-row expandable">
  282. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  283. <td class="sig">
  284. <a id="Ext.MessageBox-isVisible"></a>
  285. <b>isVisible</b>() : Boolean <div class="mdesc">
  286. <div class="short">Returns true if the message box is currently displayed</div>
  287. <div class="long">
  288. Returns true if the message box is currently displayed <div class="mdetail-params">
  289. <strong>Parameters:</strong>
  290. <ul><li>None.</li> </ul>
  291. <strong>Returns:</strong>
  292. <ul>
  293. <li><code>Boolean</code><div class="sub-desc">True if the message box is visible, else false</div></li>
  294. </ul>
  295. </div>
  296. </div>
  297. </div>
  298. </td>
  299. <td class="msource">MessageBox</td>
  300. </tr>
  301. <tr class="method-row alt expandable">
  302. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  303. <td class="sig">
  304. <a id="Ext.MessageBox-progress"></a>
  305. <b>progress</b>(&nbsp;<code>String title</code>, <code>String msg</code>, <code>String progressText</code>&nbsp;) : Ext.MessageBox <div class="mdesc">
  306. <div class="short">Displays a message box with a progress bar. This message box has no buttons and is not closeable by
  307. the user. You a...</div>
  308. <div class="long">
  309. Displays a message box with a progress bar. This message box has no buttons and is not closeable by
  310. the user. You are responsible for updating the progress bar as needed via <a ext:cls="Ext.MessageBox" ext:member="updateProgress" href="output/Ext.MessageBox.html#updateProgress">Ext.MessageBox.updateProgress</a>
  311. and closing the message box when the process is complete. <div class="mdetail-params">
  312. <strong>Parameters:</strong>
  313. <ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>progressText</code> : String<div class="sub-desc">The text to display inside the progress bar (defaults to '')</div></li> </ul>
  314. <strong>Returns:</strong>
  315. <ul>
  316. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  317. </ul>
  318. </div>
  319. </div>
  320. </div>
  321. </td>
  322. <td class="msource">MessageBox</td>
  323. </tr>
  324. <tr class="method-row expandable">
  325. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  326. <td class="sig">
  327. <a id="Ext.MessageBox-prompt"></a>
  328. <b>prompt</b>(&nbsp;<code>String title</code>, <code>String msg</code>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Boolean/Number multiline</code>]</span>&nbsp;) : Ext.MessageBox <div class="mdesc">
  329. <div class="short">Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's p...</div>
  330. <div class="long">
  331. Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).
  332. The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user
  333. clicks either button, and the id of the button that was clicked (could also be the top-right
  334. close button) and the text that was entered will be passed as the two parameters to the callback. <div class="mdetail-params">
  335. <strong>Parameters:</strong>
  336. <ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the callback function</div></li><li><code>multiline</code> : Boolean/Number<div class="sub-desc">(optional) True to create a multiline textbox using the defaultTextHeight
  337. property, or the height in pixels to create the textbox (defaults to false / single-line)</div></li> </ul>
  338. <strong>Returns:</strong>
  339. <ul>
  340. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  341. </ul>
  342. </div>
  343. </div>
  344. </div>
  345. </td>
  346. <td class="msource">MessageBox</td>
  347. </tr>
  348. <tr class="method-row alt expandable">
  349. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  350. <td class="sig">
  351. <a id="Ext.MessageBox-setIcon"></a>
  352. <b>setIcon</b>(&nbsp;<code>String icon</code>&nbsp;) : Ext.MessageBox <div class="mdesc">
  353. <div class="short">Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default
  354. styling, and the c...</div>
  355. <div class="long">
  356. Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default
  357. styling, and the class passed in is expected to supply the background image url. Pass in empty string ('')
  358. to clear any existing icon. The following built-in icon classes are supported, but you can also pass
  359. in a custom class name:
  360. <pre>Ext.MessageBox.INFO
  361. Ext.MessageBox.WARNING
  362. Ext.MessageBox.QUESTION
  363. Ext.MessageBox.ERROR</pre> <div class="mdetail-params">
  364. <strong>Parameters:</strong>
  365. <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>
  366. <strong>Returns:</strong>
  367. <ul>
  368. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  369. </ul>
  370. </div>
  371. </div>
  372. </div>
  373. </td>
  374. <td class="msource">MessageBox</td>
  375. </tr>
  376. <tr class="method-row expandable">
  377. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  378. <td class="sig">
  379. <a id="Ext.MessageBox-show"></a>
  380. <b>show</b>(&nbsp;<code>Object config</code>&nbsp;) : Ext.MessageBox <div class="mdesc">
  381. <div class="short">Displays a new message box, or reinitializes an existing message box, based on the config options
  382. passed in. All disp...</div>
  383. <div class="long">
  384. Displays a new message box, or reinitializes an existing message box, based on the config options
  385. passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally,
  386. although those calls are basic shortcuts and do not support all of the config options allowed here.
  387. The following config object properties are supported:
  388. <pre>Property Type Description
  389. ---------------- --------------- -----------------------------------------------------------------------------
  390. animEl String/Element An id or Element from which the message box should animate as it opens and
  391. closes (defaults to undefined)
  392. buttons Object/Boolean A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo',
  393. cancel:'Bar'}), or false to not show any buttons (defaults to false)
  394. closable Boolean False to hide the top-right close button (defaults to true). Note that
  395. progress and wait dialogs will ignore this property and always hide the
  396. close button as they can only be closed programmatically.
  397. cls String A custom CSS class to apply to the message box element
  398. defaultTextHeight Number The default height in pixels of the message box's multiline textarea if
  399. displayed (defaults to 75)
  400. fn Function A callback function to execute after closing the dialog. The arguments to the
  401. function will be btn (the name of the button that was clicked, if applicable,
  402. e.g. "ok"), and text (the value of the active text field, if applicable).
  403. Progress and wait dialogs will ignore this option since they do not respond to
  404. user actions and can only be closed programmatically, so any required function
  405. should be called by the same code after it closes the dialog.
  406. icon String A CSS class that provides a background image to be used as an icon for
  407. the dialog (e.g., Ext.MessageBox.WARNING or 'custom-class', defaults to '')
  408. maxWidth Number The maximum width in pixels of the message box (defaults to 600)
  409. minWidth Number The minimum width in pixels of the message box (defaults to 100)
  410. modal Boolean False to allow user interaction with the page while the message box is
  411. displayed (defaults to true)
  412. msg String A string that will replace the existing message box body text (defaults
  413. to the XHTML-compliant non-breaking space character '&#160;')
  414. multiline Boolean True to prompt the user to enter multi-line text (defaults to false)
  415. progress Boolean True to display a progress bar (defaults to false)
  416. progressText String The text to display inside the progress bar if progress = true (defaults to '')
  417. prompt Boolean True to prompt the user to enter single-line text (defaults to false)
  418. proxyDrag Boolean True to display a lightweight proxy while dragging (defaults to false)
  419. title String The title text
  420. value String The string value to set into the active textbox element if displayed
  421. wait Boolean True to display a progress bar (defaults to false)
  422. 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)
  423. width Number The width of the dialog in pixels</pre>
  424. Example usage:
  425. <pre><code>Ext.Msg.show({
  426. title: <em>'Address'</em>,
  427. msg: <em>'Please enter your address:'</em>,
  428. width: 300,
  429. buttons: Ext.MessageBox.OKCANCEL,
  430. multiline: true,
  431. fn: saveAddress,
  432. animEl: <em>'addAddressBtn'</em>,
  433. icon: Ext.MessagBox.INFO
  434. });</code></pre> <div class="mdetail-params">
  435. <strong>Parameters:</strong>
  436. <ul><li><code>config</code> : Object<div class="sub-desc">Configuration options</div></li> </ul>
  437. <strong>Returns:</strong>
  438. <ul>
  439. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  440. </ul>
  441. </div>
  442. </div>
  443. </div>
  444. </td>
  445. <td class="msource">MessageBox</td>
  446. </tr>
  447. <tr class="method-row alt expandable">
  448. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  449. <td class="sig">
  450. <a id="Ext.MessageBox-updateProgress"></a>
  451. <b>updateProgress</b>(&nbsp;<code>Number value</code>, <code>String progressText</code>, <code>String msg</code>&nbsp;) : Ext.MessageBox <div class="mdesc">
  452. <div class="short">Updates a progress-style message box's text and progress bar. Only relevant on message boxes
  453. initiated via Ext.Messa...</div>
  454. <div class="long">
  455. Updates a progress-style message box's text and progress bar. Only relevant on message boxes
  456. initiated 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">
  457. <strong>Parameters:</strong>
  458. <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 undefined
  459. so that any existing body text will not get overwritten by default unless a new value is passed in)</div></li> </ul>
  460. <strong>Returns:</strong>
  461. <ul>
  462. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  463. </ul>
  464. </div>
  465. </div>
  466. </div>
  467. </td>
  468. <td class="msource">MessageBox</td>
  469. </tr>
  470. <tr class="method-row expandable">
  471. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  472. <td class="sig">
  473. <a id="Ext.MessageBox-updateText"></a>
  474. <b>updateText</b>(&nbsp;<span class="optional" title="Optional">[<code>String text</code>]</span>&nbsp;) : Ext.MessageBox <div class="mdesc">
  475. <div class="short">Updates the message box body text</div>
  476. <div class="long">
  477. Updates the message box body text <div class="mdetail-params">
  478. <strong>Parameters:</strong>
  479. <ul><li><code>text</code> : String<div class="sub-desc">(optional) Replaces the message box element's innerHTML with the specified string (defaults to
  480. the XHTML-compliant non-breaking space character '&amp;#160;')</div></li> </ul>
  481. <strong>Returns:</strong>
  482. <ul>
  483. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  484. </ul>
  485. </div>
  486. </div>
  487. </div>
  488. </td>
  489. <td class="msource">MessageBox</td>
  490. </tr>
  491. <tr class="method-row alt expandable">
  492. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  493. <td class="sig">
  494. <a id="Ext.MessageBox-wait"></a>
  495. <b>wait</b>(&nbsp;<code>String msg</code>, <span class="optional" title="Optional">[<code>String title</code>]</span>, <span class="optional" title="Optional">[<code>Object config</code>]</span>&nbsp;) : Ext.MessageBox <div class="mdesc">
  496. <div class="short">Displays a message box with an infinitely auto-updating progress bar. This can be used to block user
  497. interaction whi...</div>
  498. <div class="long">
  499. Displays a message box with an infinitely auto-updating progress bar. This can be used to block user
  500. interaction while waiting for a long-running process to complete that does not have defined intervals.
  501. You are responsible for closing the message box when the process is complete. <div class="mdetail-params">
  502. <strong>Parameters:</strong>
  503. <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>
  504. <strong>Returns:</strong>
  505. <ul>
  506. <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>
  507. </ul>
  508. </div>
  509. </div>
  510. </div>
  511. </td>
  512. <td class="msource">MessageBox</td>
  513. </tr>
  514. </table>
  515. <a id="Ext.MessageBox-events"></a>
  516. <h2>Public Events</h2>
  517. <div class="no-members">This class has no public events.</div>
  518. </div>