From 26d62c4e55961799733e466d628c3f75a3afb92d Mon Sep 17 00:00:00 2001 From: "chm@openerp.com" <> Date: Mon, 7 Apr 2014 09:32:47 +0200 Subject: [IMP] website: media editor: add feedback when the user try to remove a picture bzr revid: chm@openerp.com-20140407073247-davv0udxz5n5qx35 --- addons/website/static/src/js/website.editor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'addons/website/static/src/js/website.editor.js') diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 5ef53590345..bd17584c08b 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -1590,8 +1590,12 @@ try_remove: function (e) { var $help_block = this.$('.help-block').empty(); var self = this; - var id = parseInt($(e.target).data('id'), 10); + var $a = $(e.target); + var id = parseInt($a.data('id'), 10); var attachment = _.findWhere(this.records, {id: id}); + var $both = $a.parent().children(); + + $both.css({borderWidth: "5px", borderColor: "#f00"}); return openerp.jsonRpc('/web/dataset/call_kw', 'call', { model: 'ir.attachment', @@ -1607,6 +1611,7 @@ self.display_attachments(); return; } + $both.css({borderWidth: "", borderColor: ""}); $help_block.replaceWith(openerp.qweb.render( 'website.editor.dialog.image.existing.error', { views: prevented[id] -- cgit v1.2.3