roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Tue, 2 Feb 2021 02:24:22 +0000 (10:24 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 2 Feb 2021 02:24:22 +0000 (10:24 +0800)
roojs-bootstrap-debug.js
Roo/bootstrap/panel/Content.js

Roo/bootstrap/panel/Content.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 3c3df3e..b6670a8 100644 (file)
@@ -292,6 +292,7 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, {
     },
      /**
      * Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use {@link #setUrl}.
+     * Does not work with IFRAME contents
      * @param {Object/String/Function} url The url for this request or a function to call to get the url or a config object containing any of the following options:
 <pre><code>
 panel.load({
@@ -306,6 +307,7 @@ panel.load({
     scripts: false
 });
 </code></pre>
+     
      * The only required property is <i>url</i>. The optional properties <i>nocache</i>, <i>text</i> and <i>scripts</i>
      * are shorthand for <i>disableCaching</i>, <i>indicatorText</i> and <i>loadScripts</i> and are used to set their associated property on this panel UpdateManager instance.
      * @param {String/Object} params (optional) The parameters to pass as either a URL encoded string "param1=1&amp;param2=2" or an object {param1: 1, param2: 2}
@@ -335,7 +337,7 @@ panel.load({
     setUrl : function(url, params, loadOnce){
         if (this.iframe) {
             this.iframeEl.dom.src = url;
-            return;
+            return false;
         }
         
         if(this.refreshDelegate){
index e8365f0..68d8ee4 100644 (file)
@@ -39741,6 +39741,7 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, {
     },
      /**
      * Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use {@link #setUrl}.
+     * Does not work with IFRAME contents
      * @param {Object/String/Function} url The url for this request or a function to call to get the url or a config object containing any of the following options:
 <pre><code>
 panel.load({
@@ -39755,6 +39756,7 @@ panel.load({
     scripts: false
 });
 </code></pre>
+     
      * The only required property is <i>url</i>. The optional properties <i>nocache</i>, <i>text</i> and <i>scripts</i>
      * are shorthand for <i>disableCaching</i>, <i>indicatorText</i> and <i>loadScripts</i> and are used to set their associated property on this panel UpdateManager instance.
      * @param {String/Object} params (optional) The parameters to pass as either a URL encoded string "param1=1&amp;param2=2" or an object {param1: 1, param2: 2}
@@ -39763,6 +39765,11 @@ panel.load({
      * @return {Roo.ContentPanel} this
      */
     load : function(){
+        
+        if (this.iframe) {
+            return this;
+        }
+        
         var um = this.el.getUpdateManager();
         um.update.apply(um, arguments);
         return this;
@@ -39777,6 +39784,11 @@ panel.load({
      * @return {Roo.UpdateManager} The UpdateManager
      */
     setUrl : function(url, params, loadOnce){
+        if (this.iframe) {
+            this.iframeEl.dom.src = url;
+            return;
+        }
+        
         if(this.refreshDelegate){
             this.removeListener("activate", this.refreshDelegate);
         }
index 74192c8..c75a5ff 100644 (file)
@@ -1708,9 +1708,9 @@ this.view=Roo.factory(this.view);this.view.render&&this.view.render(false,'');}t
 this.setActiveClass(A&&!this.background);},setActiveClass:function(A){if(A){this.el.replaceClass("roo-layout-inactive-content","roo-layout-active-content");this.el.setStyle('position','relative');}else{this.el.replaceClass("roo-layout-active-content","roo-layout-inactive-content");
 this.el.setStyle('position','absolute');}},getToolbar:function(){return this.toolbar;},setActiveState:function(A){this.active=A;this.setActiveClass(A);if(!A){if(this.fireEvent("deactivate",this)===false){return false;}return true;}this.fireEvent("activate",this);
 return true;},setContent:function(A,B){if(this.iframe){return;}this.el.update(A,B);},ignoreResize:function(w,h){if(this.lastSize&&this.lastSize.width==w&&this.lastSize.height==h){return true;}else{this.lastSize={width:w,height:h};return false;}},getUpdateManager:function(){if(this.iframe){return false;
-}return this.el.getUpdateManager();},load:function(){var um=this.el.getUpdateManager();um.update.apply(um,arguments);return this;},setUrl:function(A,B,C){if(this.refreshDelegate){this.removeListener("activate",this.refreshDelegate);}this.refreshDelegate=this._handleRefresh.createDelegate(this,[A,B,C]);
-this.on("activate",this.refreshDelegate);return this.el.getUpdateManager();},_handleRefresh:function(A,B,C){if(!C||!this.loaded){var D=this.el.getUpdateManager();D.update(A,B,this._setLoaded.createDelegate(this));}},_setLoaded:function(){this.loaded=true;
-},getId:function(){return this.el.id;},getEl:function(){return this.wrapEl||this.el;},adjustForComponents:function(A,B){if(this.resizeEl!=this.el){A-=this.el.getFrameWidth('lr');B-=this.el.getFrameWidth('tb');}if(this.toolbar){var te=this.toolbar.getEl();
+}return this.el.getUpdateManager();},load:function(){if(this.iframe){return this;}var um=this.el.getUpdateManager();um.update.apply(um,arguments);return this;},setUrl:function(A,B,C){if(this.iframe){this.iframeEl.dom.src=A;return;}if(this.refreshDelegate){this.removeListener("activate",this.refreshDelegate);
+}this.refreshDelegate=this._handleRefresh.createDelegate(this,[A,B,C]);this.on("activate",this.refreshDelegate);return this.el.getUpdateManager();},_handleRefresh:function(A,B,C){if(!C||!this.loaded){var D=this.el.getUpdateManager();D.update(A,B,this._setLoaded.createDelegate(this));
+}},_setLoaded:function(){this.loaded=true;},getId:function(){return this.el.id;},getEl:function(){return this.wrapEl||this.el;},adjustForComponents:function(A,B){if(this.resizeEl!=this.el){A-=this.el.getFrameWidth('lr');B-=this.el.getFrameWidth('tb');}if(this.toolbar){var te=this.toolbar.getEl();
 te.setWidth(A);B-=te.getHeight();}if(this.footer){var te=this.footer.getEl();te.setWidth(A);B-=te.getHeight();}if(this.adjustments){A+=this.adjustments[0];B+=this.adjustments[1];}return {"width":A,"height":B};},setSize:function(A,B){if(this.fitToFrame&&!this.ignoreResize(A,B)){if(this.fitContainer&&this.resizeEl!=this.el){this.el.setSize(A,B);
 }var C=this.adjustForComponents(A,B);this.resizeEl.setSize(this.autoWidth?"auto":C.width,this.autoHeight?"auto":C.height);this.fireEvent('resize',this,C.width,C.height);}},getTitle:function(){if(typeof(this.title)!='object'){return this.title;}var t='';for(var k in this.title){if(!this.title.hasOwnProperty(k)){continue;
 }if(k.indexOf('-')>=0){var s=k.split('-');for(var i=0;i<s.length;i++){t+="<span class='visible-"+s[i]+"'>"+this.title[k]+"</span>";}}else{t+="<span class='visible-"+k+"'>"+this.title[k]+"</span>";}}return t;},setTitle:function(A){this.title=A;if(this.region){this.region.updatePanelTitle(this,A);