diff options
| author | Christophe Matthieu <chm@odoo.com> | 2014-08-22 17:10:36 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2014-08-25 11:48:36 +0200 |
| commit | d8ecb5781e7874e44decf10cafa73b53d05c6ebc (patch) | |
| tree | b457280a19b8499e435ab926429f6feb7df6f66f /addons/website/static/src | |
| parent | 3cc13520387b8b0f571889dd00caaa86ef939351 (diff) | |
[IMP] website.snippet: convert media snippet into the new snippet api
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/website.snippets.editor.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index c4ca26f2f74..fc06f4e6aaa 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -1479,13 +1479,11 @@ self.BuildingBlock.make_active($(item)); } }); - - this.$el.find(".edition").click(function (event) { - event.preventDefault(); - event.stopPropagation(); - self.element = new CKEDITOR.dom.element(self.$target[0]); - new website.editor.MediaDialog(self, self.element).appendTo(document.body); - }); + }, + edition: function (type, value) { + if(type !== "click") return; + this.element = new CKEDITOR.dom.element(this.$target[0]); + new website.editor.MediaDialog(this, this.element).appendTo(document.body); }, on_focus : function () { var self = this; |
