Upgrade to ExtJS 3.1.1 - Released 02/08/2010
[extjs.git] / docs / source / MessageBox.html
index b253137..a62c44c 100644 (file)
@@ -185,17 +185,19 @@ Ext.MessageBox = function(){
             }\r
             msgEl.update(text || ' ');\r
 \r
-            var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0;\r
-            var mw = msgEl.getWidth() + msgEl.getMargins('lr');\r
-            var fw = dlg.getFrameWidth('lr');\r
-            var bw = dlg.body.getFrameWidth('lr');\r
+            var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0,\r
+                mw = msgEl.getWidth() + msgEl.getMargins('lr'),\r
+                fw = dlg.getFrameWidth('lr'),\r
+                bw = dlg.body.getFrameWidth('lr'),\r
+                w;\r
+                \r
             if (Ext.isIE && iw > 0){\r
                 //3 pixels get subtracted in the icon CSS for an IE margin issue,\r
                 //so we have to add it back here for the overall width to be consistent\r
                 iw += 3;\r
             }\r
-            var w = Math.max(Math.min(opt.width || iw+mw+fw+bw, this.maxWidth),\r
-                        Math.max(opt.minWidth || this.minWidth, bwidth || 0));\r
+            w = Math.max(Math.min(opt.width || iw+mw+fw+bw, opt.maxWidth || this.maxWidth),\r
+                    Math.max(opt.minWidth || this.minWidth, bwidth || 0));\r
 \r
             if(opt.prompt === true){\r
                 activeTextEl.setWidth(w-iw-fw-bw);\r
@@ -493,7 +495,8 @@ Ext.MessageBox.ERROR
                 msg : msg,\r
                 buttons: this.OK,\r
                 fn: fn,\r
-                scope : scope\r
+                scope : scope,\r
+                minWidth: this.minWidth\r
             });\r
             return this;\r
         },\r
@@ -516,7 +519,8 @@ Ext.MessageBox.ERROR
                 buttons: this.YESNO,\r
                 fn: fn,\r
                 scope : scope,\r
-                icon: this.QUESTION\r
+                icon: this.QUESTION,\r
+                minWidth: this.minWidth\r
             });\r
             return this;\r
         },\r
@@ -541,7 +545,7 @@ Ext.MessageBox.ERROR
                 msg : msg,\r
                 buttons: this.OKCANCEL,\r
                 fn: fn,\r
-                minWidth:250,\r
+                minWidth: this.minPromptWidth,\r
                 scope : scope,\r
                 prompt:true,\r
                 multiline: multiline,\r
@@ -613,10 +617,16 @@ Ext.MessageBox.ERROR
         minWidth : 100,\r
         <div id="prop-Ext.MessageBox-minProgressWidth"></div>/**\r
          * The minimum width in pixels of the message box if it is a progress-style dialog.  This is useful\r
-         * for setting a different minimum width than text-only dialogs may need (defaults to 250)\r
+         * for setting a different minimum width than text-only dialogs may need (defaults to 250).\r
          * @type Number\r
          */\r
         minProgressWidth : 250,\r
+        <div id="prop-Ext.MessageBox-minPromptWidth"></div>/**\r
+         * The minimum width in pixels of the message box if it is a prompt dialog.  This is useful\r
+         * for setting a different minimum width than text-only dialogs may need (defaults to 250).\r
+         * @type Number\r
+         */\r
+        minPromptWidth: 250,\r
         <div id="prop-Ext.MessageBox-buttonText"></div>/**\r
          * An object containing the default button text strings that can be overriden for localized language support.\r
          * Supported properties are: ok, cancel, yes and no.  Generally you should include a locale-specific\r