From f77e44f2ddddabd71e443278ca00193215bf9954 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Mon, 30 Nov 2015 08:27:32 +0100 Subject: [FIX] website_mass_mailing: edit snippet newsletter The "edit" action is on the "website.TopBar", which will create a new instance of the "editor" (web_editor.editor) widget. So if we want to do something when the "editing" start, we have to either override "edit" of the TopBar, or override "start" or "init" of the editor. opw-657662 --- .../website_mass_mailing/static/src/js/website_mass_mailing.editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/website_mass_mailing/static') diff --git a/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js b/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js index e5ff84677c7..10f5771139f 100644 --- a/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js +++ b/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js @@ -68,9 +68,9 @@ options.registry.newsletter_popup = mass_mailing_common.extend({ }); web_editor.Class.include({ - edit: function () { - this._super(); + start: function () { $('body').on('click','#edit_dialog',_.bind(this.edit_dialog, this.rte.editor)); + return this._super(); }, save : function() { var $target = $('#wrapwrap').find('#o_newsletter_popup'); -- cgit v1.2.3