From: Alan Knowles Date: Tue, 2 Feb 2021 02:23:24 +0000 (+0800) Subject: roojs-bootstrap.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=a2bb0789d76058f09ccfee3b287488f1a3a07941 roojs-bootstrap.js roojs-bootstrap-debug.js Roo/bootstrap/panel/Content.js --- diff --git a/Roo/bootstrap/panel/Content.js b/Roo/bootstrap/panel/Content.js index 617937f15b..2770e59ba7 100644 --- a/Roo/bootstrap/panel/Content.js +++ b/Roo/bootstrap/panel/Content.js @@ -285,6 +285,9 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, { * @return {Roo.UpdateManager} The UpdateManager */ getUpdateManager : function(){ + if (this.iframe) { + return false; + } return this.el.getUpdateManager(); }, /** diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index b65f8ba61b..e8365f0171 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -39530,6 +39530,10 @@ Roo.bootstrap.panel.Content = function( config){ } this.el = Roo.DomHelper.append(document.body, elcfg , true); + if (this.iframe) { + this.iframeEl = this.el.select('iframe',true).first(); + } + } } this.closable = false; @@ -39626,7 +39630,7 @@ Roo.bootstrap.panel.Content = function( config){ - if(this.autoScroll){ + if(this.autoScroll && !this.iframe){ this.resizeEl.setStyle("overflow", "auto"); } else { // fix randome scrolling @@ -39705,11 +39709,15 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, { return true; }, /** - * Updates this panel's element + * Updates this panel's element (not for iframe) * @param {String} content The new content * @param {Boolean} loadScripts (optional) true to look for and process scripts */ setContent : function(content, loadScripts){ + if (this.iframe) { + return; + } + this.el.update(content, loadScripts); }, @@ -39726,6 +39734,9 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, { * @return {Roo.UpdateManager} The UpdateManager */ getUpdateManager : function(){ + if (this.iframe) { + return false; + } return this.el.getUpdateManager(); }, /** diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 207ab8b31d..74192c85f7 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1700,15 +1700,15 @@ Roo.namespace("Roo.bootstrap.panel"); // Roo/bootstrap/panel/Content.js Roo.bootstrap.panel.Content=function(A){this.tpl=A.tpl||false;var el=A.el;var B=A.content;if(A.autoCreate){el=Roo.id();}this.el=Roo.get(el);if(!this.el&&A&&A.autoCreate){if(typeof A.autoCreate=="object"){if(!A.autoCreate.id){A.autoCreate.id=A.id||el;}this.el=Roo.DomHelper.append(document.body,A.autoCreate,true); }else{var C={tag:"div",cls:(A.cls||'')+(A.background?' bg-'+A.background:'')+" roo-layout-inactive-content",id:A.id||el};if(this.iframe){C.cn=[{tag:'iframe',style:'border 0px',src:'about:blank'}];}if(A.html){C.html=A.html;}this.el=Roo.DomHelper.append(document.body,C,true); -}}this.closable=false;this.loaded=false;this.active=false;if(A.toolbar&&!A.toolbar.el&&A.toolbar.xtype){this.toolbar=new A.toolbar.xns[A.toolbar.xtype](A.toolbar);this.wrapEl=this.el;var ti=[];if(A.toolbar.items){ti=A.toolbar.items;delete A.toolbar.items; -}var D=[];this.toolbar.render(this.wrapEl,'before');for(var i=0;i