diff options
| author | Xavier Morel <xmo@openerp.com> | 2013-01-23 11:53:20 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2013-01-23 11:53:20 +0100 |
| commit | 8192977f3cbe463bd151fd09ca1aa92b4397cabd (patch) | |
| tree | ddd626e48a154807b8c38ecc05bc5bd6660d5149 /addons/web/static/src/js/search.js | |
| parent | ca038643b9ffd48e2d14206ad8b815b9e9f9da05 (diff) | |
[IMP] add confirmation message when removing a global custom filter
lp bug: https://launchpad.net/bugs/1103410 fixed
bzr revid: xmo@openerp.com-20130123105320-pbmeqoudpb48s87m
Diffstat (limited to 'addons/web/static/src/js/search.js')
| -rw-r--r-- | addons/web/static/src/js/search.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 051059d4ef6..f67c99cbf8b 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1608,6 +1608,7 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({ append_filter: function (filter) { var self = this; var key = this.key_for(filter); + var warning = _t("This filter is global and will be removed for everybody if you continue."); var $filter; if (key in this.$filters) { @@ -1625,6 +1626,9 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({ $('<a class="oe_searchview_custom_delete">x</a>') .click(function (e) { e.stopPropagation(); + if (!(filter.user_id || confirm(warning))) { + return; + } self.model.call('unlink', [id]).done(function () { $filter.remove(); delete self.$filters[key]; |
