e8efbc5966ed40d5be905519a2978d7b221dbc1d
[roojs1] / docs / symbols / Roo.bootstrap.MessageBox.json
1 {
2   "name" : "Roo.bootstrap.MessageBox",
3   "augments" : [],
4   "childClasses" : {  },
5   "tree_children" : [],
6   "tree_parent" : [],
7   "desc" : "Utility class for generating different styles of message boxes.  The alias Roo.Msg can also be used.\nExample usage:\n<pre><code>\n// Basic alert:\nRoo.Msg.alert('Status', 'Changes saved successfully.');\n\n// Prompt for user data:\nRoo.Msg.prompt('Name', 'Please enter your name:', function(btn, text){\n    if (btn == 'ok'){\n        // process text value...\n    }\n});\n\n// Show a dialog using config options:\nRoo.Msg.show({\n   title:'Save Changes?',\n   msg: 'Your are closing a tab that has unsaved changes. Would you like to save your changes?',\n   buttons: Roo.Msg.YESNOCANCEL,\n   fn: processResult,\n   animEl: 'elId'\n});\n</code></pre>",
8   "isSingleton" : true,
9   "isStatic" : false,
10   "isBuiltin" : false,
11   "isAbstract" : false,
12   "isBuilderTop" : false,
13   "memberOf" : "MessageBox",
14   "example" : "",
15   "deprecated" : "",
16   "since" : "",
17   "see" : "",
18   "params" : [],
19   "returns" : [],
20   "throws" : "",
21   "requires" : "",
22   "config" : [],
23   "methods" : [
24     {
25       "name" : "alert",
26       "type" : "function",
27       "desc" : "Displays a standard read-only message box with an OK button (comparable to the basic JavaScript Window.alert).\nIf a callback function is passed it will be called after the user clicks the button, and the\nid of the button that was clicked will be passed as the only parameter to the callback\n(could also be the top-right close button).",
28       "sig" : "(title, msg, fn, scope)",
29       "static" : false,
30       "memberOf" : "",
31       "isStatic" : false,
32       "isConstructor" : false,
33       "isPrivate" : false,
34       "example" : "",
35       "deprecated" : "",
36       "since" : "",
37       "see" : "",
38       "exceptions" : "",
39       "requires" : "",
40       "params" : [
41         {
42           "name" : "title",
43           "type" : "String",
44           "desc" : "The title bar text",
45           "isOptional" : false
46         },
47         {
48           "name" : "msg",
49           "type" : "String",
50           "desc" : "The message box body text",
51           "isOptional" : false
52         },
53         {
54           "name" : "fn",
55           "type" : "Function",
56           "desc" : "(optional) The callback function invoked after the message box is closed",
57           "isOptional" : false
58         },
59         {
60           "name" : "scope",
61           "type" : "Object",
62           "desc" : "(optional) The scope of the callback function",
63           "isOptional" : false
64         }
65       ],
66       "returns" : [
67         {
68           "name" : "",
69           "type" : "Roo.MessageBox",
70           "desc" : "This message box"
71         }
72       ]
73     },
74     {
75       "name" : "confirm",
76       "type" : "function",
77       "desc" : "Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's Window.confirm).\nIf a callback function is passed it will be called after the user clicks either button, and the id of the\nbutton that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).",
78       "sig" : "(title, msg, fn, scope)",
79       "static" : false,
80       "memberOf" : "",
81       "isStatic" : false,
82       "isConstructor" : false,
83       "isPrivate" : false,
84       "example" : "",
85       "deprecated" : "",
86       "since" : "",
87       "see" : "",
88       "exceptions" : "",
89       "requires" : "",
90       "params" : [
91         {
92           "name" : "title",
93           "type" : "String",
94           "desc" : "The title bar text",
95           "isOptional" : false
96         },
97         {
98           "name" : "msg",
99           "type" : "String",
100           "desc" : "The message box body text",
101           "isOptional" : false
102         },
103         {
104           "name" : "fn",
105           "type" : "Function",
106           "desc" : "(optional) The callback function invoked after the message box is closed",
107           "isOptional" : false
108         },
109         {
110           "name" : "scope",
111           "type" : "Object",
112           "desc" : "(optional) The scope of the callback function",
113           "isOptional" : false
114         }
115       ],
116       "returns" : [
117         {
118           "name" : "",
119           "type" : "Roo.MessageBox",
120           "desc" : "This message box"
121         }
122       ]
123     },
124     {
125       "name" : "getDialog",
126       "type" : "function",
127       "desc" : "Returns a reference to the underlying {@link Roo.BasicDialog} element",
128       "sig" : "()\n{\n\n}",
129       "static" : false,
130       "memberOf" : "",
131       "isStatic" : false,
132       "isConstructor" : false,
133       "isPrivate" : false,
134       "example" : "",
135       "deprecated" : "",
136       "since" : "",
137       "see" : "",
138       "exceptions" : "",
139       "requires" : "",
140       "params" : [],
141       "returns" : [
142         {
143           "name" : "",
144           "type" : "Roo.BasicDialog",
145           "desc" : "The BasicDialog element"
146         }
147       ]
148     },
149     {
150       "name" : "progress",
151       "type" : "function",
152       "desc" : "Displays a message box with a progress bar.  This message box has no buttons and is not closeable by\nthe user.  You are responsible for updating the progress bar as needed via {@link Roo.MessageBox#updateProgress}\nand closing the message box when the process is complete.",
153       "sig" : "(title, msg)",
154       "static" : false,
155       "memberOf" : "",
156       "isStatic" : false,
157       "isConstructor" : false,
158       "isPrivate" : false,
159       "example" : "",
160       "deprecated" : "",
161       "since" : "",
162       "see" : "",
163       "exceptions" : "",
164       "requires" : "",
165       "params" : [
166         {
167           "name" : "title",
168           "type" : "String",
169           "desc" : "The title bar text",
170           "isOptional" : false
171         },
172         {
173           "name" : "msg",
174           "type" : "String",
175           "desc" : "The message box body text",
176           "isOptional" : false
177         }
178       ],
179       "returns" : [
180         {
181           "name" : "",
182           "type" : "Roo.MessageBox",
183           "desc" : "This message box"
184         }
185       ]
186     },
187     {
188       "name" : "hide",
189       "type" : "function",
190       "desc" : "Hides the message box if it is displayed",
191       "sig" : "()\n{\n\n}",
192       "static" : false,
193       "memberOf" : "",
194       "isStatic" : false,
195       "isConstructor" : false,
196       "isPrivate" : false,
197       "example" : "",
198       "deprecated" : "",
199       "since" : "",
200       "see" : "",
201       "exceptions" : "",
202       "requires" : "",
203       "params" : [],
204       "returns" : []
205     },
206     {
207       "name" : "show",
208       "type" : "function",
209       "desc" : "Displays a new message box, or reinitializes an existing message box, based on the config options\npassed in. All functions (e.g. prompt, alert, etc) on MessageBox call this function internally.\nThe following config object properties are supported:\n<pre>\nProperty    Type             Description\n----------  ---------------  ------------------------------------------------------------------------------------\nanimEl            String/Element   An id or Element from which the message box should animate as it opens and\n                                   closes (defaults to undefined)\nbuttons           Object/Boolean   A button config object (e.g., Roo.MessageBox.OKCANCEL or {ok:'Foo',\n                                   cancel:'Bar'}), or false to not show any buttons (defaults to false)\nclosable          Boolean          False to hide the top-right close button (defaults to true).  Note that\n                                   progress and wait dialogs will ignore this property and always hide the\n                                   close button as they can only be closed programmatically.\ncls               String           A custom CSS class to apply to the message box element\ndefaultTextHeight Number           The default height in pixels of the message box's multiline textarea if\n                                   displayed (defaults to 75)\nfn                Function         A callback function to execute after closing the dialog.  The arguments to the\n                                   function will be btn (the name of the button that was clicked, if applicable,\n                                   e.g. \"ok\"), and text (the value of the active text field, if applicable).\n                                   Progress and wait dialogs will ignore this option since they do not respond to\n                                   user actions and can only be closed programmatically, so any required function\n                                   should be called by the same code after it closes the dialog.\nicon              String           A CSS class that provides a background image to be used as an icon for\n                                   the dialog (e.g., Roo.MessageBox.WARNING or 'custom-class', defaults to '')\nmaxWidth          Number           The maximum width in pixels of the message box (defaults to 600)\nminWidth          Number           The minimum width in pixels of the message box (defaults to 100)\nmodal             Boolean          False to allow user interaction with the page while the message box is\n                                   displayed (defaults to true)\nmsg               String           A string that will replace the existing message box body text (defaults\n                                   to the XHTML-compliant non-breaking space character '&#160;')\nmultiline         Boolean          True to prompt the user to enter multi-line text (defaults to false)\nprogress          Boolean          True to display a progress bar (defaults to false)\nprogressText      String           The text to display inside the progress bar if progress = true (defaults to '')\nprompt            Boolean          True to prompt the user to enter single-line text (defaults to false)\nproxyDrag         Boolean          True to display a lightweight proxy while dragging (defaults to false)\ntitle             String           The title text\nvalue             String           The string value to set into the active textbox element if displayed\nwait              Boolean          True to display a progress bar (defaults to false)\nwidth             Number           The width of the dialog in pixels\n</pre>\n\nExample usage:\n<pre><code>\nRoo.Msg.show({\n   title: 'Address',\n   msg: 'Please enter your address:',\n   width: 300,\n   buttons: Roo.MessageBox.OKCANCEL,\n   multiline: true,\n   fn: saveAddress,\n   animEl: 'addAddressBtn'\n});\n</code></pre>",
210       "sig" : "(config)",
211       "static" : false,
212       "memberOf" : "",
213       "isStatic" : false,
214       "isConstructor" : false,
215       "isPrivate" : false,
216       "example" : "",
217       "deprecated" : "",
218       "since" : "",
219       "see" : "",
220       "exceptions" : "",
221       "requires" : "",
222       "params" : [
223         {
224           "name" : "config",
225           "type" : "Object",
226           "desc" : "Configuration options",
227           "isOptional" : false
228         }
229       ],
230       "returns" : [
231         {
232           "name" : "",
233           "type" : "Roo.MessageBox",
234           "desc" : "This message box"
235         }
236       ]
237     },
238     {
239       "name" : "isVisible",
240       "type" : "function",
241       "desc" : "Returns true if the message box is currently displayed",
242       "sig" : "()\n{\n\n}",
243       "static" : false,
244       "memberOf" : "",
245       "isStatic" : false,
246       "isConstructor" : false,
247       "isPrivate" : false,
248       "example" : "",
249       "deprecated" : "",
250       "since" : "",
251       "see" : "",
252       "exceptions" : "",
253       "requires" : "",
254       "params" : [],
255       "returns" : [
256         {
257           "name" : "",
258           "type" : "Boolean",
259           "desc" : "True if the message box is visible, else false"
260         }
261       ]
262     },
263     {
264       "name" : "wait",
265       "type" : "function",
266       "desc" : "Displays a message box with an infinitely auto-updating progress bar.  This can be used to block user\ninteraction while waiting for a long-running process to complete that does not have defined intervals.\nYou are responsible for closing the message box when the process is complete.",
267       "sig" : "(msg, title)",
268       "static" : false,
269       "memberOf" : "",
270       "isStatic" : false,
271       "isConstructor" : false,
272       "isPrivate" : false,
273       "example" : "",
274       "deprecated" : "",
275       "since" : "",
276       "see" : "",
277       "exceptions" : "",
278       "requires" : "",
279       "params" : [
280         {
281           "name" : "msg",
282           "type" : "String",
283           "desc" : "The message box body text",
284           "isOptional" : false
285         },
286         {
287           "name" : "title",
288           "type" : "String",
289           "desc" : "(optional) The title bar text",
290           "isOptional" : false
291         }
292       ],
293       "returns" : [
294         {
295           "name" : "",
296           "type" : "Roo.MessageBox",
297           "desc" : "This message box"
298         }
299       ]
300     },
301     {
302       "name" : "updateText",
303       "type" : "function",
304       "desc" : "Updates the message box body text",
305       "sig" : "(text)",
306       "static" : false,
307       "memberOf" : "",
308       "isStatic" : false,
309       "isConstructor" : false,
310       "isPrivate" : false,
311       "example" : "",
312       "deprecated" : "",
313       "since" : "",
314       "see" : "",
315       "exceptions" : "",
316       "requires" : "",
317       "params" : [
318         {
319           "name" : "text",
320           "type" : "String",
321           "desc" : "(optional) Replaces the message box element's innerHTML with the specified string (defaults to\nthe XHTML-compliant non-breaking space character '&amp;#160;')",
322           "isOptional" : false
323         }
324       ],
325       "returns" : [
326         {
327           "name" : "",
328           "type" : "Roo.MessageBox",
329           "desc" : "This message box"
330         }
331       ]
332     },
333     {
334       "name" : "updateProgress",
335       "type" : "function",
336       "desc" : "Updates a progress-style message box's text and progress bar.  Only relevant on message boxes\ninitiated via {@link Roo.MessageBox#progress} or by calling {@link Roo.MessageBox#show} with progress: true.",
337       "sig" : "(value, text)",
338       "static" : false,
339       "memberOf" : "",
340       "isStatic" : false,
341       "isConstructor" : false,
342       "isPrivate" : false,
343       "example" : "",
344       "deprecated" : "",
345       "since" : "",
346       "see" : "",
347       "exceptions" : "",
348       "requires" : "",
349       "params" : [
350         {
351           "name" : "value",
352           "type" : "Number",
353           "desc" : "Any number between 0 and 1 (e.g., .5)",
354           "isOptional" : false
355         },
356         {
357           "name" : "text",
358           "type" : "String",
359           "desc" : "(optional) If defined, the message box's body text is replaced with the specified string (defaults to undefined)",
360           "isOptional" : false
361         }
362       ],
363       "returns" : [
364         {
365           "name" : "",
366           "type" : "Roo.MessageBox",
367           "desc" : "This message box"
368         }
369       ]
370     },
371     {
372       "name" : "prompt",
373       "type" : "function",
374       "desc" : "Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to\nJavaScript's Window.prompt).  The prompt can be a single-line or multi-line textbox.  If a callback function\nis passed it will be called after the user clicks either button, and the id of the button that was clicked\n(could also be the top-right close button) and the text that was entered will be passed as the two\nparameters to the callback.",
375       "sig" : "(title, msg, fn, scope, multiline)",
376       "static" : false,
377       "memberOf" : "",
378       "isStatic" : false,
379       "isConstructor" : false,
380       "isPrivate" : false,
381       "example" : "",
382       "deprecated" : "",
383       "since" : "",
384       "see" : "",
385       "exceptions" : "",
386       "requires" : "",
387       "params" : [
388         {
389           "name" : "title",
390           "type" : "String",
391           "desc" : "The title bar text",
392           "isOptional" : false
393         },
394         {
395           "name" : "msg",
396           "type" : "String",
397           "desc" : "The message box body text",
398           "isOptional" : false
399         },
400         {
401           "name" : "fn",
402           "type" : "Function",
403           "desc" : "(optional) The callback function invoked after the message box is closed",
404           "isOptional" : false
405         },
406         {
407           "name" : "scope",
408           "type" : "Object",
409           "desc" : "(optional) The scope of the callback function",
410           "isOptional" : false
411         },
412         {
413           "name" : "multiline",
414           "type" : "Boolean/Number",
415           "desc" : "(optional) True to create a multiline textbox using the defaultTextHeight\nproperty, or the height in pixels to create the textbox (defaults to false / single-line)",
416           "isOptional" : false
417         }
418       ],
419       "returns" : [
420         {
421           "name" : "",
422           "type" : "Roo.MessageBox",
423           "desc" : "This message box"
424         }
425       ]
426     }
427   ],
428   "events" : []
429 }