Roo/bootstrap/Card.js
authorAlan Knowles <alan@roojs.com>
Tue, 3 Nov 2020 08:25:01 +0000 (16:25 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 3 Nov 2020 08:25:01 +0000 (16:25 +0800)
Roo/bootstrap/Card.js

index 3f7780c..95b3366 100644 (file)
@@ -181,7 +181,12 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component,  {
                 cls : 'card-header',
                 html : this.header // escape?
             });
-        }
+        } else {
+           cfg.cn.push({
+                tag : 'div',
+                cls : 'card-header d-none'
+            });
+       }
         if (this.header_image.length) {
             cfg.cn.push({
                 tag : 'img',
@@ -238,6 +243,16 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component,  {
     },
     
     
+    getCardHeader : function()
+    {
+        var  ret = this.el.select('.card-header',true).first();
+       if (ret.hasClass('d-none')) {
+           ret.removeClass('d-none');
+       }
+        
+        return ret;
+    },
+    
     getChildContainer : function()
     {