summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorKishan Gajjar <kig@odoo.com>2019-02-05 06:55:25 +0000
committerqsm-odoo <qsm@odoo.com>2019-06-25 09:20:35 +0000
commit34c4b3ad8a23988ecdd8112156ea13da518a2e90 (patch)
tree201c2047661b6cf4f58771da45abba6f9d3857bb /addons/web_editor/static/src
parent2ad49ec93e39ae5d59ccc17884408870e1c86c5e (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/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/wysiwyg/wysiwyg.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js
index eb30811d8bb..a376cff945e 100644
--- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js
+++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js
@@ -188,13 +188,14 @@ var Wysiwyg = Widget.extend({
*
* @param {object} [options]
* @param {Boolean} [options.keepPopover]
+ * @param {jQueryElement} [options.$layout]
* @returns {String}
*/
getValue: function (options) {
if (!options || !options.keepPopover) {
this._summernote.invoke('editor.hidePopover');
}
- var $editable = this.getEditable().clone();
+ var $editable = options && options.$layout || this.getEditable().clone();
$editable.find('.o_wysiwyg_to_remove').remove();
$editable.find('[contenteditable]').removeAttr('contenteditable');
$editable.find('.o_fake_not_editable').removeClass('o_fake_not_editable');