[IMP] add warning when removing non global favorite
authorGéry Debongnie <ged@odoo.com>
Mon, 27 Oct 2014 09:19:07 +0000 (10:19 +0100)
committerGéry Debongnie <ged@odoo.com>
Wed, 29 Oct 2014 07:38:19 +0000 (08:38 +0100)
addons/web/static/src/js/search.js

index 8c495fe..366cae1 100644 (file)
@@ -1768,8 +1768,9 @@ instance.web.search.FavoriteMenu = instance.web.Widget.extend({
     },
     remove_filter: function (filter, $filter, key) {
         var self = this;
-        var warning = _t("This filter is global and will be removed for everybody if you continue.");
-        if (!(filter.user_id || confirm(warning))) {
+        var global_warning = _t("This filter is global and will be removed for everybody if you continue."),
+            warning = _t("Are you sure that you want to remove this filter?");
+        if (!confirm(filter.user_id ? warning : global_warning)) {
             return;
         }
         this.model.call('unlink', [filter.id]).done(function () {