diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2015-11-30 08:27:32 +0100 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2015-11-30 09:04:16 +0100 |
| commit | f77e44f2ddddabd71e443278ca00193215bf9954 (patch) | |
| tree | 0bef09564633e494e48fb26f799cb187a2c682a7 | |
| parent | 49ed380e72fa2357210e1be039cb43b07722d65d (diff) | |
[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
| -rw-r--r-- | addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js | 4 |
1 files changed, 2 insertions, 2 deletions
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'); |
