[REF] website_mass_mailing: remove dead code linked to newsletter popup
Commit merged at [1] left dead code behind. [1]: https://github.com/odoo/odoo/commit/8873fe7240e505553650fc15aea1ea3a299acc0f Part-of: odoo/odoo#81699
This commit is contained in:
@@ -22,7 +22,6 @@ On a simple click, your visitors can subscribe to mailing lists managed in the E
|
||||
'website_mass_mailing/static/src/js/website_mass_mailing.js',
|
||||
],
|
||||
'website.assets_wysiwyg': [
|
||||
'website_mass_mailing/static/src/js/wysiwyg.js',
|
||||
'website_mass_mailing/static/src/js/website_mass_mailing.editor.js',
|
||||
],
|
||||
'web.assets_tests': [
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
odoo.define('website_mass_mailing.wysiwyg', function (require) {
|
||||
'use strict';
|
||||
|
||||
const Wysiwyg = require('web_editor.wysiwyg');
|
||||
|
||||
Wysiwyg.include({
|
||||
//--------------------------------------------------------------------------
|
||||
// Private
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
_saveElement: function ($el, context, withLang) {
|
||||
var self = this;
|
||||
var defs = [this._super.apply(this, arguments)];
|
||||
var $popups = $el.find('.o_newsletter_popup');
|
||||
_.each($popups, function (popup) {
|
||||
var $popup = $(popup);
|
||||
var content = $popup.data('content');
|
||||
if (content) {
|
||||
defs.push(self._rpc({
|
||||
route: '/website_mass_mailing/set_content',
|
||||
params: {
|
||||
'newsletter_id': parseInt($popup.attr('data-list-id')),
|
||||
'content': content,
|
||||
},
|
||||
}));
|
||||
}
|
||||
});
|
||||
return Promise.all(defs);
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
@@ -82,7 +82,6 @@
|
||||
</template>
|
||||
|
||||
<template id="newsletter_subscribe_options" name="Newsletter Subscribe Options" inherit_id="website.snippet_options">
|
||||
<xpath expr="//*[@t-set='so_snippet_addition_selector']" position="inside">, .o_newsletter_popup</xpath>
|
||||
<xpath expr="//div" position="after">
|
||||
<t t-set="selector" t-value="'.js_subscribe'"/>
|
||||
<div data-js="mailing_list_subscribe"
|
||||
@@ -96,9 +95,6 @@
|
||||
</div>
|
||||
<div t-att-data-selector="selector" data-drop-near="p, h1, h2, h3, blockquote, .card"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@data-js='anchor']" position="attributes">
|
||||
<attribute name="data-exclude" add=".o_newsletter_popup" separator=","/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Extend default mass_mailing snippets with website feature -->
|
||||
|
||||
Reference in New Issue
Block a user