summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-06-30 14:37:14 +0200
committerAaron Bohy <aab@odoo.com>2015-07-01 11:36:32 +0200
commitb601ec66caa5bebdd97fc196af294c488dd78100 (patch)
treefcefe67d97a2455e7c90ec6db39979d1494ad445 /addons/web/static/src/js/widgets
parent3a511aaa700bc9965cd6967b2b8fb1b21ccdce8d (diff)
[IMP] web,mail: use of Modals to confirm changes discard
instead of the browser confirm dialogs, for the sake of uniformity.
Diffstat (limited to 'addons/web/static/src/js/widgets')
-rw-r--r--addons/web/static/src/js/widgets/user_menu.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/js/widgets/user_menu.js b/addons/web/static/src/js/widgets/user_menu.js
index 3d360c1eae6..ef2927d668f 100644
--- a/addons/web/static/src/js/widgets/user_menu.js
+++ b/addons/web/static/src/js/widgets/user_menu.js
@@ -63,15 +63,15 @@ var SystrayMenu = Widget.extend({
},
on_menu_settings: function() {
var self = this;
- if (!this.getParent().has_uncommitted_changes()) {
+ this.getParent().clear_uncommitted_changes().then(function() {
self.rpc("/web/action/load", { action_id: "base.action_res_users_my" }).done(function(result) {
result.res_id = session.uid;
self.getParent().action_manager.do_action(result);
});
- }
+ });
},
on_menu_account: function() {
- if (!this.getParent().has_uncommitted_changes()) {
+ this.getParent().clear_uncommitted_changes().then(function() {
var P = new Model('ir.config_parameter');
P.call('get_param', ['database.uuid']).then(function(dbuuid) {
var state = {
@@ -89,7 +89,7 @@ var SystrayMenu = Widget.extend({
ev.preventDefault();
framework.redirect('https://accounts.odoo.com/account');
});
- }
+ });
},
on_menu_about: function() {
var self = this;