MINOR Don't toggle CMS panels if state is already correct (to avoid the CMS UI doing three expensive redraw() invocation in its event listeners where one is sufficient)

This commit is contained in:
Ingo Schommer 2011-12-15 17:22:59 +01:00
parent 7253746bdc
commit d732a78852

View File

@ -126,11 +126,15 @@
this.trigger('toggle');
},
expandPanel: function() {
expandPanel: function(force) {
if(!force && !this.hasClass('collapsed')) return;
this.togglePanel(true);
},
collapsePanel: function() {
collapsePanel: function(force) {
if(!force && this.hasClass('collapsed')) return;
this.togglePanel(false);
}
});