/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_MessageBox({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"

Files

Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.

\n

Note that the MessageBox is asynchronous. Unlike a regular JavaScript alert (which will halt\nbrowser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code\nthat should only run after some user feedback from the MessageBox, you must use a callback function\n(see the function parameter for show for more details).

\n

Example usage:

\n
// Basic alert:\nExt.Msg.alert('Status', 'Changes saved successfully.');\n\n// Prompt for user data and process the result using a callback:\nExt.Msg.prompt('Name', 'Please enter your name:', function(btn, text){\n    if (btn == 'ok'){\n        // process text value and close...\n    }\n});\n\n// Show a dialog using config options:\nExt.Msg.show({\n   title:'Save Changes?',\n   msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',\n   buttons: Ext.Msg.YESNOCANCEL,\n   fn: processResult,\n   animEl: 'elId',\n   icon: Ext.MessageBox.QUESTION\n});\n
\n\n

Defined By

Properties

Ext.MessageBox
view source
: Object
Button config that displays a single Cancel button ...

Button config that displays a single Cancel button

\n

Defaults to: {cancel: true}

Ext.MessageBox
view source
: String
The CSS class that provides the ERROR icon image ...

The CSS class that provides the ERROR icon image

\n

Defaults to: 'ext-mb-error'

Ext.MessageBox
view source
: String
The CSS class that provides the INFO icon image ...

The CSS class that provides the INFO icon image

\n

Defaults to: 'ext-mb-info'

Ext.MessageBox
view source
: Object
Button config that displays a single OK button ...

Button config that displays a single OK button

\n

Defaults to: {ok: true}

Ext.MessageBox
view source
: Object
Button config that displays OK and Cancel buttons ...

Button config that displays OK and Cancel buttons

\n

Defaults to: {ok: true, cancel: true}

Ext.MessageBox
view source
: String
The CSS class that provides the QUESTION icon image ...

The CSS class that provides the QUESTION icon image

\n

Defaults to: 'ext-mb-question'

Ext.MessageBox
view source
: String
The CSS class that provides the WARNING icon image ...

The CSS class that provides the WARNING icon image

\n

Defaults to: 'ext-mb-warning'

Ext.MessageBox
view source
: Object
Button config that displays Yes and No buttons ...

Button config that displays Yes and No buttons

\n

Defaults to: {yes: true, no: true}

Ext.MessageBox
view source
: Object
Button config that displays Yes, No and Cancel buttons ...

Button config that displays Yes, No and Cancel buttons

\n

Defaults to: {yes: true, no: true, cancel: true}

Ext.MessageBox
view source
: Object
An object containing the default button text strings that can be overriden for localized language support. ...

An object containing the default button text strings that can be overriden for localized language support.\nSupported properties are: ok, cancel, yes and no. Generally you should include a locale-specific\nresource file for handling language support across the framework.\nCustomize the default text like so: Ext.MessageBox.buttonText.yes = \"oui\"; //french

\n

Defaults to: {ok: "OK", cancel: "Cancel", yes: "Yes", no: "No"}

The default height in pixels of the message box's multiline textarea if displayed (defaults to 75) ...

The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)

\n

Defaults to: 75

Ext.MessageBox
view source
: Number
The maximum width in pixels of the message box (defaults to 600) ...

The maximum width in pixels of the message box (defaults to 600)

\n

Defaults to: 600

The minimum width in pixels of the message box if it is a progress-style dialog. ...

The minimum width in pixels of the message box if it is a progress-style dialog. This is useful\nfor setting a different minimum width than text-only dialogs may need (defaults to 250).

\n

Defaults to: 250

The minimum width in pixels of the message box if it is a prompt dialog. ...

The minimum width in pixels of the message box if it is a prompt dialog. This is useful\nfor setting a different minimum width than text-only dialogs may need (defaults to 250).

\n

Defaults to: 250

Ext.MessageBox
view source
: Number
The minimum width in pixels of the message box (defaults to 100) ...

The minimum width in pixels of the message box (defaults to 100)

\n

Defaults to: 100

Defined By

Methods

Ext.MessageBox
view source
( title, msg, [fn], [scope] ) : Ext.MessageBoxchainable
Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt). ...

Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).\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).

\n

Parameters

  • title : String

    The title bar text

    \n
  • msg : String

    The message box body text

    \n
  • fn : Function (optional)

    The callback function invoked after the message box is closed

    \n
  • scope : Object (optional)

    The scope (this reference) in which the callback is executed. Defaults to the browser wnidow.

    \n

Returns

Ext.MessageBox
view source
( title, msg, [fn], [scope] ) : Ext.MessageBoxchainable
Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm). ...

Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).\nIf a callback function is passed it will be called after the user clicks either button,\nand the id 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).

\n

Parameters

  • title : String

    The title bar text

    \n
  • msg : String

    The message box body text

    \n
  • fn : Function (optional)

    The callback function invoked after the message box is closed

    \n
  • scope : Object (optional)

    The scope (this reference) in which the callback is executed. Defaults to the browser wnidow.

    \n

