X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=83849e1738cb745819000ac490694638951590a2;hb=439762a8583833878c36bb78e0f054181452c555;hp=ce4ffe5ce9254ffafa205044465195b1a6024f42;hpb=0847f28aec5000a0075ec715ae5dd2a575a744c0;p=roojs1 diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index ce4ffe5ce9..83849e1738 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -1778,7 +1778,12 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { cls : 'card-img-top', src: this.header_image // escape? }); - } + } else { + cfg.cn.push({ + tag : 'div', + cls : 'card-img-top d-none' + }); + } var body = { tag : 'div', @@ -1838,6 +1843,16 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { return ret; }, + getCardImageTop : function() + { + var ret = this.el.select('.card-img-top',true).first(); + if (ret.hasClass('d-none')) { + ret.removeClass('d-none'); + } + + return ret; + }, + getChildContainer : function() { @@ -1894,9 +1909,9 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { /** * @class Roo.bootstrap.CardHeader * @extends Roo.bootstrap.Element - * Bootstrap Element class + * Bootstrap CardHeader class * @constructor - * Create a new Element + * Create a new Card Header - that you can embed children into * @param {Object} config The config object */ @@ -1906,20 +1921,45 @@ Roo.bootstrap.CardHeader = function(config){ Roo.extend(Roo.bootstrap.CardHeader, Roo.bootstrap.Element, { - tag: 'div', - container_method : 'getCardHeader', - getAutoCreate : function() { - - var cfg = { - tag: 'div' - }; - - return cfg; - } + container_method : 'getCardHeader' + + +}); + + + + /* + * - LGPL + * + * Card header - holder for the card header elements. + * + */ + +/** + * @class Roo.bootstrap.CardImageTop + * @extends Roo.bootstrap.Element + * Bootstrap CardImageTop class + * @constructor + * Create a new Card Image Top container + * @param {Object} config The config object + */ + +Roo.bootstrap.CardImageTop = function(config){ + Roo.bootstrap.CardImageTop.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.bootstrap.CardImageTop, Roo.bootstrap.Element, { + + + container_method : 'getCardImageTop' + + + + });