[IMP] use .toggle(condition) instead of if(condition) .show() else .hide()

bzr revid: xmo@openerp.com-20110325072607-gbz2z3rsnv140fgu
This commit is contained in:
Xavier Morel 2011-03-25 08:26:07 +01:00
parent 6c5665b7ed
commit 98037d1fe5
1 changed files with 2 additions and 6 deletions

View File

@ -41,12 +41,8 @@ openerp.base.ViewManager = openerp.base.Controller.extend({
start: function() {
},
on_mode_switch: function(view_type) {
for (var i in this.views) {
if(i == view_type) {
this.views[i].controller.$element.show();
} else {
this.views[i].controller.$element.hide();
}
for (var i in this.views) {
this.views[i].controller.$element.toggle(i === view_type);
}
},
do_action_window: function(action) {