summaryrefslogtreecommitdiff
path: root/addons/website_mass_mailing/static/src/xml
AgeCommit message (Collapse)Author
2019-10-11[FIX] website_mass_mailing, *: fix display of backend popup editionqsm-odoo
In the backend, when a mailing popup was being edited, it was not centered in the edition area (and went under the editor UI) and was not using the correct style. task-2083465 closes odoo/odoo#38449 X-original-commit: 6ccf3b618b4b0774deccb4f75bf33f3ea4dc8b75 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-06-25[IMP] website_mass_mailing, *: improve newsletter snippetsKishan Gajjar
* 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>
2019-01-17[IMP] web_editor,*: Refactoring the wysiwyg editor and 'html' fieldChristophe Matthieu
* Creating a new structure by transforming all the plugins in the library using the odoo inheritance system. Plugins are easier to implement with the AbstractPlugin to add Odoo behaviors. * From now on, the methods of the library (in this case Summernote) can no longer be called by other modules or files. Only the wysiwyg widgets can access it, to simplify the updating process. The wysiwyg object serves as an interface. * Depending on the options the snippets will be loaded or not, the editor will be in an iframe or not... all of this is transparent from the outside. * Regarding iframes, all controllers related to editing have been removed: the new API no longer needs them. This speeds up loading, eases testing and removes complexity for the same features. PUBLIC FEATURES There are several public methods on the Wysiwyg class: * Wysiwyg.prepare (WidgetParent): returns a deferred resolved when the library (xml, lazy, assets...) is loaded. * Wysiwyg.getRange (DOM): returns the range (selection in the dom) * Wysiwyg.setRange (startNode, startOffset, endNode, endOffset): creates a range (selection in the dom) * Wysiwyg.setRangeFromNode (DOM, options) that creates a range from an element (option available to select all, start or end) A jQuery selector was added: :o_editable, which indicates whether the current element is editable. That is, if it is contained in a tag with the attribute 'contentEditable = "true"' or in a tag with the class o_editable. Several methods are also present: * focusIn: makes a focus and places the cursor at the beginning of the element * focusInEnd: makes a focus and places the cursor at the end of the element * selectContent: makes a focus and selects the content HTML FIELD The HTML field can receive different options: * style-inline: {boolean} transforms a class into an inline style when saving and vice versa when reading. * no-attachment: {boolean} prevents the use of attachments (in media dialog) * cssEdit: {xml_id} to use a template containing the css to loaded in an iframe when editing * cssReadonly: {xml_id} to use a template containing the css to load into an iframe when viewing in readonly * snippets: {xml_id} snippets template (can be used with or without cssEdit) * wrapper: {template} qweb static template (containing a tag: id = "wrapper") that will include the content during editing (removed on save) MASS MAILING A widget was created for mass mailing. There are now two fields: body_html and body_arch. body_arch contains the code with the class without conversion into inline style, useful when editing and one with the inline style that is visible in readonly mode and sent by email. Advantage: no spreading errors, able to update css/theme, able to do more changes when converting to inline style so that a maximum of mail clients have an impeccable rendering. Co-authored-by: Antoine Guenet <age@odoo.com>