From 9f52bc79aa0ad16850904ce0eefa700a45bb5673 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 21 Feb 2019 15:34:07 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js roojs-calendar.js roojs-calendar-debug.js Roo/bootstrap/Component.js --- Roo/bootstrap/Component.js | 8 ++++++-- roojs-bootstrap-debug.js | 13 ++++++++----- roojs-bootstrap.js | 8 ++++---- roojs-calendar-debug.js | 13 ++++++++----- roojs-calendar.js | 8 ++++---- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/Roo/bootstrap/Component.js b/Roo/bootstrap/Component.js index 4a83188b3b..375c061332 100644 --- a/Roo/bootstrap/Component.js +++ b/Roo/bootstrap/Component.js @@ -384,12 +384,16 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent, { addxtypeChildren: function(child_array, skip_children) { var nitems = []; - if (!child_array || !child_array.length) { + if (!child_array || !child_array.length ) { this.items = nitems; return; } + for(var i =0;i < child_array.length;i++) { - // Roo.log(['add child', items[i]]); + if (skip_children) { + break; + } + // Roo.log(['add child', items[i]]); nitems.push(this.addxtype(Roo.apply({}, child_array[i]))); } this.items = nitems; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index a89a576392..b1385bf7f7 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -395,18 +395,21 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent, { }, - addxtypeChildren: function(child_array) + addxtypeChildren: function(child_array, skip_children) { var nitems = []; if (!child_array || !child_array.length) { this.items = nitems; - return this; + return; } for(var i =0;i < child_array.length;i++) { // Roo.log(['add child', items[i]]); - nitems.push(this.addxtype(Roo.apply({}, child_array[i]))); - } - + nitems.push(this.addxtype(Roo.apply({}, child_array[i]))); + } + this.items = nitems; + + this.fireEvent('childrenrendered', this); + }, diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 782757d99f..6c8c26d633 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -12,10 +12,10 @@ this.el.dom.removeAttribute('xtype');this.initEvents();}return;}var B=Roo.apply( var D=(typeof(A['flexy:if'])!='undefined')||(typeof(A['flexy:foreach'])!='undefined');skip_children=false;if(!C){if(!this[B](true)){A.items=[];return A;}cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;var E=Roo.XComponent.build_from_html;if(E&&Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var F=Roo.get(this[B](false)); var G=F?F.child('>*[xtype]'):false;if(G){}if(G&&G.attr('xtype').split('.').pop()==cn.xtype){cn.el=G;}else{Roo.debug&&Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));Roo.debug&&Roo.log(F);Roo.debug&&Roo.log(G); Roo.debug&&Roo.log(cn);}}if(E&&D&&!cn.el&&cn.can_build_overlaid){Roo.debug&&Roo.log('skipping render');Roo.debug&&Roo.log(A);if(!cn.el){Roo.debug&&Roo.log('skipping all children');skip_children=true;}}else{cn.render&&cn.render(this[B](true));}}var H=[];if(!A.items||!A.items.length){cn.items=H; -return cn;}var I=A.items;delete A.items;if(!skip_children){for(var i=0;i*[xtype]'):false;if(G){}if(G&&G.attr('xtype').split('.').pop()==cn.xtype){cn.el=G;}else{Roo.debug&&Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));Roo.debug&&Roo.log(F);Roo.debug&&Roo.log(G); Roo.debug&&Roo.log(cn);}}if(E&&D&&!cn.el&&cn.can_build_overlaid){Roo.debug&&Roo.log('skipping render');Roo.debug&&Roo.log(A);if(!cn.el){Roo.debug&&Roo.log('skipping all children');skip_children=true;}}else{cn.render&&cn.render(this[B](true));}}var H=[];if(!A.items||!A.items.length){cn.items=H; -return cn;}var I=A.items;delete A.items;if(!skip_children){for(var i=0;i'+K+'',unselectable:'on'});};var B={};if(!this.header){B={tag:'table',cls:'fc-header',style:'width:100%',cn:[{tag:'tr',cn:[{tag:'td',cls:'fc-header-left',cn:[A('prev','left','arrow','‹'),A('next','right','arrow','›'),{tag:'span',cls:'fc-header-space'} -- 2.39.2