summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/xml
AgeCommit message (Collapse)Author
2019-07-04[MERGE] forward port branch saas-11.3 up to 1debaa89f14Christophe Simonis
2019-07-04[MERGE] forward port branch 11.0 up to 56ce29e71f7Christophe Simonis
2019-06-28[FIX] web_editor: restore broken VideoDialog optionsKishan Gajjar
- To enable loop on a video, only setting the 'loop' URL parameter to 1 will not work anymore. We also need to set the playlist parameter to the video ID. - Sound is no longer allowed in autoplay because of new autoplay policies of most browsers. To make autoplay work, the video must be explicitely muted. closes odoo/odoo#34323 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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-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-11-16[MERGE] forward port branch saas-11.3 up to bab2a191d29Christophe Simonis
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-12[IMP] web_editor: change UI for snippet background color menuDipalee Bhalodia
Replace current UI of the snippet background options with the same one as the standard editor colorpicker task-37974 Closes #26274
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, website: BS4, adapt website UIqsm-odoo
2018-07-27[REF] web_editor: BS4, review media dialog layoutqsm-odoo
2018-07-27[REF] *: BS4, replace 'btn-xs' by 'btn-sm'qsm-odoo
In a previous commit, we removed the use of the 'btn-sm' classes as we used it everywhere for default-size buttons instead of customizing the size of those default-size buttons directly. This commit proves it was even more necessary as the 'btn-xs' class does not exist anymore in BS4 and we so can use the 'btn-sm' class instead.
2018-07-27[REF] *: BS4, 'pull-left/right' -> 'float-left/right'qsm-odoo
2018-07-27[REF] web, *: BS4, use custom BS4 checkbox everywhereqsm-odoo
Before this commit, Odoo used checkboxes in three different ways: - A simple <input type="checkbox"/>, mainly in the frontend. The style is browser dependant. - Same as above but with the BS3, checkbox structure. The style is still the same, but the alignement is supposed to be better (which is not always the case). - The Odoo official structure: ``` <div class="o_checkbox"> <input type="checkbox"/> <span/> </div> ``` which allows to have a cross-browser checkbox style and correct alignements. The goal after this commit is to only use the BS4 *custom* checkbox structure to achieve the same goal as our official structure (and remove that one): ``` <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="customCheck1"> <label class="custom-control-label" for="customCheck1">...</label> </div> ``` /!\ Labels are now required (use a zero-width space if necessary)
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-04-18[REF] web, web_editor, website: convert LESS editor to SCSS editorqsm-odoo
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
2018-01-08[IMP] web_editor, *: change height/margin system to padding systemqsm-odoo
* web, website, mass_mailing Before this commit, the editor allowed defining the margin of some elements and the height of some elements. There were three main problems with this system: 1) When an user dragged the arrow, he often expected to change the size of the element while he was in fact changing the margin 2) When changing the margin, you increase the space between two elements but with a white space (while most users want a space with the same color of the block they are resizing = padding) 3) When changing the height, the user was able to hide snippet parts and the height was not consistent accross screen sizes Now, the only thing you can edit is padding. There is only one arrow for each direction, which allows increasing spacing and consistent dimension at the same time. The only feature that is lost with this change is the ability to control vertical alignement of colored columns. This is not a problem as colored columns are rare in our current snippets and there still have the possibility to add margin classes by hand if necessary (there are also plans to control vertical alignement another way). Note: margin classes are kept for compatibility.
2017-11-07[MERGE] forward port branch saas-16 up to 5f9c3f51a8bChristophe Simonis
2017-11-03[MERGE] forward port branch saas-15 up to 8ec60550a74Christophe 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