From: Alan Knowles Date: Wed, 18 Nov 2020 04:46:45 +0000 (+0800) Subject: Roo/bootstrap/Card.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=d620b16b999f856ee4b316bedf1f3746d054e96b Roo/bootstrap/Card.js --- diff --git a/Roo/bootstrap/Card.js b/Roo/bootstrap/Card.js index 726c4f2e33..6c6ecf9b4a 100644 --- a/Roo/bootstrap/Card.js +++ b/Roo/bootstrap/Card.js @@ -259,9 +259,9 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { var obody = body; if (this.collapsable || this.rotateable) { obody = { - tag: 'div', - cls : 'roo-collapsable collapse ' + (this.collapsed || this.rotated ? '' : 'show'), - cn : [ body ] + tag: 'div', + cls : 'roo-collapsable collapse ' + (this.collapsed || this.rotated ? '' : 'show'), + cn : [ body ] }; } @@ -616,6 +616,24 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { }, + + onToggleRotate : function(e) + { + this.el.select('.roo-collapsable').first().removeClass('show'); + this.el.select('.roo-collapsable').first().removeClass('show'); + if (this.rotated) { + + this.el.select('.roo-collapsable').addClass('show'); + this.rotated = false; + return; + } + this.el.select('.roo-collapse-toggle').addClass('collapsed'); + this.el.select('.roo-collapsable').removeClass('show'); + this.rotated = true; + + + }, + dropPlaceHolder: function (action, info, data) { if (this.dropEl === false) {