summaryrefslogtreecommitdiff
path: root/tools/template/views/panel.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/template/views/panel.js')
-rw-r--r--tools/template/views/panel.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/template/views/panel.js b/tools/template/views/panel.js
index ddbc118de73..05edd7a3326 100644
--- a/tools/template/views/panel.js
+++ b/tools/template/views/panel.js
@@ -70,8 +70,11 @@ var PanelView = module.exports = AmpersandView.extend({
this.parent.parent.statChanged(stat);
},
collapsibleToggle: function (event) {
- $(this.query('.collapse')).collapse('toggle');
- this.model.toggle('open');
+ if (this.model.open) {
+ this.collapsibleClose(event);
+ } else {
+ this.collapsibleOpen(event);
+ }
},
collapsibleClose: function (event) {
$(this.query('.collapse')).collapse('hide');