[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
This commit is contained in:
Nicolas Lempereur
2015-11-30 09:04:16 +01:00
parent 49ed380e72
commit f77e44f2dd
@@ -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');