[ADD] Add confirmation on dashboard item deletion

bzr revid: fme@openerp.com-20111123225654-5x6igeau2xp3rbc2
This commit is contained in:
Fabien Meghazi 2011-11-23 23:56:54 +01:00
parent ce31ddc49f
commit 244a54fcbc
1 changed files with 4 additions and 2 deletions

View File

@ -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;