* @cfg {String} header_image src url of image.
* @cfg {String|Object} header
* @cfg {Number} header_size (0|1|2|3|4|5) H1 or H2 etc.. 0 indicates default
+ * @cfg {Number} header_weight (primary|secondary|success|info|warning|danger|light|dark)
*
* @cfg {String} title
* @cfg {String} subtitle
* @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_top (0|1|2|3|4|5)next_to_card
* @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)
drop_group : false,
childContainer : false,
dropEl : false, /// the dom placeholde element that indicates drop location.
+ containerEl: false, // body container
+ bodyEl: false, // card-body
+ headerContainerEl : false, //
+ headerEl : false,
layoutCls : function()
{
initEvents: function()
{
-
+ this.bodyEl = this.el.select('.card-body',true).first();
this.containerEl = this.getChildContainer();
if(this.dragable){
this.dragZone = new Roo.dd.DragZone(this.getEl(), {
this.footerEl = this.el.select('.card-footer').first();
this.collapsableToggleEl = this.el.select('.roo-collapse-toggle');
- this.headerEl = this.el.select('.roo-card-header-ctr').first();
+ this.headerContainerEl = this.el.select('.roo-card-header-ctr').first();
+ this.headerEl = this.el.select('.card-header',true).first();
if (this.rotated) {
this.el.addClass('roo-card-rotated');
* accept card
*
* - card.acceptCard(move_card, info.position, info.card, info.items_n);
-
*/
acceptCard : function(move_card, position, next_to_card )
{
var dom = move_card.el.dom;
dom.parentNode.removeChild(dom);
+ dom.style.width = ''; // clear with - which is set by drag.
-
- if (next_to_card !== false) {
+ if (next_to_card !== false && next_to_card !== true && next_to_card.el.dom.parentNode) {
var cardel = next_to_card.el.dom;
- if (position == 'above') {
+ if (position == 'above' ) {
cardel.parentNode.insertBefore(dom, cardel);
} else if (cardel.nextSibling) {
cardel.parentNode.insertBefore(dom,cardel.nextSibling);
},
setHeaderText: function(html)
{
- this.headerEl.dom.innerHTML = html;
+ this.headerContainerEl.dom.innerHTML = html;
}