roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Wed, 31 Jan 2018 09:16:29 +0000 (17:16 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 31 Jan 2018 09:16:29 +0000 (17:16 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 2da97b2..7afcb50 100644 (file)
@@ -3138,7 +3138,7 @@ Roo.bootstrap.MessageBox = function(){
         updateText : function(text)
         {
             if(!dlg.isVisible() && !opt.width){
-                dlg.dialogEl.setWidth(this.maxWidth);
+                dlg.dialogEl.setStyle({ 'max-width' : this.maxWidth});
                 // dlg.resizeTo(this.maxWidth, 100); // forcing the height breaks long alerts()
             }
             msgEl.innerHTML = text || '&#160;';
index 4192284..13ffd49 100644 (file)
@@ -125,7 +125,7 @@ J["cancel"].hide();J["yes"].hide();J["no"].hide();return Q;}A.footerEl.dom.style
 }else{M("cancel");}}});A.render();A.on("hide",N);C=A.mask;J={};this.buttons=J;var bt=this.buttonText;J["ok"]=A.addButton(bt["ok"],M.createCallback("ok"));J["yes"]=A.addButton(bt["yes"],M.createCallback("yes"));J["no"]=A.addButton(bt["no"],M.createCallback("no"));
 J["cancel"]=A.addButton(bt["cancel"],M.createCallback("cancel"));E=A.bodyEl.createChild({html:'<span class="roo-mb-text"></span><br /><input type="text" class="roo-mb-input" />'+'<textarea class="roo-mb-textarea"></textarea>'+'<div class="roo-mb-progress-wrap"><div class="roo-mb-progress"><div class="roo-mb-progress-bar">&#160;</div></div></div>'}
 );F=E.dom.firstChild;G=Roo.get(E.dom.childNodes[2]);G.enableDisplayMode();G.addKeyListener([10,13],function(){if(A.isVisible()&&B&&B.buttons){if(B.buttons.ok){M("ok");}else if(B.buttons.yes){M("yes");}}});H=Roo.get(E.dom.childNodes[3]);H.enableDisplayMode();
-I=Roo.get(E.dom.childNodes[4]);I.enableDisplayMode();}return A;},updateText:function(Q){if(!A.isVisible()&&!B.width){A.dialogEl.setWidth(this.maxWidth);}F.innerHTML=Q||'&#160;';var cw=Math.max(F.offsetWidth,F.parentNode.scrollWidth);var w=Math.max(Math.min(B.width||cw,this.maxWidth),Math.max(B.minWidth||this.minWidth,L));
+I=Roo.get(E.dom.childNodes[4]);I.enableDisplayMode();}return A;},updateText:function(Q){if(!A.isVisible()&&!B.width){A.dialogEl.setStyle({'max-width':this.maxWidth});}F.innerHTML=Q||'&#160;';var cw=Math.max(F.offsetWidth,F.parentNode.scrollWidth);var w=Math.max(Math.min(B.width||cw,this.maxWidth),Math.max(B.minWidth||this.minWidth,L));
 if(B.prompt){K.setWidth(w);}if(A.isVisible()){A.fixedcenter=false;}if(E.getHeight()>(Roo.lib.Dom.getViewHeight()-100)){E.setHeight(Roo.lib.Dom.getViewHeight()-100);E.dom.style.overflowY='auto'+(Roo.isIE?'':' !important');}else{E.dom.style.height='';E.dom.style.overflowY='';
 }if(cw>w){E.dom.style.get='auto'+(Roo.isIE?'':' !important');}else{E.dom.style.overflowX='';}A.setContentSize(w,E.getHeight());if(A.isVisible()){A.fixedcenter=true;}return this;},updateProgress:function(Q,R){if(R){this.updateText(R);}if(pp){pp.setWidth(Math.floor(Q*I.dom.firstChild.offsetWidth));
 }return this;},isVisible:function(){return A&&A.isVisible();},hide:function(){if(this.isVisible()){A.hide();}},show:function(Q){if(this.isVisible()){this.hide();Roo.log("[Roo.Messagebox] Show called while message displayed:");Roo.log("Old Dialog Message:"+F.innerHTML);