[IMP] execute original action after login. also pass the current state to login (so the Widget can handle it)

bzr revid: chs@openerp.com-20120814094654-fmimm145mrgvznb0
This commit is contained in:
Christophe Simonis 2012-08-14 11:46:54 +02:00
parent 54cce9916e
commit a1d68fb739
1 changed files with 16 additions and 2 deletions

View File

@ -1019,8 +1019,22 @@ instance.web.WebClient = instance.web.Client.extend({
},
show_login: function() {
this.$('.oe_topbar').hide();
this.action_manager.do_action("login");
this.action_manager.inner_widget.on('login_successful', this, this.show_application);
var action = {
'type': 'ir.actions.client',
'tag': 'login',
};
var state = $.bbq.getState(true);
if (state.action === "login") {
action.params = state;
}
this.action_manager.do_action(action);
this.action_manager.inner_widget.on('login_successful', this, function() {
this.do_push_state(state);
this._current_state = null; // ensure the state will be loaded
this.show_application(); // will load the state we just pushed
});
},
show_application: function() {
var self = this;