[IMP] reverse logic for handling view-switching buttons so it's more efficient and straightforward
bzr revid: xmo@openerp.com-20110401091117-v2q0s57qp2xny7cx
This commit is contained in:
@@ -57,9 +57,9 @@ openerp.base.ViewManager = openerp.base.Controller.extend({
|
||||
}
|
||||
|
||||
this.$element
|
||||
.find('.views-switchers button').attr('disabled', true)
|
||||
.filter('[data-view-type!="' + view_type + '"]')
|
||||
.removeAttr('disabled');
|
||||
.find('.views-switchers button').removeAttr('disabled')
|
||||
.filter('[data-view-type="' + view_type + '"]')
|
||||
.attr('disabled', true);
|
||||
|
||||
for (var i in this.views) {
|
||||
if (this.views[i].controller) {
|
||||
|
||||
Reference in New Issue
Block a user