[IMP]improved code.

bzr revid: vme@tinyerp.com-20111209055146-sbj4z1fb203yknop
This commit is contained in:
Vidhin Mehta (OpenERP)
2011-12-09 11:21:46 +05:30
parent b93b2f4025
commit a84247b3f2
+2 -4
View File
@@ -475,17 +475,15 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
},
on_mode_switch: function (view_type, no_store) {
var self = this;
if (!(view_type in this.views))
return $.Deferred().reject();
var switched = $.when(this._super(view_type, no_store)).then(function () {
self.$element.find('.oe-view-manager-logs:first')
.addClass('oe-folded').removeClass('oe-has-more')
.find('ul').empty();
self.shortcut_check(self.views[view_type])
});
return $.when(
switched,
this.shortcut_check(this.views[view_type])
switched
).then(function() {
var controller = self.views[self.active_view].controller,
fvg = controller.fields_view,