[ADD] Added dirty form notification on on_logout

bzr revid: fme@openerp.com-20120905152030-qfrkrwg4k1srxtix
This commit is contained in:
Fabien Meghazi
2012-09-05 17:20:30 +02:00
parent 404acf222c
commit 2cf1f7a7a6
+9 -5
View File
@@ -1049,11 +1049,15 @@ instance.web.WebClient = instance.web.Client.extend({
},
on_logout: function() {
var self = this;
this.session.session_logout().then(function () {
$(window).unbind('hashchange', self.on_hashchange);
self.do_push_state({});
window.location.reload();
});
var $e = $.Event("about_to_destroy");
this.action_manager.inner_widget.trigger("about_to_destroy", $e);
if (!$e.isDefaultPrevented()) {
this.session.session_logout().then(function () {
$(window).unbind('hashchange', self.on_hashchange);
self.do_push_state({});
window.location.reload();
});
}
},
bind_hashchange: function() {
var self = this;