summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
AgeCommit message (Collapse)Author
2020-08-14[IMP] web_editor: review 'o_we_image_weight' designstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252 closes odoo/odoo#55959 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-14[IMP] web_editor, website, *: adjust general ui spacing/alignmentstefanorigano (SRI)
*: website_form Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web_editor: add 'shape' option svg iconstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web_editor, *: add caret icon to dropdowns & colorpicker modalqsm-odoo
*: website Part of https://github.com/odoo/odoo/pull/55959 task-2157252 Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
2020-08-14[IMP] web_editor: refine overlay handlers design and behaviorstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web_editor: allow 'we-button-group' to increase its sizestefanorigano (SRI)
Allow 'we-button-group' to increase its size when it's the only option inside an option field. Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web_editor, *: make general adaptations of the editor UIstefanorigano (SRI)
*: website Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web_editor: increase font-size/spacing of the editor UIstefanorigano (SRI)
11px was set as default font-size when achieving 5 or 6 edition levels in the sidebar was the norm. Thanks to the snippet's cleanup, resulting in a reduced number of editable elements, we can now increase the default fon-size and, consequentially, all general spacings. Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web_editor, *: review 'options' tab specific components designstefanorigano (SRI)
*: website Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web_editor: review colorpicker selected color visibilitystefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web, web_editor: review colorpicker designstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14[FIX] web_editor: properly toggle the disabled prop of the "Style" tabstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14[REF] web_editor, website: allow reusing tabs designstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-14[IMP] web_editor, website: review snippets library designstefanorigano (SRI)
Especially review disabled, hover, install and custom snippet states. Part of https://github.com/odoo/odoo/pull/55959 task-2157252 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14[IMP] web_editor: review we-customizeblock-options borderstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55959 task-2157252
2020-08-13[FIX] web_editor, *: restore custom snippets thumbnailsqsm-odoo
*: website Since [1], the thumbnails of the saved snippets were not right anymore, all fallbacking to the default image. This is because snippets thumbs now use svg files instead of png and the snippet saving feature did not allow it. This commit fixes that and makes the feature more robust. - Allow to use any original thumbnail, and not only for website app. - Remove useless defaut image, a fallback for when the feature is broken is useless. - Identify snippets by key instead of by main class (possible since the new `data-snippet` attribute on snippets). [1]: https://github.com/odoo/odoo/commit/b7fe2bdae2f45372c0d538767a226a413b806f3f closes odoo/odoo#55896 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-13[IMP] web_editor, *: add snippets search filterxO-Tx
*: website Add a search bar at the top of the "Blocks" tab to filter snippets. Part of https://github.com/odoo/odoo/pull/55272 task-2309832 closes odoo/odoo#55272 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-13[IMP] web_editor: prevent removing data-oe attrs of snippets thumbsqsm-odoo
Before this commit, all the data-oe-* attributes were removed from the snippet panel on editor loading. Some were actually added then removed by the same function... probably for historic reasons. All of this is now useless, this commit takes also the opportunity to modernize that all code section and removes other code which was there for compatibility reasons too. Now, the data-oe-* on snippets thumbs are kept (as some will actually be used by upcoming commits). This commit just makes sure no data-oe-* is left on the snippet bodies themselves. Part of https://github.com/odoo/odoo/pull/55272 task-2309832
2020-08-10[IMP] web_editor: allow min, max and step param on range widgetqsm-odoo
Part of https://github.com/odoo/odoo/pull/47313 task-46147
2020-08-10[IMP] website, *: enable the parallax option for all snippetsqsm-odoo
*: web_editor, website_blog Unfortunately, this feature revealed a new batch of flaws in the editor widgets system so some hacks were made to make it work. We will always have the time to improve the pure technical side later. This commit also separates the notion of color filter from the notion of parallax. A color filter can now be applied independantly, when there is either a background image or a background video. Applying a color filter on top of a background video is actually a new feature. Applying a color filter on top of a background image is actually now achievable by two different ways: this new color filter layer or by applying the color transformation on the image itself via the related option. Depending on the user case, both could make sense at the same time, but more importantly: having a CSS color filter is useful for using those for default Odoo content (e.g. like the current contact us page where we use a cover banner with an image with a black filter on top of it: doing that without CSS color filter would mean to alter the image directly which would not be ok when the user changes the image). Also, sometimes you want the unfiltered image on a page and the exact same one but filtered on another (for example: forum images). Note: this commit also "fixes" an issue: the optimization feature for images when parallax was enabled was not available before. Part of https://github.com/odoo/odoo/pull/47313 task-46147
2020-08-07[IMP] web_editor: restore bootstrap's default monospace font-familystefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252 closes odoo/odoo#55645 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-07[IMP] web_editor: review dropdown designstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[IMP] web_editor, website: review color combination previewstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[FIX] web_editor: use border-radius on we-button-group edge buttons onlystefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[REF] web_editor, *: allow reusing links and buttons designstefanorigano (SRI)
*: website Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[FIX] web_editor: fix typos on variable definitionsstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[REM] web_editor: remove <img/> tag support in snippets librarystefanorigano (SRI)
Since v13, snippet's thumbs are rendered as background images using the 't-snippet' instruction. This code was kept for back-compatibility. Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[IMP] web_editor: review range widget dimensionsstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[IMP] web_editor: change editor panel default font-weightstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[IMP] web_editor: reposition snippets' thumbsstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[IMP] web_editor: make some color adjustments for editor panelstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55645 task-2157252
2020-08-07[IMP] web_editor, website: add background shapes snippet optionSamuel Degueldre
This commit adds a new snippet option allowing the user to choose one of a series of SVG shapes as their background, or to be overlaid over the background image of a snippet and to customize the colors of those shapes. Part of https://github.com/odoo/odoo/pull/53017 task-2210790 closes odoo/odoo#53017 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-07[IMP] web_editor, website, *: create background-type toggler optionSamuel Degueldre
*: website_blog Previously, background colors, images, and videos could all be applied on the same section, such that the image can be used as a fallback for the video, and the color as a fallback for the image. However, if you wanted to change the background color behind the background image, the background image would be removed. The background image and background video also shared the same widget to pick the image or video. This commit adds a background-type toggler, where the user can toggle the background color, image and video individually. It also makes the video picker into its own UserValueWidget, such that the user can pick both an image and video without overriding the other. Part of https://github.com/odoo/odoo/pull/53017 task-2210790
2020-08-07[IMP] web_editor: remove check icon for default active buttonsqsm-odoo
Before this commit, the enabled state of we-button element was a "pressed-like" background + a check icon. This check icon was then explicitely removed for we-button extension such as checkboxes and button groups' buttons. Now, the enabled state does not contains that check icon by default and it is explicitely added for selects' buttons. Part of https://github.com/odoo/odoo/pull/53017 task-2210790
2020-08-07[REF] web_editor: move normalizeColor function to we-utils for reuseSamuel Degueldre
Part of https://github.com/odoo/odoo/pull/53017 task-2210790
2020-08-07[FIX] web_editor: remove useless snippet preview notificationqsm-odoo
Before this commit, the 'snippet_option_update' event was triggered whether or not it was a preview update. In the preview update case, nothing was done, ever. This commit removes the preview notification. If it ever becomes useful, it can be restored at that moment. This commit actually solves a bug introduced by [1]: that snippet update notification is now triggered after a setTimeout delay to allow events to bubble before the UI update it will trigger (in non preview mode). The side effect this had was that, between each preview, the execution chain was deferred of a setTimeout delay between each step (even though previews do not update the UI). This was enough to allow for a paint refresh. So before this commit, if option C was selected, then the user hovered option A then option B, the option C was visually re-enabled between A and B. This won't be the case anymore after this commit. Long story short: restore no-flickering when previewing options. [1]: https://github.com/odoo/odoo/commit/2616c8950fd615561e720660bcc39e018f4061e4 Part of https://github.com/odoo/odoo/pull/55588 closes odoo/odoo#55588 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-07[IMP] web_editor, *: simplify UserValueWidget updatesqsm-odoo
*: website Before this commit, editor widgets were updated by 3 successive calls to methods 'setValue', 'updateUI' and '_updateUI'. The last two were in charge of updating the UI depending of the value that was set, only in specific condition (like "if the widget is not focused", "or not previewed", ...). This is now in fact useless: 'setValue' can be in charge of the UI update. Indeed, when a value is set on a widget there is no reason to not update its UI anymore. This was useful when the UI was updated on preview, which is not the case anymore. This could also be useful for widget with multiple options attached to them... but in those rare cases updating the UI multiple times (one time per option method) should not be a problem. Part of https://github.com/odoo/odoo/pull/55588
2020-08-06[IMP] website, *: review the 'options' tab of editor panelqsm-odoo
*: web_editor This will more probably change again in the future but this is a first step towards a hierarchized 'options' tab for the editor panel. Part of https://github.com/odoo/odoo/pull/55529
2020-07-30[FIX] website: prevent page flickering when modal is openedqsm-odoo
Commit [1] introduced a flickering when any modal was opened on the frontend. Indeed, it introduced the possibility to go into "fullscreen" mode, which makes the Odoo UI navbar and sidebar disappear. This is animated: the padding of the `<body/>` element is using a CSS transition... but when a Bootstrap modal opens, the padding-right is changed to compensate the scrollbar removal. This change now being animated, it creates a flickering. A generic solution was made: only animate what is animated for the duration of the fullscreen mode switch. [1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660 closes odoo/odoo#55210 X-original-commit: ccadb20c82a651e9ef87e818b898f3e9a081cacd Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-31[IMP] website_blog: add tag from frontend (editor left panel)DramixDw
Previously, you could only add a tag on a blog post from the backend. Here we're adding a way to add them from the left-panel so that it's easier for the user to add them. The long term goal will not be to reimplement complex view of the backend. This is actually already past the limit: we will need a way to instantiate views from the backend in the frontend in the future. Part of https://github.com/odoo/odoo/pull/52759 task-2267693 closes odoo/odoo#52759 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-30[IMP] web_editor: render inline svg icons, apply css stylestefanorigano (SRI)
Render inline SVG inside buttons in order to allow CSS styling. Define SVG icons design for normal/hover status applying the same colors as default text buttons. In order to support multi-colors SVGs, this commits will affect inner shapes in different ways: - '.o_graphic' shapes: will gets the UI btns colors (default/hover) - '.o_subdle' shapes: will gets a slightly reduced default text color Shapes without '.o_graphic/.o_subdle' classes will be rendered normally, as defined in the svg code. Part of https://github.com/odoo/odoo/pull/54913 task-2157252 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-30[IMP] web_editor: review snippets thumbs designstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/55089 task-2157252 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-28[IMP] website, *: move all google map options to left panelqsm-odoo
*: web_editor -> Introduce the we-gpspicker widget and improve the way the gmap lib is loaded (for Odoo / multiple snippets / ...). Part of https://github.com/odoo/odoo/pull/49101 task-2091396
2020-07-28[FIX] web_editor: carriage return in source modeNicolas Lempereur
Enter keypress browser event were removed in 3c372d1da8b. It was reintroduced in text fields with d2f024d2543 and this PR do the same and reintroduce it for source mode of FieldHtml (`html` widget). opw-2302605 closes #55066 closes odoo/odoo#55081 X-original-commit: b10ca1f6094b7c8e6e222aa0ea3d1f891e79379a Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-07-28[IMP] web: remove min date limitation of year 1900Harpritsinh Sisodiya
Before this commit, user could not selecta a date before year 1900. This was an historical limitation due to python < 3.2 that didn't support dates before 1900. After this commit, user can select any date, user can select any date from 01/01/0001. taskID: 2166761 Fixes #41788 Closes #43055 closes odoo/odoo#51406 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com> Co-authored-by: Mohammed Shekha <msh@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-07-28[FIX] web_editor: fix overlay when scrollingBenjamin Vray
Since the new effects on the header, the overlays do not overlap correctly after the page has been scrolled. Now we hide the overlays during the scrolling and show/recompute it after the scrolling. Part of https://github.com/odoo/odoo/pull/51446 task-2229127 X-original-commit: 209a94d8c4fcdc2e74860c9392fc14a35aec52ed
2020-07-22[FIX] web_editor: restore custom snippet delete buttonqsm-odoo
Clicking on the delete button of custom snippets was not working anymore since [1]. Indeed, that button is placed inside the snippet thumbnail which is the drag handle for the drag and drop feature. Since we now start the drag as soon as the mouse is mousedown-ed, then the click on the delete button cannot be intercepted. This commit solves the problem by placing the delete button out of the thumbnail element. [1]: https://github.com/odoo/odoo/commit/ab72fe6c4681f62dc670f1cf1ac6fa47abd301f6 closes odoo/odoo#54770 X-original-commit: dac122935ac5c20526e529b09bf019f15a290d59 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-22[FIX] web_editor, *: restore editor UI for selected CSS variablesqsm-odoo
*: website Commit [1] broke the UI for some options related to CSS variables when using Chrome. The commit made sure the string-value CSS variables are printed with quotes, so that the JS representation of the CSS values can distinguish them (strings = strings with surrounding quotes, others like colors, numbers, etc = strings without surrounding quotes). With chrome, the printed surrounding single quotes are read as double quotes for strange reasons though... so the value "a" was not considered equal to the value 'a'. This commit makes sure surrounding quotes are normalized. This is done through a new utility function to read CSS variables. This also makes sure the values are trimmed, and colors normalized. [1]: https://github.com/odoo/odoo/commit/3a34e39caa8544059dfb1888edc29c62c3efde31 closes odoo/odoo#54757 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-17[FIX] web_editor: fix small memory leak of destroyed snippet editorsqsm-odoo
In some complex cases, some snippet editors were destroyed but were still referenced in memory. E.g. 1) Reorder a snippet gallery image 2) The code is implemented in such a way that reordering create a new wrapping column for each image and moves the images in them. 3) This result in having the snippet editor linked to the old columns to be explicitely destroyed and removed from memory, but not the ones linked to the images as they are still in the DOM (just moved). 4) ... but the snippet editors linked to the images are children of the snippet editors linked to the columns. They are thus implicitely destroyed... but not removed from memory. closes odoo/odoo#54643 X-original-commit: e4bf37c7fc892cdba57f0acac8e10f5698184e67 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-17[FIX] web_editor: fix editor-lock after gallery image reordering againqsm-odoo
The bug was already solved with [1] but was reintroduced later for another reason. [1] solved the problem by checking that the current option is not destroyed before asking for an UI update thanks to a trigger_up (the option was destroyed because of image reordering). The bug is now reintroduced for the same basic reason: a new trigger_up was added between the potential option destroy and the destroy check, so if the option is destroyed, that trigger_up fails to be triggered and the editor is locked. This commit solves the problem once and for all, hopefully, with a more robust solution: only destroy options when none is being processed. That way we ensure that all trigger_up occuring during an option activation / update can be properly done. [1]: https://github.com/odoo/odoo/commit/9eeea4c4107dc15984c475582d5ee58a17cd2568 X-original-commit: 7770430f78ee9e122a732fa042226d362467158e