[IMP] use .toggle(condition) instead of if(condition) .show() else .hide()
bzr revid: xmo@openerp.com-20110325072607-gbz2z3rsnv140fgu
This commit is contained in:
parent
6c5665b7ed
commit
98037d1fe5
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue