summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/xml/editor.xml
AgeCommit message (Collapse)Author
2020-03-26[FIX] web_editor: fix buttons position for bg-position when parallaxBenjamin Vray
Correction of the position of the buttons when editing bg-image position with a parallax effect other than "fixed". task-46147 closes odoo/odoo#48419 X-original-commit: 0919b11c9a78a97345b42bf0fe0f1f9939c2b214 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-16[IMP] web_editor, *: allow saving of snippetsfja-odoo
* website, mass_mailing, website_event, website_form, website_mass_mailing, website_sale Now the user can save snippets to use them on other pages. task-2120409 closes odoo/odoo#40408 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-11-18[IMP] web_editor: rework background-sizing optionSamuel Degueldre
Previously, background size and position for snippets was configured in a modal, the user could choose a "focus point", which is rather unintuitive. They could also choose to use the "contain" background mode, with or without repeat, or a third option, where they could customize everything, from the background size in both directions to whether to repeat the background in only one or in both directions. This commit streamlines the background-sizing options, only the "cover" and "repeat pattern" options have been kept, as they cover almost every use case. Their configuration has been moved into the options menu for consistency with the rest of the editor, and the background's position is now chosen by clicking on the corresponding menu option, and dragging the background to the desired place. Part of https://github.com/odoo/odoo/pull/38959 maintask-2066614 task-2088304
2019-08-21[REF] web_editor, website: adapt wysiwyg to 12.0 editorGorash
The wysiwyg abstraction layer was introduced in saas-12.2 by commit f2969923. Its goal was to provide an external interface for other modules that wanted to use the editor feature such that the editor core itself could be changed without requiring extensive changes in the other modules. This commit is adapting the wysiwyg interface to instantiate the 12.0 editor below it rather than the saas-12.2 one, thus reverting the "new editor" part of f2969923 itself. Part of PR 35677. Co-authored-by: Nicolas Bayet <nby@odoo.com> Co-authored-by: Antoine Guenet <age@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com>
2019-02-22[MERGE] forward port branch saas-12.1 up to 0f4abc5c228Christophe Simonis
2019-02-21[MERGE] forward port branch 12.0 up to 84143a34b31Christophe Simonis
2019-02-14[FIX] website, *: restore and enforce Odoo UI designqsm-odoo
* web_editor BS conflicts with our UI again: btn sizes and form controls are more difficult to force with BS4, this commit adapts the controls to use less problematic sizes, and adds/adapts some more forcing rules. Part of https://github.com/odoo/odoo/pull/31117 task-1941156
2018-12-04[REF] web_editor, web_unsplash: review load more featureqsm-odoo
* Simplify the code * Make the feature mork without unsplash * Handle corner cases task-1896705
2018-12-04[IMP] web_editor, *: improve media dialogAndrea Ulliana
* web_unsplash, website_sale - Visual improvements and cleaning in each tab: video, documents, pictogram, images. - Only one search input for both the local library and unsplash. - Replace the idea of multiple pages by adding a 'Load More' button. task-1896705
2018-11-16[MERGE] forward port branch saas-11.3 up to bab2a191d29Christophe Simonis
2018-11-15[FIX] web_editor: properly post process document uploadqsm-odoo
When using the media dialog, when uploading an image, the image list refreshes itself properly. This was not the case for documents as it was... refreshing the image list too instead of the document list. Also, when uploading a document, it is supposed to be added in the page directly and the media dialog is supposed to close. This feature was broken for the same reason: the iframe system of both tabs which were using the same name. Bug introduced with https://github.com/odoo/odoo/commit/abde8bddf8ec45cf12aab59e95c330321158cfba (even though is was technically wrong for the same reason before). Closes https://github.com/odoo/odoo/pull/28722
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>
2019-01-09[IMP] website, *: allow creating anchor linksAndrea Ulliana
* portal, web_editor Anchor Link: - Some visual improvements of the link dialog. - New 'Page Anchor' field. - System by default: top and bottom. - Shows existing anchors. Creation of the anchor: - New option 'Anchor Name' to be able to create an anchor. task-1913458 closes odoo/odoo#29150
2018-10-26[IMP] web_unsplash: Implement Beacon Alternative and credit UnsplashRomain Derie
Unsplash API requirements does not directly allow to store their images on our server (We should use hotlinking unless the image is edited (cropped etc)). Still, they have the `Image Beacon Alternative` to allow to store their images on our server if we really need it with our use case. With the Beacon Alternative, we should ping Unsplash server to notify an image view. To do so, we need to be able to recognize Unsplash imagesin the DOM, this is why we are now using /unsplash/ in the URL. The Unsplash image name should be the image ID as it will be the identifier needed to ping their server. This commit also adds credit to Unsplash in the media dialog next to the unsplash input search. It also add the `w-100` on the media dialog card as we lost that UI behavior from BS3 to BS4. opw-35060 closes odoo/odoo#27377
2018-09-13[FIX] web_editor: fix and improve AltDialogJeremy Kersten
Ref label Add tooltip Fix title from modal -> before this commit, modal title was wrongly replaced by title of image :/ task-1878245
2018-09-12[FIX] web_editor: BS4 input group button height glitchRomain Derie
As an `form-group` can contains element having `form-control` class and other not having it, we should not force height on `form-group` elements. Typically, we could have: div.form-group input.form-control button Forcing height only on `form-control` will make the input thinner than the button.
2018-09-12[FIX] web_editor: BS4, do not suggest XS size for buttonsqsm-odoo
The XS size for buttons was removed in BS4. We lowered the size for btn-sm though, so those are the replacement. task-1878245
2018-09-12[FIX] web_editor: do not ask for link style during menu item editionqsm-odoo
The menu item dialog is an extension of the link dialog where all the .form-group elements which contain a .link-style option element are removed. A new link style option was recently added but with the wrong class, preventing it to be removed for the menu item dialog. task-1878245
2018-08-31[FIX] web_editor, website(_*): fix bs4Romain Derie
[FIX] web_editor: adapt col size to avoid too small select We should avoid col-md-3 in col-md-9 as the menu dialog is instanciated at 2 places: - When creating a link in the editor - When editing website navbar menu In the second case, there is a hack in `content.js` to remove `modal-lg` lowering the width of the modal and making the select too small. [FIX] website: lower navbar font size With BS4, font-size of navbar element went from 13px to ~17px (rem unit computation). 14px seems better than previous 13px as the frontend content size is higher than the backend one. Thus, 13px looks too small in contrast with the frontend page content. [FIX] website_crm_partner_assign, website_customer, website_membership: fix layout This commit fixes multiple layout issues, mainly by aligning code of the 3 modules: - Add margin right to avoid text to be against image - Using image_medium everywhere - Fixing search input width publish toggle red + odoo primary is weird -> gray navbar now has a background & float-right not working since flex -> remove navbar class, use d-flex and ml-auto so the right element will be floating since using all available width task-1878150
2018-08-30[REF] web_editor, *: review color theming systemqsm-odoo
* web, website - Introduce gray color palettes (needed for themes migration) - Synchronize BS4 color maps with individual variables (see comments about this in the code). - Review alpha/primary, beta/secondary matching: Before this commit, we decided that the common way to define a color palette was defining primary, secondary, gamma, delta and epsilon. alpha and beta were then forced to primary and secondary without other possibility. The new system makes more sense: 1) define alpha, beta, gamma, delta and epsilon 2) primary and secondary will automatically be set to your alpha and beta (allowing to style the default UI with BS4-independant variables) 3) if you are not happy with (2), you can define primary / secondary in your color palette so that they are not automatically set to alpha / beta This commit also changes what classes the editor uses. Background colors and text colors will now use alpha/beta/gamma/delta/epsilon (not primary and secondary anymore). For buttons, all the possibilities are suggested but color duplicates are hidden (so if your primary and alpha are equal, only one button color is suggested).
2018-08-13[IMP] website, *: review snippets and colorsCocographique
* web, web_editor, website_hr_recruitment, website_mail_channel, website_mass_mailing - Review all snippets and add new ones - Add lots of new options - Use odoo colors as default theme colors task-38878
2018-08-02[FIX] web_editor: BS4, restore crop dialog UIKishan Gajjar
2018-07-31[FIX] *: BS4, restore modal headersqsm-odoo
Close icon should now be put after the modal title in the DOM. Completes commit https://github.com/odoo/odoo/commit/d9801c1abe06b4c20702c0e94c56eea6a3ed8327
2018-07-27[REF] web_editor: BS4, review media dialog layoutqsm-odoo
2018-07-27[REF] *: BS4, 'pull-left/right' -> 'float-left/right'qsm-odoo
2018-07-27[REF] *: BS4, adapt formsqsm-odoo
The 'form-horizontal' class have been removed; the '.form-group' elements must now use the 'row' class for an horizontal layout. The 'control-label' class was renamed to 'col-form-label'. The 'help-block' class was renamed to 'form-text'. The 'has-error' and 'has-success' classes have been removed and replaced by a new system using the :valid and :invalid pseudo-classes, when a parent has the 'was-validated' class. While this system is great, it is not straightforward to use it in Odoo. Fortunately, BS4 provides the 'is-valid' and 'is-invalid' classes as fallback. This commit replaces the 'has-error' and 'has-success' classes by 'o_has_error' and 'o_has_success' classes (for JS compatibility) and use the 'is-*' fallback classes. (The 'has-warning' class has no equivalent but was unused in Odoo anyway).
2018-07-27[REF] *: BS4, adapt input-group structureqsm-odoo
The input-group-addon class has been replaced by a combination of the input-group-text and the input-group-append/prepend classes. The input-group-btn class is replaced by the input-group-append/prepend classes.
2018-07-27[REF] *: BS4, review panel and well structureqsm-odoo
Panels and wells were dropped and replaced by the "Card" component.
2018-07-27[REF] *: BS4, adapt col-related classesqsm-odoo
col-lg-* -> col-xl-* col-md-* -> col-lg-* col-sm-* -> col-md-* col-xs-* -> col-* col-lg-offset-* -> offset-xl-* col-md-offset-* -> offset-lg-* col-sm-offset-* -> offset-md-* col-xs-offset-* -> offset-* col-lg-pull-* -> order-xl-1 col-md-pull-* -> order-lg-1 col-sm-pull-* -> order-md-1 col-xs-pull-* -> order-1 col-lg-push-* -> order-xl-2 col-md-push-* -> order-lg-2 col-sm-push-* -> order-md-2 col-xs-push-* -> order-2
2018-07-27[REF] *: BS4, review the 'nav' and 'navbar' componentsqsm-odoo
Now the nav structure is more declarative: the 'nav-item' and 'nav-link' classes have to be put on related nav item and links. Also, the 'active' class has to be put on links instead of items. Same as for the navbar component: - The navbar structure was simplified and meant to be more declarative. - The navbar colors are also now handled by a different set of classes. The 'nav-stacked' class was removed and replaced by flex utilities. The set of classes for colors and nav styles also changed.
2018-07-27[REF] *: BS4, 'img-responsive' -> 'img-fluid'qsm-odoo
2018-07-27[REF] *: BS4, adapt dropdowns and caretsqsm-odoo
- The dropdown structure was simplified, allowing to get rid of the 3-levels structure induced by <ul/> elements and dropdowns can now contain anything. The class 'dropdown-item' is now mandatory for each dropdown clickable element. The class 'dropdown-item-text' can be used to add same padding and style but without making the element have a clickable look. - Dividers now use the class 'dropdown-divider' - The way dropdowns are opened and hidden also changed (before the 'open' class was added on the `.dropdown-menu` parent, now the 'show' class is added on both the `.dropdown-menu` parent and the `.dropdown-menu` itself). - JS-wise, no click event handlers can be put on `.dropdown-toggle` elements anymore (instead, use handlers for dropdown events). - Carets are automatically put on `.dropdown-toggle` elements, so this commit replaces the `.caret` elements with this. This feature was possible to disable but would prevent us from adding a caret with scss. Also, this simplifies the DOM. The 'o-no-caret' class was also introduced to allow using the 'dropdown-toggle' class on non-caret elements. - Also adapt the scss to use $caret-width instead of $caret-width-base
2018-07-27[REF] *: BS4, rename btn-default to btn-secondaryqsm-odoo
BS4 "btn-default" class was replaced with "btn-secondary", which makes more sense.
2018-07-27[REF] *: BS4, remove the use of btn-smqsm-odoo
Odoo made the bad choice of using the 'btn-sm' class for every button instead of configuring the padding for default 'btn' to be smaller. In BS4, the style of btn-sm is actually more complex, lowering the font-size too. Also, btn-xs was removed so we would not have the possibility to display smaller button than our default ones. This commit removes btn-sm wherever it was used. Unfortunately, this might remove it at some places where it made sense but this can be restored in a second time.
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-07-20[ADD] web_unsplash: Find free high-resolution images from UnsplashDeep Patel
This commit: 1. Adds settings to install the new `web_unsplash` enterprise module. See counterpart commit on enterprise for details. 2. Export `ImageWidget` and `update_control_panel` to be able to override them. 3. Add the unsplash access key rights to website designer. (see related OE commit) task-35060 Closes #25825, closes #25637
2018-07-04[FIX] Syntax of icons (#25577)kujiu
Description of the issue/feature this PR addresses: Accessibility improvements forbids the use of the syntax `<i class="fa fa-check"/> Some text` to create a labelled icon. But, by this, some fonts are changed. Desired behavior after PR is merged: The old syntax can be used.
2018-06-29[MERGE] forward port branch saas-11.4 up to d54a3726ecaChristophe Simonis
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-06-21[FIX] web_editor: review crop attachment creation/discardqsm-odoo
Previous implementation was wrong as it did not care about the ability to discard a crop edition. Indeed, whenever a crop dialog was saved, a crop attachment was created or updated at once. Discarding the editor would then either: - Seem to discard a first-time cropped image but would have created an attachment for nothing (just the image src was reset) OR - Fail to discard a second-time cropped image as the cropped attachment would have been directly updated and the image src would not have changed This commit changes the way it works: - On crop dialog save, the image is marked with required data for a potential future save of the cropped image (as a DB attachment) and the src is set to the base64 cropped image directly. Note that the code ends up being clearer and efficient that way too.
2018-06-21[FIX] web_editor: fix saving and restoring of crop aspect ratioqsm-odoo
When an image was cropped and saved with a specific aspect ratio, it was not restored properly on further crop editions.
2018-05-18[IMP] web_editor: allow cropping content imagesKishan Gajjar
2018-02-12[MERGE] forward port branch saas-11.1 up to c69d00157edChristophe Simonis
2018-02-08[FIX] base/mail: Added an access_token on the attachments urlChristophe Matthieu
The access_token is automatically added by the media editor. It's added on the website and by the html editor to send by email. The widget display the attachments from 'ir.ui.view' (public attachment) and the attachment from the current record. Issue: can't load image in gmail or mobile because the client mail use a proxy who avoid ours odoo access.
2018-01-16[IMP] website: more intuitive image and link editionqsm-odoo
- Remove useless snippet background suggestions (only one button to open the media dialog directly) - Show meaningful-only tabs in the media dialog (no document as background, ...) - When editing a background shows the background suggestions first and show the background suggestions last for standard images. Technically, this is done by filtering on the name/fname of the attachments and adding magic name parts to the fname on image upload (e.g. when uploading an image from the media dialog when customizing a bg, the uploaded image will automatically be marked as a background). Note: there were discussions to implement this feature with a tag system for ir.attachment/s but the implementation's cost was too great in regards to the feature. - When editing an existing link or creating one from selected text, do not show the "Link Label" field in the dialog; it was confusing. Only show that field when adding a link at the cursor location with no selected text.
2018-01-16[REF] web_editor, website(_*): refactore media & link dialogsqsm-odoo
* blog, gengo, sale
2017-11-07[MERGE] forward port branch saas-16 up to 5f9c3f51a8bChristophe Simonis
2017-11-03[MERGE] forward port branch saas-14 up to d8888bdbaeaChristophe Simonis
2017-11-03[MERGE] forward port branch 10.0 up to aaa75661414Christophe Simonis
2017-11-03[FIX] web_editor: upload without optimizationNicolas Martinelli
In Enterprise: - Go in Settings > Technical > Mail > Templates - Edit a template - In the editor, upload an image - Choose "Upload image without optimization" You are sent back to the app switcher. opw-778918