From d3f85520a079f625f985b594e5658f77d5302df3 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 17 Sep 2020 14:17:37 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js Roo/bootstrap/Card.js --- Roo/bootstrap/Card.js | 2 +- roojs-bootstrap-debug.js | 8 ++++---- roojs-bootstrap.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Roo/bootstrap/Card.js b/Roo/bootstrap/Card.js index 6364b499c7..be0859690c 100644 --- a/Roo/bootstrap/Card.js +++ b/Roo/bootstrap/Card.js @@ -113,7 +113,7 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { ['', 'xs', 'sm', 'lg', 'xl'].forEach(function(v) { if (('' + t['display' + (v.length ? '_' : '') + v]).length) { - cls += ' d' + (v.length ? '-' : '') + v + '-' + t['margin' + (v.length ? '_' : '') + v].length + cls += ' d' + (v.length ? '-' : '') + v + '-' + t['margin' + (v.length ? '_' : '') + v] } }); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index e189f19171..f670fba5b4 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -1592,17 +1592,17 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { ['', 'top', 'bottom', 'left', 'right', 'x', 'y' ].forEach(function(v) { // in theory these can do margin_top : ml-xs-3 ??? but we don't support that yet - if (t['margin' + (v.length ? '_' : '') + v].length) { + if (('' + t['margin' + (v.length ? '_' : '') + v]).length) { cls += ' m' + (v.length ? v[0] : '') + '-' + t['margin' + (v.length ? '_' : '') + v]; } - if (t['padding' + (v.length ? '_' : '') + v].length) { + if (('' + t['padding' + (v.length ? '_' : '') + v]).length) { cls += ' p' + (v.length ? v[0] : '') + '-' + t['padding' + (v.length ? '_' : '') + v]; } }); ['', 'xs', 'sm', 'lg', 'xl'].forEach(function(v) { - if (t['display' + (v.length ? '_' : '') + v].length) { - cls += ' d' + (v.length ? '-' : '') + v + '-' + t['margin' + (v.length ? '_' : '') + v].length + if (('' + t['display' + (v.length ? '_' : '') + v]).length) { + cls += ' d' + (v.length ? '-' : '') + v + '-' + t['margin' + (v.length ? '_' : '') + v] } }); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 580622ceed..1ae2c4a909 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -61,8 +61,8 @@ return this.el.select('.panel-body',true).first()},titleEl:function(){if(!this.e }}); // Roo/bootstrap/Card.js Roo.bootstrap.Card=function(A){Roo.bootstrap.Card.superclass.constructor.call(this,A);this.addEvents({});};Roo.extend(Roo.bootstrap.Card,Roo.bootstrap.Component,{weight:'',margin:'',margin_top:'',margin_bottom:'',margin_left:'',margin_right:'',margin_x:'',margin_y:'',padding:'',padding_top:'',padding_bottom:'',padding_left:'',padding_right:'',padding_x:'',padding_y:'',display:'',display_xs:'',display_sm:'',display_lg:'',display_xl:'',header_image:'',header:'',header_size:0,title:'',subtitle:'',html:'',footer:'',childContainer:false,layoutCls:function(){var A=''; -var t=this;Roo.log(this.margin_bottom.length);['','top','bottom','left','right','x','y'].forEach(function(v){if(t['margin'+(v.length?'_':'')+v].length){A+=' m'+(v.length?v[0]:'')+'-'+t['margin'+(v.length?'_':'')+v];}if(t['padding'+(v.length?'_':'')+v].length){A+=' p'+(v.length?v[0]:'')+'-'+t['padding'+(v.length?'_':'')+v]; -}});['','xs','sm','lg','xl'].forEach(function(v){if(t['display'+(v.length?'_':'')+v].length){A+=' d'+(v.length?'-':'')+v+'-'+t['margin'+(v.length?'_':'')+v].length}});if(this.hidden){A+=' d-none';}return A;},getAutoCreate:function(){var A={tag:'div',cls:'card',cn:[]} +var t=this;Roo.log(this.margin_bottom.length);['','top','bottom','left','right','x','y'].forEach(function(v){if((''+t['margin'+(v.length?'_':'')+v]).length){A+=' m'+(v.length?v[0]:'')+'-'+t['margin'+(v.length?'_':'')+v];}if((''+t['padding'+(v.length?'_':'')+v]).length){A+=' p'+(v.length?v[0]:'')+'-'+t['padding'+(v.length?'_':'')+v]; +}});['','xs','sm','lg','xl'].forEach(function(v){if((''+t['display'+(v.length?'_':'')+v]).length){A+=' d'+(v.length?'-':'')+v+'-'+t['margin'+(v.length?'_':'')+v]}});if(this.hidden){A+=' d-none';}return A;},getAutoCreate:function(){var A={tag:'div',cls:'card',cn:[]} ;if(this.weight.length&&this.weight!='light'){A.cls+=' text-white'}if(this.weight.length){A.cls+=' bg-'+this.weight;}A.cls+=this.layoutCls();if(this.header.length){A.cn.push({tag:this.header_size>0?'h'+this.header_size:'div',cls:'card-header',html:this.header} );}if(this.header_image.length){A.cn.push({tag:'img',cls:'card-img-top',src:this.header_image});}var B={tag:'div',cls:'card-body',cn:[]};A.cn.push(B);if(this.title.length){B.cn.push({tag:'div',cls:'card-title',src:this.title});}if(this.subtitle.length){B.cn.push({tag:'div',cls:'card-title',src:this.subtitle} );}B.cn.push({tag:'div',cls:'roo-card-body-ctr'});if(this.html.length){B.cn.push({tag:'div',html:this.html});}if(this.footer.length){B.cn.push({tag:'div',cls:'card-footer',html:this.footer});}return A;},getChildContainer:function(){if(!this.el){return false; -- 2.39.2