compile card into bootstrap
authorAlan Knowles <alan@roojs.com>
Thu, 17 Sep 2020 05:55:23 +0000 (13:55 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 17 Sep 2020 05:55:23 +0000 (13:55 +0800)
Roo/bootstrap/Card.js
docs/json/roodata.json
docs/tree.json
roojs-bootstrap-debug.js
roojs-bootstrap.js

index d5144a6..6c384b3 100644 (file)
@@ -111,7 +111,7 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component,  {
             }
         });
         
-        ['', 'xs', 'sm', 'lg', 'xl',   ].forEach(function(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
             }
index 8576de9..611fcaa 100644 (file)
       }
     ]
   },
+  "Roo.bootstrap.Card" : {
+    "props" : [
+      {
+        "name" : "actionMode",
+        "type" : "String",
+        "desc" : "which property holds the element that used for  hide() / show() / disable() / enable()\ndefault is 'el' for forms you probably want to set this to fieldEl",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "allowDomMove",
+        "type" : "Boolean",
+        "desc" : "Whether the component can move the Dom node when rendering (defaults to true).",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "can_build_overlaid",
+        "type" : "Boolean",
+        "desc" : "True if element can be rebuild from a HTML page",
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "cls",
+        "type" : "String",
+        "desc" : "css class",
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "container_method",
+        "type" : "string",
+        "desc" : "method to fetch parents container element (used by NavHeaderbar -  getHeaderChildContainer)",
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "dataId",
+        "type" : "string",
+        "desc" : "cutomer id",
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "disableClass",
+        "type" : "String",
+        "desc" : "CSS class added to the component when it is disabled (defaults to \"x-item-disabled\").",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "display",
+        "type" : "String",
+        "desc" : [
+          "(none",
+          "inline",
+          "inline-block",
+          "block",
+          "table",
+          "table-cell",
+          "table-row",
+          "flex",
+          "inline-flex)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "display_lg",
+        "type" : "String",
+        "desc" : [
+          "(none",
+          "inline",
+          "inline-block",
+          "block",
+          "table",
+          "table-cell",
+          "table-row",
+          "flex",
+          "inline-flex)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "display_sm",
+        "type" : "String",
+        "desc" : [
+          "(none",
+          "inline",
+          "inline-block",
+          "block",
+          "table",
+          "table-cell",
+          "table-row",
+          "flex",
+          "inline-flex)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "display_xl",
+        "type" : "String",
+        "desc" : [
+          "(none",
+          "inline",
+          "inline-block",
+          "block",
+          "table",
+          "table-cell",
+          "table-row",
+          "flex",
+          "inline-flex)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "display_xs",
+        "type" : "String",
+        "desc" : [
+          "(none",
+          "inline",
+          "inline-block",
+          "block",
+          "table",
+          "table-cell",
+          "table-row",
+          "flex",
+          "inline-flex)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "footer",
+        "type" : "String",
+        "desc" : "",
+        "memberOf" : ""
+      },
+      {
+        "name" : "header",
+        "type" : "String",
+        "desc" : "",
+        "memberOf" : ""
+      },
+      {
+        "name" : "header_image",
+        "type" : "String",
+        "desc" : "src url of image.",
+        "memberOf" : ""
+      },
+      {
+        "name" : "header_size",
+        "type" : "Number",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "hideMode",
+        "type" : "String",
+        "desc" : [
+          "(display",
+          "visibility)"
+        ],
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "html",
+        "type" : "String",
+        "desc" : "-- html contents - or just use children..",
+        "memberOf" : ""
+      },
+      {
+        "name" : "listeners",
+        "type" : "Object",
+        "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n    listeners :  { \n       'click' : function(e) {\n           ..... \n        } ,\n        .... \n    } \n  </code></pre>",
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "margin",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "auto)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "margin_bottom",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "auto)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "margin_left",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "auto)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "margin_right",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "auto)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "margin_top",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "auto)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "margin_x",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "auto)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "margin_y",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "auto)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "name",
+        "type" : "string",
+        "desc" : "Specifies name attribute",
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "padding",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "padding_bottom",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "padding_left",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "padding_right",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "padding_top",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "padding_x",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "padding_y",
+        "type" : "String",
+        "desc" : [
+          "(0",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "style",
+        "type" : "String",
+        "desc" : "any extra css",
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "subtitle",
+        "type" : "String",
+        "desc" : "",
+        "memberOf" : ""
+      },
+      {
+        "name" : "title",
+        "type" : "String",
+        "desc" : "",
+        "memberOf" : ""
+      },
+      {
+        "name" : "tooltip",
+        "type" : "string",
+        "desc" : "Text for the tooltip",
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "visibilityEl",
+        "type" : "string|object",
+        "desc" : [
+          "(el",
+          "parent)"
+        ],
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "weight",
+        "type" : "String",
+        "desc" : [
+          "(primary",
+          "warning",
+          "info",
+          "danger",
+          "secondary",
+          "success",
+          "light",
+          "dark)"
+        ],
+        "memberOf" : ""
+      },
+      {
+        "name" : "xattr",
+        "type" : "Object",
+        "desc" : "extra attributes to add to 'element' (used by builder to store stuff.)",
+        "memberOf" : "Roo.bootstrap.Component"
+      }
+    ],
+    "events" : [
+      {
+        "name" : "beforedestroy",
+        "type" : "function",
+        "desc" : "Fires before the component is destroyed. Return false to stop the destroy.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "beforehide",
+        "type" : "function",
+        "desc" : "Fires before the component is hidden. Return false to stop the hide.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "beforerender",
+        "type" : "function",
+        "desc" : "Fires before the component is rendered. Return false to stop the render.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "beforeshow",
+        "type" : "function",
+        "desc" : "Fires before the component is shown.  Return false to stop the show.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "childrenrendered",
+        "type" : "function",
+        "desc" : "Fires when the children have been rendered..",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "destroy",
+        "type" : "function",
+        "desc" : "Fires after the component is destroyed.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "disable",
+        "type" : "function",
+        "desc" : "Fires after the component is disabled.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "enable",
+        "type" : "function",
+        "desc" : "Fires after the component is enabled.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "hide",
+        "type" : "function",
+        "desc" : "Fires after the component is hidden.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "render",
+        "type" : "function",
+        "desc" : "Fires after the component is rendered.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "show",
+        "type" : "function",
+        "desc" : "Fires after the component is shown.",
+        "sig" : "function (_self)\n{\n\n}",
+        "memberOf" : "Roo.Component"
+      }
+    ],
+    "methods" : [
+      {
+        "name" : "addEvents",
+        "type" : "function",
+        "desc" : "Used to define events on this Observable",
+        "sig" : "(object)",
+        "static" : false,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "addListener",
+        "type" : "function",
+        "desc" : "Appends an event handler to this component",
+        "sig" : "(eventName, handler, scope, options)",
+        "static" : false,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "capture",
+        "type" : "function",
+        "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
+        "sig" : "(o, fn, scope)",
+        "static" : true,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "destroy",
+        "type" : "function",
+        "desc" : "Destroys this component by purging any event listeners, removing the component's element from the DOM,\nremoving the component from its {@link Roo.Container} (if applicable) and unregistering it from {@link Roo.ComponentMgr}.",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "disable",
+        "type" : "function",
+        "desc" : "Disable this component.",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "enable",
+        "type" : "function",
+        "desc" : "Enable this component.",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "fireEvent",
+        "type" : "function",
+        "desc" : "Fires the specified event with the passed parameters (minus the event name).",
+        "sig" : "(eventName, args)",
+        "static" : false,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "focus",
+        "type" : "function",
+        "desc" : "Try to focus this component.",
+        "sig" : "(selectText)",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "getChildContainer",
+        "type" : "function",
+        "desc" : "Fetch the element to add children to",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "getEl",
+        "type" : "function",
+        "desc" : "Returns the underlying {@link Roo.Element}.",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "getId",
+        "type" : "function",
+        "desc" : "Returns the id of this component.",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "getVisibilityEl",
+        "type" : "function",
+        "desc" : "Get the element that will be used to show or hide",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "hasListener",
+        "type" : "function",
+        "desc" : "Checks to see if this object has any listeners for a specified event",
+        "sig" : "(eventName)",
+        "static" : false,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "hide",
+        "type" : "function",
+        "desc" : "Hide a component - adds 'hidden' class",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "initEvents",
+        "type" : "function",
+        "desc" : "Initialize Events for the element",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "isVisible",
+        "type" : "function",
+        "desc" : "Returns true if this component is visible.",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "on",
+        "type" : "function",
+        "desc" : "Appends an event handler to this element (shorthand for addListener)",
+        "sig" : "(eventName, handler, scope, options)",
+        "static" : false,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "purgeListeners",
+        "type" : "function",
+        "desc" : "Removes all listeners for this object",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "releaseCapture",
+        "type" : "function",
+        "desc" : "Removes <b>all</b> added captures from the Observable.",
+        "sig" : "(o)",
+        "static" : true,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "removeListener",
+        "type" : "function",
+        "desc" : "Removes a listener",
+        "sig" : "(eventName, handler, scope)",
+        "static" : false,
+        "memberOf" : "Roo.util.Observable"
+      },
+      {
+        "name" : "render",
+        "type" : "function",
+        "desc" : "If this is a lazy rendering component, render it to its container element.",
+        "sig" : "(container)",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "setDisabled",
+        "type" : "function",
+        "desc" : "Convenience function for setting disabled/enabled by boolean.",
+        "sig" : "(disabled)",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "setVisibilityEl",
+        "type" : "function",
+        "desc" : "Set the element that will be used to show or hide",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "setVisible",
+        "type" : "function",
+        "desc" : "Convenience function to hide or show this component by boolean.",
+        "sig" : "(visible)",
+        "static" : false,
+        "memberOf" : "Roo.Component"
+      },
+      {
+        "name" : "show",
+        "type" : "function",
+        "desc" : "Show a component - removes 'hidden' class",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "tooltipEl",
+        "type" : "function",
+        "desc" : "Fetch the element to display the tooltip on.",
+        "sig" : "()\n{\n\n}",
+        "static" : false,
+        "memberOf" : "Roo.bootstrap.Component"
+      },
+      {
+        "name" : "un",
+        "type" : "function",
+        "desc" : "Removes a listener (shorthand for removeListener)",
+        "sig" : "(eventName, handler, scope)",
+        "static" : false,
+        "memberOf" : "Roo.util.Observable"
+      }
+    ]
+  },
   "Roo.bootstrap.CheckBox" : {
     "props" : [
       {
index 42390be..1d48aa7 100644 (file)
             ],
             "is_class" : true
           },
+          {
+            "name" : "Roo.bootstrap.Card",
+            "cn" : [
+            ],
+            "is_class" : true
+          },
           {
             "name" : "Roo.bootstrap.CheckBox",
             "cn" : [
index a42d647..deff70d 100644 (file)
@@ -1488,6 +1488,240 @@ Roo.extend(Roo.bootstrap.Container, Roo.bootstrap.Component,  {
 });
 
  /*
+ *  - LGPL
+ *
+ *  This is BS4's Card element.. - similar to our containers probably..
+ * 
+ */
+/**
+ * @class Roo.bootstrap.Card
+ * @extends Roo.bootstrap.Component
+ * Bootstrap Card class
+ *
+ *
+ * possible... may not be implemented..
+ * @cfg {String} header_image  src url of image.
+ * @cfg {String} header
+ * @cfg {Number} header_size (0|1|2|3|4|5) H1 or H2 etc.. 0 indicates default
+ * 
+ * @cfg {String} title
+ * @cfg {String} subtitle
+ * @cfg {String} html -- html contents - or just use children..
+ * @cfg {String} footer
+ * @cfg {String} weight (primary|warning|info|danger|secondary|success|light|dark)
+ * 
+ * @cfg {String} margin (0|1|2|3|4|5|auto)
+ * @cfg {String} margin_top (0|1|2|3|4|5|auto)
+ * @cfg {String} margin_bottom (0|1|2|3|4|5|auto)
+ * @cfg {String} margin_left (0|1|2|3|4|5|auto)
+ * @cfg {String} margin_right (0|1|2|3|4|5|auto)
+ * @cfg {String} margin_x (0|1|2|3|4|5|auto)
+ * @cfg {String} margin_y (0|1|2|3|4|5|auto)
+ *
+ * @cfg {String} padding (0|1|2|3|4|5)
+ * @cfg {String} padding_top (0|1|2|3|4|5)
+ * @cfg {String} padding_bottom (0|1|2|3|4|5)
+ * @cfg {String} padding_left (0|1|2|3|4|5)
+ * @cfg {String} padding_right (0|1|2|3|4|5)
+ * @cfg {String} padding_x (0|1|2|3|4|5)
+ * @cfg {String} padding_y (0|1|2|3|4|5)
+ *
+ * @cfg {String} display (none|inline|inline-block|block|table|table-cell|table-row|flex|inline-flex)
+ * @cfg {String} display_xs (none|inline|inline-block|block|table|table-cell|table-row|flex|inline-flex)
+ * @cfg {String} display_sm (none|inline|inline-block|block|table|table-cell|table-row|flex|inline-flex)
+ * @cfg {String} display_lg (none|inline|inline-block|block|table|table-cell|table-row|flex|inline-flex)
+ * @cfg {String} display_xl (none|inline|inline-block|block|table|table-cell|table-row|flex|inline-flex)
+ * @constructor
+ * Create a new Container
+ * @param {Object} config The config object
+ */
+
+Roo.bootstrap.Card = function(config){
+    Roo.bootstrap.Card.superclass.constructor.call(this, config);
+    
+    this.addEvents({
+        
+    });
+};
+
+
+Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component,  {
+    
+    
+    weight : '',
+    
+    margin: '', /// may be better in component?
+    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 : '',
+    
+    
+    childContainer : false,
+
+    layoutCls : function()
+    {
+        var cls = '';
+        var t = this;
+        
+        ['', '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) {
+                cls += ' m' +  (v.length ? v[0]  : '') + '-' +  t['margin' + (v.length ? '_' : '') + v];
+            }
+            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
+            }
+        });
+        
+        // more generic support?
+        if (this.hidden) {
+            cls += ' d-none';
+        }
+        
+        return cls;
+    },
+       // Roo.log("Call onRender: " + this.xtype);
+        /*  We are looking at something like this.
+<div class="card">
+    <img src="..." class="card-img-top" alt="...">
+    <div class="card-body">
+        <h5 class="card-title">Card title</h5>
+         <h6 class="card-subtitle mb-2 text-muted">Card subtitle</h6>
+
+        >> this bit is really the body...
+        <div> << we will ad dthis in hopefully it will not break shit.
+        
+        ** card text does not actually have any styling...
+        
+            <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
+        
+        </div> <<
+          <a href="#" class="card-link">Card link</a>
+          
+    </div>
+    <div class="card-footer">
+        <small class="text-muted">Last updated 3 mins ago</small>
+    </div>
+</div>
+         */
+    getAutoCreate : function(){
+        
+        var cfg = {
+            tag : 'div',
+            cls : 'card',
+            cn : [ ]
+        };
+        
+        if (this.weight.length && this.weight != 'light') {
+            cfg.cls += ' text-white'
+        }
+        if (this.weight.length) {
+            cfg.cls += ' bg-' + this.weight;
+        }
+        
+        cfg.cls += this.layoutCls(); 
+        
+        if (this.header.length) {
+            cfg.cn.push({
+                tag : this.header_size > 0 ? 'h' + this.header_size : 'div',
+                cls : 'card-header',
+                html : this.header // escape?
+            });
+        }
+        if (this.header_image.length) {
+            cfg.cn.push({
+                tag : 'img',
+                cls : 'card-img-top',
+                src: this.header_image // escape?
+            });
+        }
+        
+        var body = {
+            tag : 'div',
+            cls : 'card-body',
+            cn : []
+        };
+        cfg.push(body);
+        
+        if (this.title.length) {
+            body.cn.push({
+                tag : 'div',
+                cls : 'card-title',
+                src: this.title // escape?
+            });
+        }
+        
+        if (this.subtitle.length) {
+            body.cn.push({
+                tag : 'div',
+                cls : 'card-title',
+                src: this.subtitle // escape?
+            });
+        }
+        
+        body.cn.push({
+            tag : 'div',
+            cls : 'roo-card-body-ctr'
+        });
+        
+        // fixme ? handle objects?
+        if (this.footer.length) {
+            body.cn.push({
+                tag : 'div',
+                cls : 'card-footer',
+                html: this.footer // escape?
+            });
+        }
+        // footer...
+        
+        return cfg;
+    },
+    
+    
+    getChildContainer : function()
+    {
+        
+        if(!this.el){
+            return false;
+        }
+        return this.el.select('.roo-card-body-ctr',true).first();    
+    }
+    
+}/*
  * - LGPL
  *
  * image
index 80349e1..aa5b353 100644 (file)
@@ -59,6 +59,14 @@ return;}this.expand();},expand:function(){if(this.fireEvent('expand',this)){this
 return this.el.select('.panel-body',true).first()},titleEl:function(){if(!this.el||!this.panel.length||!this.header.length){return;}return this.el.select('.panel-title',true).first();},setTitle:function(v){var A=this.titleEl();if(!A){return;}A.dom.innerHTML=v;
 },getTitle:function(){var A=this.titleEl();if(!A){return '';}return A.dom.innerHTML;},setRightTitle:function(v){var t=this.el.select('.panel-header-right',true).first();if(!t){return;}t.dom.innerHTML=v;},onClick:function(e){e.preventDefault();this.fireEvent('click',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:'',childContainer:false,layoutCls:function(){var cls='';
+var t=this;['','top','bottom','left','right','x','y'].forEach(function(v){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){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(this.hidden){cls+=' d-none';}return cls;},getAutoCreate:function(){var cfg={tag:'div',cls:'card',cn:[]}
+;if(this.weight.length&&this.weight!='light'){cfg.cls+=' text-white'}if(this.weight.length){cfg.cls+=' bg-'+this.weight;}cfg.cls+=this.layoutCls();if(this.header.length){cfg.cn.push({tag:this.header_size>0?'h'+this.header_size:'div',cls:'card-header',html:this.header}
+);}if(this.header_image.length){cfg.cn.push({tag:'img',cls:'card-img-top',src:this.header_image});}var body={tag:'div',cls:'card-body',cn:[]};cfg.push(body);if(this.title.length){body.cn.push({tag:'div',cls:'card-title',src:this.title});}if(this.subtitle.length){body.cn.push({tag:'div',cls:'card-title',src:this.subtitle}
+);}body.cn.push({tag:'div',cls:'roo-card-body-ctr'});if(this.footer.length){body.cn.push({tag:'div',cls:'card-footer',html:this.footer});}return cfg;},getChildContainer:function(){if(!this.el){return false;}return this.el.select('.roo-card-body-ctr',true).first();
+}}
 // Roo/bootstrap/Img.js
 Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'about:blank',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',getAutoCreate:function(){if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){return this.createSingleImg();
 }var A={tag:'div',cls:'roo-image-responsive-group',cn:[]};var B=this;Roo.each(['xs','sm','md','lg'],function(C){if(!B[C+'Url']){return;}var D={tag:'img',cls:(B.imgResponsive)?'img-responsive':'',html:B.html||A.html,src:B[C+'Url']};D.cls+=' roo-image-responsive-'+C;