Returns

Ext.MessageBox
view source
( titleText ) : Ext.Window
Returns a reference to the underlying Ext.Window element ...

Returns a reference to the underlying Ext.Window element

\n

Parameters

  • titleText : Object
    \n

Returns

Ext.MessageBox
view source
( ) : Ext.MessageBoxchainable
Hides the message box if it is displayed ...

Hides the message box if it is displayed

\n

Returns

Ext.MessageBox
view source
( ) : Boolean
Returns true if the message box is currently displayed ...

Returns true if the message box is currently displayed

\n

Returns

  • Boolean

    True if the message box is visible, else false

    \n
Ext.MessageBox
view source
( title, msg, [progressText] ) : Ext.MessageBoxchainable
Displays a message box with a progress bar. ...

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 updateProgress\nand closing the message box when the process is complete.

\n

Parameters

  • title : String

    The title bar text

    \n
  • msg : String

    The message box body text

    \n
  • progressText : String (optional)

    The text to display inside the progress bar (defaults to '')

    \n

Returns

Ext.MessageBox
view source
( title, msg, [fn], [scope], [multiline], [value] ) : Ext.MessageBoxchainable
Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's p...

Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).\nThe prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user\nclicks either button, and the id of the button that was clicked (could also be the top-right\nclose button) and the text that was entered will be passed as the two parameters to the callback.

\n

Parameters

  • title : String

    The title bar text

    \n
  • msg : String

    The message box body text

    \n
  • fn : Function (optional)

    The callback function invoked after the message box is closed

    \n
  • scope : Object (optional)

    The scope (this reference) in which the callback is executed. Defaults to the browser wnidow.

    \n
  • multiline : Boolean/Number (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)

    \n
  • value : String (optional)

    Default value of the text input element (defaults to '')

    \n

Returns

Ext.MessageBox
view source
( icon ) : Ext.MessageBoxchainable
Adds the specified icon to the dialog. ...

Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default\nstyling, and the class passed in is expected to supply the background image url. Pass in empty string ('')\nto clear any existing icon. This method must be called before the MessageBox is shown.\nThe following built-in icon classes are supported, but you can also pass in a custom class name:

\n\n
Ext.MessageBox.INFO\nExt.MessageBox.WARNING\nExt.MessageBox.QUESTION\nExt.MessageBox.ERROR\n
\n\n

Parameters

  • icon : String

    A CSS classname specifying the icon's background image url, or empty string to clear the icon

    \n

Returns

Ext.MessageBox
view source
( config ) : Ext.MessageBoxchainable
Displays a new message box, or reinitializes an existing message box, based on the config options\npassed in. ...

Displays a new message box, or reinitializes an existing message box, based on the config options\npassed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally,\nalthough those calls are basic shortcuts and do not support all of the config options allowed here.

\n

Parameters

  • config : Object

    The following config options are supported:

      \n
    • animEl : String/Element
      An id or Element from which the message box should animate as it\nopens and closes (defaults to undefined)
    • \n
    • buttons : Object/Boolean
      A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo',\ncancel:'Bar'}), or false to not show any buttons (defaults to false)
    • \n
    • closable : Boolean
      False to hide the top-right close button (defaults to true). Note that\nprogress and wait dialogs will ignore this property and always hide the close button as they can only\nbe closed programmatically.
    • \n
    • cls : String
      A custom CSS class to apply to the message box's container element
    • \n
    • defaultTextHeight : Number
      The default height in pixels of the message box's multiline textarea\nif displayed (defaults to 75)
    • \n
    • fn : Function
      A callback function which is called when the dialog is dismissed either\nby clicking on the configured buttons, or on the dialog close button, or by pressing\nthe return button to enter input.

      \n\n

      Progress and wait dialogs will ignore this option since they do not respond to user\nactions and can only be closed programmatically, so any required function should be called\nby the same code after it closes the dialog. Parameters passed:

        \n
      • buttonId : String
        The ID of the button pressed, one of:
          \n
        • ok
        • \n
        • yes
        • \n
        • no
        • \n
        • cancel
        • \n
      • \n
      • text : String
        Value of the input field if either prompt\nor multiline is true
      • \n
      • opt : Object
        The config object passed to show.
      • \n

      \n\n\n

    • \n
    • scope : Object
      The scope of the callback function
    • \n
    • icon : String
      A CSS class that provides a background image to be used as the body icon for the\ndialog (e.g. Ext.MessageBox.WARNING or 'custom-class') (defaults to '')
    • \n
    • iconCls : String
      The standard Ext.Window.iconCls to\nadd an optional header icon (defaults to '')
    • \n
    • maxWidth : Number
      The maximum width in pixels of the message box (defaults to 600)
    • \n
    • minWidth : Number
      The minimum width in pixels of the message box (defaults to 100)
    • \n
    • modal : Boolean
      False to allow user interaction with the page while the message box is\ndisplayed (defaults to true)
    • \n
    • msg : String
      A string that will replace the existing message box body text (defaults to the\nXHTML-compliant non-breaking space character ' ')
    • \n
    • multiline : Boolean
      \nTrue to prompt the user to enter multi-line text (defaults to false)
    • \n
    • progress : Boolean
      True to display a progress bar (defaults to false)
    • \n
    • progressText : String
      The text to display inside the progress bar if progress = true (defaults to '')
    • \n
    • prompt : Boolean
      True to prompt the user to enter single-line text (defaults to false)
    • \n
    • proxyDrag : Boolean
      True to display a lightweight proxy while dragging (defaults to false)
    • \n
    • title : String
      The title text
    • \n
    • value : String
      The string value to set into the active textbox element if displayed
    • \n
    • wait : Boolean
      True to display a progress bar (defaults to false)
    • \n
    • waitConfig : Object
      A Ext.ProgressBar.waitConfig object (applies only if wait = true)
    • \n
    • width : Number
      The width of the dialog in pixels
    • \n
    \nExample usage:

    \n\n
    Ext.Msg.show({\n   title: 'Address',\n   msg: 'Please enter your address:',\n   width: 300,\n   buttons: Ext.MessageBox.OKCANCEL,\n   multiline: true,\n   fn: saveAddress,\n   animEl: 'addAddressBtn',\n   icon: Ext.MessageBox.INFO\n});\n
    \n\n

