From 4f233bc83197b82af9db05cdd069e5d409103b9b Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 20 Jul 2021 12:28:58 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js roojs-calendar.js roojs-calendar-debug.js --- roojs-calendar-debug.js | 4 ++-- roojs-calendar.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roojs-calendar-debug.js b/roojs-calendar-debug.js index 2df5b2230a..665e3b0d61 100644 --- a/roojs-calendar-debug.js +++ b/roojs-calendar-debug.js @@ -117,11 +117,11 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent, { } if (this.cls) { - cfg.cls = (typeof(cfg.cls) == 'undefined') ? this.cls : cfg.cls + ' ' + this.cls; + cfg.cls = (typeof(cfg.cls) == 'undefined' ? this.cls : cfg.cls) + ' ' + this.cls; } if (this.style) { // fixme needs to support more complex style data. - cfg.style = (cfg.style || '') + ' ' + this.style; + cfg.style = (typeof(cfg.style) == 'undefined' ? this.style : cfg.style) + ' ' + this.style; } if(this.name){ diff --git a/roojs-calendar.js b/roojs-calendar.js index 45efa18042..dca9a61574 100644 --- a/roojs-calendar.js +++ b/roojs-calendar.js @@ -2,7 +2,7 @@ Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstrap.Component.superclass.constructor.call(this,A);this.addEvents({"childrenrendered":true});};Roo.extend(Roo.bootstrap.Component,Roo.BoxComponent,{allowDomMove:false,cls:false,style:false,autoCreate:false,tooltip:null,initEvents:function(){} ,xattr:false,parentId:false,can_build_overlaid:true,container_method:false,dataId:false,name:false,parent:function(){return Roo.ComponentMgr.get(this.parentId)},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(this.el){if(this.el.attr('xtype')){this.el.attr('xtypex',this.el.attr('xtype')); this.el.dom.removeAttribute('xtype');this.initEvents();}return;}var B=Roo.apply({},this.getAutoCreate());B.id=this.id||Roo.id();if(this.xattr&&typeof(this.xattr)=='object'){for(var i in this.xattr){B[i]=this.xattr[i];}}if(this.dataId){B.dataId=this.dataId; -}if(this.cls){B.cls=(typeof(B.cls)=='undefined')?this.cls:B.cls+' '+this.cls;}if(this.style){B.style=(B.style||'')+' '+this.style;}if(this.name){B.name=this.name;}this.el=ct.createChild(B,A);if(this.tooltip){this.tooltipEl().attr('tooltip',this.tooltip); +}if(this.cls){B.cls=(typeof(B.cls)=='undefined'?this.cls:B.cls)+' '+this.cls;}if(this.style){B.style=(typeof(B.style)=='undefined'?this.style:B.style)+' '+this.style;}if(this.name){B.name=this.name;}this.el=ct.createChild(B,A);if(this.tooltip){this.tooltipEl().attr('tooltip',this.tooltip); }if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}this.initEvents();},getChildContainer:function(){return this.el;},getDocumentBody:function(){return Roo.get(document.body);},tooltipEl:function(){return this.el;},addxtype:function(A,B){var cn=this; cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;B=(typeof(B)=='undefined')?'getChildContainer':B;if(typeof(cn.container_method)=='string'){B=cn.container_method;}var C=(typeof(A['flexy:foreach'])!='undefined');var D=(typeof(A['flexy:if'])!='undefined'); var E=Roo.XComponent.build_from_html;var F=(A.xtype=='Body');var G=(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body');var H=Roo.get(this[B](false));if((C||D||this.can_build_overlaid==false)&&E){return false;}if(!C||!E||F||!G){if(!D||typeof(A.name)=='undefined'||!E||F||!G){return this.addxtypeChild(A,B,F); -- 2.39.2