From 244a54fcbc50db1d29849fd732aaa79df7eecfbd Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 23 Nov 2011 23:56:54 +0100 Subject: [PATCH] [ADD] Add confirmation on dashboard item deletion bzr revid: fme@openerp.com-20111123225654-5x6igeau2xp3rbc2 --- addons/web_dashboard/static/src/js/dashboard.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js index 82fb7e3abe9..57aded37854 100644 --- a/addons/web_dashboard/static/src/js/dashboard.js +++ b/addons/web_dashboard/static/src/js/dashboard.js @@ -111,8 +111,10 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({ this.do_save_dashboard(); }, on_close_action: function(e) { - $(e.currentTarget).parents('.oe-dashboard-action:first').remove(); - this.do_save_dashboard(); + if (confirm("Are you sure you want to remove this item ?")) { + $(e.currentTarget).parents('.oe-dashboard-action:first').remove(); + this.do_save_dashboard(); + } }, do_save_dashboard: function() { var self = this;