diff options
| author | Kishan Gajjar <kig@odoo.com> | 2019-02-05 06:55:25 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-06-25 09:20:35 +0000 |
| commit | 34c4b3ad8a23988ecdd8112156ea13da518a2e90 (patch) | |
| tree | 201c2047661b6cf4f58771da45abba6f9d3857bb /addons/website/static/src/js | |
| parent | 2ad49ec93e39ae5d59ccc17884408870e1c86c5e (diff) | |
[IMP] website_mass_mailing, *: improve newsletter snippets
* website, mass_mailing, web_editor
This commit adds various improvements in newsletter snippets as follow:
- Improves UI for newsletter popup.
- We only had one popup for all websites. Now, we can have a different
popup for each website.
- The popup was not appearing on mobile/tablet devices. Now, in
mobile/tablet devices, the popup appears automatically after 5secs.
- Added the ability to customize the whole editor popup like any
editable area (background colors, etc).
- User needed to enable popup snippet from the settings. We removed that
setting so now popup snippet will always be available.
- Added new snippet "Newsletter block".
- Display notification after successful subscription the same way for
all newsletter snippets.
Closes https://github.com/odoo/odoo/pull/29353
task-1903256
closes odoo/odoo#29353
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src/js')
| -rw-r--r-- | addons/website/static/src/js/editor/editor_menu.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/website/static/src/js/editor/editor_menu.js b/addons/website/static/src/js/editor/editor_menu.js index 46c3fc0b6b1..b370815ccfd 100644 --- a/addons/website/static/src/js/editor/editor_menu.js +++ b/addons/website/static/src/js/editor/editor_menu.js @@ -24,6 +24,7 @@ var EditorMenu = Widget.extend({ }, custom_events: { request_save: '_onSnippetRequestSave', + get_clean_html: '_onGetCleanHTML', }, /** @@ -198,6 +199,15 @@ var EditorMenu = Widget.extend({ this.cancel(false); }, /** + * Get the cleaned value of the editable element. + * + * @private + * @param {OdooEvent} ev + */ + _onGetCleanHTML: function (ev) { + ev.data.callback(this.wysiwyg.getValue({$layout: ev.data.$layout})); + }, + /** * Snippet (menu_data) can request to save the document to leave the page * * @private |
