summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/views/editor_field_html.xml
AgeCommit message (Collapse)Author
2019-07-17[MOV] mass_mailing: reorganize module according to guidelinesThibault Delavallée
PURPOSE Mass mailing is currently a bit messy. As SMS will be added as a way to notify people in mass through SMS let us take this opportunity to somehow clean this application: organization, light code cleaning, model renaming. SPECIFICATIONS Guidelines: re-organize model files and split them according to main models. Also reorganize views. Done in this commit * split big python file by main models; * split views according to python files; * move statistics report to /report; * merge some exploded view files (assets, snippets, application menus); LINKS Task ID 2037906 Preparing task ID 1997464 (SMS addition in mass mailing) PR #34938
2019-02-14[IMP] web_editor: lazy load the wysiwygChristophe Matthieu
Issue: wysiwyg asset slow down the loading of the website, error inadvertently introduced: https://github.com/odoo/odoo/pull/29775 The assets are now loaded assynchroneously, when the editor is needed, its assets will be loaded. closes odoo/odoo#30700
2019-01-17[ADD] web_editor,*: Tests for new structure of web editorAntoine Guenet
The refactoring also had to be done in order to create a set of unit tests. Each behavior can be tested, including the behaviors performed as a consequence of keyboard interactions (for instance: Enter, Tab...). This commit also contains some changes to test_utils that were necessary given the new structure of the wysiwyg editor. Co-authored-by: Gorash <chm@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>
2018-08-13[IMP] mass_mailing: removed font-family from plain textAnshuman Sharma
Purpose behind this commit is to remove font-family from all elements in plaintext theme. So mail receiver will see this mail in default system font. This is inspired by new Gmail and suggested by FP As we want to show system's default font in the mail sent with the basic theme. And so we remove font-family from basic theme while saving. But by doing so in readonly mode is not getting proper font in odoo as we don't having any assets in readonly mail editor. So we added stylesheet just for display purpose.
2018-08-06[IMP] mass_mailing, mail: added support for media queries in mass mailDeep Patel
- Email generated from mass mailing will have its own layout with internal css. - strip_classes is removed from mail_message because mail client are now supporting internal stylesheet. we need it for make mail responsive. mail: manually removed classes from incoming mail body Because we removed strip_classes from mail message body field because we want to allow classes in outgoing mail to make it responsive but classes are not removed from incoming mails so here we manually removed classes from incoming mail. opw-1836556
2018-07-27[REF] *: BS4, adapt display classesqsm-odoo
The system completely changed. I also had to adapt classes to new screen breakpoints. hidden/hide -> d-none show -> d-block hidden-xs -> d-none d-md-(block/inline/...) hidden-sm -> d-md-none d-lg-(block/inline/...) hidden-md -> d-lg-none d-xl-(block/inline/...) hidden-lg -> d-xl-none visible-xs-* -> d-* d-md-none visible-sm-* -> d-none d-md-* d-lg-none visible-md-* -> d-none d-lg-* d-xl-none visible-lg-* -> d-none d-xl-* hidden-print -> d-print-none visible-print-* -> d-none d-print-* ... and all possible combination of those had to be handled too.
2018-06-22[IMP] Improve compatibility with screen readers (accessibility) (#24574)kujiu
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable. This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader. * [IMP] Labels must have a for attribute. Improve accessibility. * [IMP] Better error message when trying to read a missing cached value * [FIX] Add some aria-label and title attributes for screen readers. * [FIX] Template name is not included in the error message in case of SyntaxError in QWeb * [FIX] Improve the Tour failed at step error message to be more explicit. * [IMP] Add aria-labels * [FIX] Add missing aria-label on failing test * [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all. * [IMP] Color names on kanban views and many2many tags * [IMP] Add some checks on views for accessibility. * [IMP] Add `alt` attribute on `img` tags. * [IMP] Add aria-label and title on non-described icons * [IMP] Add button role to widgets with btn class * [IMP] Translate aria and formatted attributes. * [IMP] Remove wrong aria-labelledby * [IMP] Add menu role on dropdowns * [IMP] Buttons must be focusable * [IMP] Add aria attributes on progress bars * [IMP] Improve accessibility of basic widgets * [IMP] Change main layout to more semantic tags * [IMP] Add menuitem role when missing * [IMP] Remove wrong role='presentation' * [IMP] Improve accessibility of tab panels * [IMP] Add aria-invalid on invalid fields * [IMP] Add aria-sort on ordered columns * [IMP] Add role on alerts * [IMP] Use dialog role, header, main and footer tags for modals * [IMP] Add labels on o_status * [IMP] Improve accessibility of kanban view with feeds and articles * [IMP] Add alerts in case of new messages * [IMP] Add widget, navigation or img role to aria-labelled items
2018-04-18[REF] *: rename all LESS files to SCSSqsm-odoo
This is a simple renaming without adaptation.
2017-10-03[FIX] mass_mailing: open links in parent while in backendLucas Perais (lpe)
Before this commit, links that had no target location opened in _self, which is the iframe within which they are embedded. After this commit, thos links are now opened in _parent to simulate closer the beahavior with an actual e-mail
2017-03-13[IMP] mass_mailing: add "basic" theme for plain text mailingstefanorigano
Sometimes, there is a need for mass mailing "basic" mails with no image or style. The "basic" theme is designed for this (note that there still is the possibility to add style and images, default images are just gray placeholder).
2016-09-30[FIX] mass_mailing, web_editor: set up correct iframe communicationqsm-odoo
Previous commit tried to handle iframe assets in a more standard way but instead broke the order followed to install iframe communication. While waiting for a more clean way to handle iframe assets and communication, revert to old set up.
2016-09-30[IMP] mass_mailing: only keep one theme in community moduleqsm-odoo
Only keep default theme in community module and replace old enterprise ones with new ones.
2016-09-20[IMP] mass_mailing: review theme style location and conventionqsm-odoo
* Use the theme class selector as root for the less file -> Allow to style the editor as applied to the body -> Split in editor/color/layout/snippets * Create an assets to contain all mm themes so that the compilation is made by the odoo system, and allow minification and variable sharing between themes -> Remove css files * Reformat the LESS files content
2016-09-20[IMP] mass_mailing, web_editor: improve themes/snippets/templatesstefanorigano
2016-09-05[REF] mass_mailing: convert templates to themes and clean codeqsm-odoo
* Remove mass mailing template switching system (lemon, airmail, ...) and replace it with a theme selector which only toggle a different class on the body. * Lint JS files. * Change the way the editor is overridden by mass_mailing in a more odoo way (put the JS in assets and check on runtime if it must be applied. + fix editor style + remove useless code + remove odoo template
2016-09-05[IMP] mass_mailing: correctly define snippets toolbar templateqsm-odoo
* Split snippets into templates and use the t-snippet directive * Correctly handle snippet thumbnails thanks to t-thumbnail and not with custom css
2016-09-05[REF] mass_mailing: change/add snippets/themes layout/designCsaba Fazekas
* Airmail/Lemon/Tech template/Odoo template * Add bg color option * Clean snippets
2016-09-05[REF] mass_mailing: change theme/template selection and add new snippetsChristophe Matthieu
* remove theme/template selection screen for mass_mailing * allow to use different layout on edition * add new snippets
2016-02-24[REF] web,web_editor,website(_*),report,pos,mass_mailing: assetsqsm-odoo
* Remove recursive assets inclusions (i.e. assets_editor was including assets_common, summernote, ...) * Better construct the assets (link, then script + type attribute) * Better include the assets (split js / css, always use t-call-assets) * Simplifies the number of assets * Move bootstrap js to assets common * assets_frontend is now created by web module to allow using it on the connexion page but also in the web_editor, where colors have to be bootstrap/theme ones. Note: if a module depends on website, then keep using the inherit_id="WEBSITE.assets_frontend"
2015-11-18[FIX] mass_mailing: fix tooltip for "Select a theme"Nicolas Lempereur
The popover in the mass mailing are not enabled, also the whole CSS of the website is not used (particularly, the popover CSS is not included). This commit replace the popover by a tooltip and enable tooltip on [data-toggle="tooltip"] elements. second half of: opw-656693
2015-09-21[FIX] mass_mailing: mailing list was not createdKeyur Gajjar
Add "editable_area" id and remove default html content.
2015-08-15[MERGE] forward port of branch saas-6 up to 8d95f6dChristophe Simonis
2015-08-05[FIX] mass_mailing: move website FieldTextHtmlPopupContent template in ↵Christophe Matthieu
mass_mailing
2015-07-10[IMP] mass_mailing: move code from website_mail to mass_mailing and use ↵Christophe Matthieu
web_editor