Returns

Ext.MessageBox
view source
( value, progressText, msg ) : Ext.MessageBoxchainable
Updates a progress-style message box's text and progress bar. ...

Updates a progress-style message box's text and progress bar. Only relevant on message boxes\ninitiated via progress or wait,\nor by calling show with progress: true.

\n

Parameters

  • value : Number

    Any number between 0 and 1 (e.g., .5, defaults to 0)

    \n
  • progressText : String

    The progress text to display inside the progress bar (defaults to '')

    \n
  • msg : String

    The message box's body text is replaced with the specified string (defaults to undefined\nso that any existing body text will not get overwritten by default unless a new value is passed in)

    \n

Returns

Ext.MessageBox
view source
( [text] ) : Ext.MessageBoxchainable
Updates the message box body text ...

Updates the message box body text

\n

Parameters

  • text : String (optional)

    Replaces the message box element's innerHTML with the specified string (defaults to\nthe XHTML-compliant non-breaking space character ' ')

    \n

Returns

Ext.MessageBox
view source
( msg, [title], [config] ) : Ext.MessageBoxchainable
Displays a message box with an infinitely auto-updating progress bar. ...

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.

\n

Parameters

  • msg : String

    The message box body text

    \n
  • title : String (optional)

    The title bar text

    \n
  • config : Object (optional)

    A Ext.ProgressBar.waitConfig object

    \n

Returns

","superclasses":[],"meta":{},"requires":[],"html_meta":{},"statics":{"property":[],"cfg":[],"css_var":[],"method":[],"event":[],"css_mixin":[]},"files":[{"href":"MessageBox.html#Ext-MessageBox","filename":"MessageBox.js"}],"linenr":1,"members":{"property":[{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"CANCEL","id":"property-CANCEL"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"ERROR","id":"property-ERROR"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"INFO","id":"property-INFO"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"OK","id":"property-OK"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"OKCANCEL","id":"property-OKCANCEL"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"QUESTION","id":"property-QUESTION"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"WARNING","id":"property-WARNING"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"YESNO","id":"property-YESNO"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"YESNOCANCEL","id":"property-YESNOCANCEL"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"buttonText","id":"property-buttonText"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"defaultTextHeight","id":"property-defaultTextHeight"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"maxWidth","id":"property-maxWidth"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"minProgressWidth","id":"property-minProgressWidth"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"minPromptWidth","id":"property-minPromptWidth"},{"tagname":"property","owner":"Ext.MessageBox","meta":{},"name":"minWidth","id":"property-minWidth"}],"cfg":[],"css_var":[],"method":[{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"alert","id":"method-alert"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"confirm","id":"method-confirm"},{"tagname":"method","owner":"Ext.MessageBox","meta":{},"name":"getDialog","id":"method-getDialog"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"hide","id":"method-hide"},{"tagname":"method","owner":"Ext.MessageBox","meta":{},"name":"isVisible","id":"method-isVisible"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"progress","id":"method-progress"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"prompt","id":"method-prompt"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"setIcon","id":"method-setIcon"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"show","id":"method-show"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"updateProgress","id":"method-updateProgress"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"updateText","id":"method-updateText"},{"tagname":"method","owner":"Ext.MessageBox","meta":{"chainable":true},"name":"wait","id":"method-wait"}],"event":[],"css_mixin":[]},"inheritable":null,"private":null,"component":false,"name":"Ext.MessageBox","singleton":true,"override":null,"inheritdoc":null,"id":"class-Ext.MessageBox","mixins":[],"mixedInto":[]});