diff options
| author | chm@openerp.com <> | 2014-04-07 09:32:47 +0200 |
|---|---|---|
| committer | chm@openerp.com <> | 2014-04-07 09:32:47 +0200 |
| commit | 26d62c4e55961799733e466d628c3f75a3afb92d (patch) | |
| tree | 6eec170f364c3f572464212c0def045d4f07f8c6 /addons/website/static/src/js/website.editor.js | |
| parent | 583a47b7b9bf51acb36bea3600f3745668e0dd57 (diff) | |
[IMP] website: media editor: add feedback when the user try to remove a picture
bzr revid: chm@openerp.com-20140407073247-davv0udxz5n5qx35
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.editor.js | 7 |
1 files changed, 6 insertions, 1 deletions
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] |
