From d620b16b999f856ee4b316bedf1f3746d054e96b Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 18 Nov 2020 12:46:45 +0800 Subject: [PATCH] Roo/bootstrap/Card.js --- Roo/bootstrap/Card.js | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) 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) { -- 2.39.2