roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Fri, 30 Nov 2018 08:24:14 +0000 (16:24 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 30 Nov 2018 08:24:14 +0000 (16:24 +0800)
roojs-bootstrap-debug.js

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

index 3630417..1606bdf 100644 (file)
@@ -3605,6 +3605,9 @@ Roo.Msg.show({
                 textareaEl.hide();
             }
             progressEl.setDisplayed(opt.progress === true);
+            if (opt.progress) {
+                d.animate = false; // do not animate progress, as it may not have finished animating before we close it..
+            }
             this.updateProgress(0);
             activeTextEl.dom.value = opt.value || "";
             if(opt.prompt){
index 0486c5d..772d404 100644 (file)
@@ -144,12 +144,13 @@ E.dom.style.overflowY='auto'+(Roo.isIE?'':' !important');}else{E.dom.style.heigh
 }return this;},updateProgress:function(Q,R){if(R){this.updateText(R);}if(pp){pp.setWidth(Math.floor(Q*I.dom.firstChild.offsetWidth));pp.setHeight(Math.floor(I.dom.firstChild.offsetHeight));}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);Roo.log("New Dialog Message:"+Q.msg)}var d=this.getDialog();B=Q;d.setTitle(B.title||"&#160;");
 d.closeEl.setDisplayed(B.closable!==false);K=G;B.prompt=B.prompt||(B.multiline?true:false);if(B.prompt){if(B.multiline){G.hide();H.show();H.setHeight(typeof B.multiline=="number"?B.multiline:this.defaultTextHeight);K=H;}else{G.show();H.hide();}}else{G.hide();
-H.hide();}I.setDisplayed(B.progress===true);this.updateProgress(0);K.dom.value=B.value||"";if(B.prompt){A.setDefaultButton(K);}else{var bs=B.buttons;var db=null;if(bs&&bs.ok){db=J["ok"];}else if(bs&&bs.yes){db=J["yes"];}A.setDefaultButton(db);}L=O(B.buttons);
-this.updateText(B.msg);if(B.cls){d.el.addClass(B.cls);}d.proxyDrag=B.proxyDrag===true;d.modal=B.modal!==false;d.mask=B.modal!==false?C:false;if(!d.isVisible()){document.body.appendChild(A.el.dom);d.animateTarget=null;d.show(Q.animEl);}return this;},progress:function(Q,R){this.show({title:Q,msg:R,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,modal:true}
-);return this;},alert:function(Q,R,fn,S){this.show({title:Q,msg:R,buttons:this.OK,fn:fn,closable:false,scope:S,modal:true});return this;},wait:function(Q,R){this.show({title:R,msg:Q,buttons:false,closable:false,progress:true,modal:true,width:300,wait:true}
-);D=Roo.TaskMgr.start({run:function(i){Roo.MessageBox.updateProgress(((((i+20)%20)+1)*5)*.01);},interval:1000});return this;},confirm:function(Q,R,fn,S){this.show({title:Q,msg:R,buttons:this.YESNO,fn:fn,scope:S,modal:true});return this;},prompt:function(Q,R,fn,S,T){this.show({title:Q,msg:R,buttons:this.OKCANCEL,fn:fn,minWidth:250,scope:S,prompt:true,multiline:T,modal:true}
-);return this;},OK:{ok:true},YESNO:{yes:true,no:true},OKCANCEL:{ok:true,cancel:true},YESNOCANCEL:{yes:true,no:true,cancel:true},defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}};}();
-Roo.MessageBox=Roo.MessageBox||Roo.bootstrap.MessageBox;Roo.Msg=Roo.Msg||Roo.MessageBox;
+H.hide();}I.setDisplayed(B.progress===true);if(B.progress){d.animate=false;}this.updateProgress(0);K.dom.value=B.value||"";if(B.prompt){A.setDefaultButton(K);}else{var bs=B.buttons;var db=null;if(bs&&bs.ok){db=J["ok"];}else if(bs&&bs.yes){db=J["yes"];}A.setDefaultButton(db);
+}L=O(B.buttons);this.updateText(B.msg);if(B.cls){d.el.addClass(B.cls);}d.proxyDrag=B.proxyDrag===true;d.modal=B.modal!==false;d.mask=B.modal!==false?C:false;if(!d.isVisible()){document.body.appendChild(A.el.dom);d.animateTarget=null;d.show(Q.animEl);}return this;
+},progress:function(Q,R){this.show({title:Q,msg:R,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,modal:true});return this;},alert:function(Q,R,fn,S){this.show({title:Q,msg:R,buttons:this.OK,fn:fn,closable:false,scope:S,modal:true}
+);return this;},wait:function(Q,R){this.show({title:R,msg:Q,buttons:false,closable:false,progress:true,modal:true,width:300,wait:true});D=Roo.TaskMgr.start({run:function(i){Roo.MessageBox.updateProgress(((((i+20)%20)+1)*5)*.01);},interval:1000});return this;
+},confirm:function(Q,R,fn,S){this.show({title:Q,msg:R,buttons:this.YESNO,fn:fn,scope:S,modal:true});return this;},prompt:function(Q,R,fn,S,T){this.show({title:Q,msg:R,buttons:this.OKCANCEL,fn:fn,minWidth:250,scope:S,prompt:true,multiline:T,modal:true});return this;
+},OK:{ok:true},YESNO:{yes:true,no:true},OKCANCEL:{ok:true,cancel:true},YESNOCANCEL:{yes:true,no:true,cancel:true},defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}};}();Roo.MessageBox=Roo.MessageBox||Roo.bootstrap.MessageBox;
+Roo.Msg=Roo.Msg||Roo.MessageBox;
 // Roo/bootstrap/Navbar.js
 Roo.bootstrap.Navbar=function(A){Roo.bootstrap.Navbar.superclass.constructor.call(this,A);this.addEvents({"beforetoggle":true});};Roo.extend(Roo.bootstrap.Navbar,Roo.bootstrap.Component,{navItems:false,loadMask:false,getAutoCreate:function(){throw {message:"nav bar is now a abstract base class - use NavSimplebar / NavHeaderbar / NavSidebar etc..."}
 ;},initEvents:function(){this.el.select('.navbar-toggle',true).on('click',function(){if(this.fireEvent('beforetoggle',this)!==false){var ce=this.el.select('.navbar-collapse',true).first();ce.toggleClass('in');if(ce.hasClass('collapse')){ce.removeClass('collapse');