X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FMessageBox.js;h=7562c5759dfec5b032051cb7343900db3dd855dc;hb=0b69a11b1055a6d3a3fd0719bdd58b5a235de0e4;hp=66d145f6be19fdebf69629c8984bc6b967be3594;hpb=f2b5307206fa9c6080f30dfcde3225f1dccdf0fb;p=roojs1 diff --git a/Roo/MessageBox.js b/Roo/MessageBox.js index 66d145f6be..7562c5759d 100644 --- a/Roo/MessageBox.js +++ b/Roo/MessageBox.js @@ -170,7 +170,9 @@ Roo.MessageBox = function(){ dlg.resizeTo(this.maxWidth, 100); // resize first so content is never clipped from previous shows } msgEl.innerHTML = text || ' '; - var cw = Math.max(msgEl.offsetWidth, msgEl.scrollWidth); + + var cw = Math.max(msgEl.offsetWidth, msgEl.parentNode.scrollWidth); + //Roo.log("guesed size: " + JSON.stringify([cw,msgEl.offsetWidth, msgEl.parentNode.scrollWidth])); var w = Math.max( Math.min(opt.width || cw , this.maxWidth), Math.max(opt.minWidth || this.minWidth, bwidth) @@ -181,16 +183,18 @@ Roo.MessageBox = function(){ if(dlg.isVisible()){ dlg.fixedcenter = false; } - // to big, make it scoll. + // to big, make it scroll. = But as usual stupid IE does not support + // !important.. + if ( bodyEl.getHeight() > (Roo.lib.Dom.getViewHeight() - 100)) { bodyEl.setHeight ( Roo.lib.Dom.getViewHeight() - 100 ); - bodyEl.dom.style.overflowY = 'auto !important'; + bodyEl.dom.style.overflowY = 'auto' + ( Roo.isIE ? '' : ' !important'); } else { bodyEl.dom.style.height = ''; bodyEl.dom.style.overflowY = ''; } if (cw > w) { - bodyEl.dom.style.overflowX = 'auto !important'; + bodyEl.dom.style.get = 'auto' + ( Roo.isIE ? '' : ' !important'); } else { bodyEl.dom.style.overflowX = ''; } @@ -302,7 +306,9 @@ Roo.Msg.show({ if(this.isVisible()){ this.hide(); - Roo.log("Old Dialog Message:" + msgEl.innerHTML ) + Roo.log("[Roo.Messagebox] Show called while message displayed:" ); + Roo.log("Old Dialog Message:" + msgEl.innerHTML ); + Roo.log("New Dialog Message:" + options.msg ) //this.alert("ERROR", "Multiple dialogs where displayed at the same time"); //throw "Roo.MessageBox ERROR : Multiple dialogs where displayed at the same time";