summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets
AgeCommit message (Collapse)Author
2021-05-31[FIX] website: remove "add image" button from the normal modeYounn Olivier
The "Add image" button was shown out of the editor mode when removing all images from a snippet. task-2469516 closes odoo/odoo#71424 X-original-commit: c1f4a39071c8f99499a7e1e5214362ac29df8881 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-29[FIX] website: hide cookie bar when entering edit modeArthur Detroux (ard)
Previously : Once a user enabled the cookie bar, it prevented him from dropping snippets in the main area of the page because the focus was on the cookie bar. Dropping snippets there has a confusing behavior and might make the user think the editor is broken. Reason : The cookie bar has an oe_structure class and takes over the body if it's not hidden or dismissed. The oe_structure allows to drop snippets. Fix : Hiding the cookie bar when user enters edit mode to avoid dropping snippets in it by mistake. task-2477430 closes odoo/odoo#68938 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-06[FIX] website: fix share snippet icons vertical alignmentYounn Olivier
Icons were not centered in the share snippet. Part of https://github.com/odoo/odoo/pull/65575 task-2446852
2021-03-09[IMP] website: make images wall editablexO-Tx
The goal of this commit is to make the Images Wall/Gallery snippet editable to be able to open the media dialog on "double-click" on images. Backport from https://github.com/odoo/odoo/pull/66544 closes odoo/odoo#67547 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-05[FIX] website: fix image gallery slider indexYounn Olivier
The gallery slider index was wrongly calculated when the gallery had no active element, as the jquery method .index() will still return -1 when no element is found. task-2472041 closes odoo/odoo#67389 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-22[FIX] website: show thumbnails for img gallery in tabs snippetAndrea Grazioso (agr-odoo)
- Go to the website - Drag a "Tabs" block on the page, you will have 3 example tabs - Click on the tab "Contact" and drag in the block "Image Gallery" - Add multiple images to the image gallery - Click on one of the other tabs so that the image gallery is hidden - Save The image gallery do not have the thumbails anymore. This occurs because when the carousel-indicator is hidden, jquery is not able to fetch its real length, so no icons are added. opw-2438513 closes odoo/odoo#66197 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-11[FIX] website, web_editor : image gallery miniatures are not updatedYounn Olivier
Description of the task : Make the website ui as consistent as possible by making some layout quick wins. Behaviour before the PR is merged : When changing an image in the image gallery snippet, its miniature is not updated. Desired behaviour after PR is merged : The miniature of an image of the image gallery is updated when the image is changed. The snippet options listens to the 'image_changed' event triggered by the media widget. task-2438556
2021-01-28[FIX] website, website_sale: preconfigure Dynamic Products w/ 1st optionBenoit Socias
Before this commit the Dynamic Products snippet was displaying a message box instead of its content until its template and product category were selected. After this commit the Dynamic Products snippet is automatically configured on drop with the first available template and the first available product category. The message box only appears if no product category exists yet. Also an "All Products" category was added as first element of the list to make the snippet usable before categories are defined. task-2439295 https://github.com/odoo/odoo/pull/64982 closes odoo/odoo#64982 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-01-27[FIX] website: fix popup heightBenjamin Vray
- The modal content of the popup snippet had a maximum height of 100% because of a global rule on modals. But, here, the scrollable element is not the modal so we dont want this rule. - For the popup to be scrolled correctly we also had to remove the rule that adds a fixed 100% height on modal-dialog and we added a min-height of 100% to correctly display the popup in the middle position. Part of https://github.com/odoo/odoo/pull/61998 task-2312878
2021-01-22[FIX] website: Warning message on website if dynamic snippet category deletedNasreddin (bon)
Issue - Install "Ecommerce" app - Go to 'Shop' page and edit it - Add a "Dynamic Products" block - Click on it to edit it : - Select any template - Select `Desks` as product category - Save - Go to "Website -> Configuration -> eCommerce Categories" - Delete the "Desks" category - Go back to Shop page Error : "Record does not exist or has been deleted". Cause The search domain is looking for child categories of dataset.productCategoryId (who does not exist anymore in the above case). `child_of` do a browse() to fetch the records, and therefore generate an error if category not found. Solution Log warning message if unexptected domain and return empty records set instead. This commit also reverts commit 0de069b8ca9fb005ba5b076984f5677de25889ee that generated the issue. opw-2440917 closes odoo/odoo#64847 Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-01-21[FIX] website: stop messing up countdown snippets on undoqsm-odoo
Like any snippet creating dynamic elements on page load, we need to use a special class on those elements to mitigate the undo/redo system's imperfections. closes odoo/odoo#64876 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-13[FIX] website: fix a typo in the js file of the snippet popupBenjamin Vray
We were using 'onExit' instead of 'mouseExit' as the value of the data-attribute 'display' in the .js code of the s_popup. task-2312878 closes odoo/odoo#64485 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-01-08[FIX] website: dynamic snippet products overflows on mobilenie
Steps: - Install eCommerce - Go to "Website" > "Go to Website" - Click Edit - Add the Dynamic Products block with a template and a category - Save - Switch to mobile view Bug: The right arrow of the block overflows and makes it possible to scroll the entire view sideways. Explanation: This commit puts back prev and next arrows onto the carousel. It also changes their design to be more visible over the content. The arrows are now smaller and displayed in clickable gray circles. opw:2415187 closes odoo/odoo#63911 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-01-06[FIX] website,website_sale: Dynamic products isn't visible if category deletedNasreddin (bon)
Issue - Install "Ecommerce" app - Go to 'Shop' page and edit it - Add a "Dynamic Products" block - Click on it to edit it : - Select any template - Select `Desks` as product category - Save - Go to "Website -> Configuration -> eCommerce Categories" - Delete the "Desks" category - Go back to Shop page Error : "Record does not exist or has been deleted". Cause The search domain is looking for child categories of dataset.productCategoryId (who does not exist anymore in the above case). `child_of` do a browse() to fetch the records, and therefore generate an error if category not found. Solution Check if dataset.productCategoryId exist before updating domain. opw-2416231 closes odoo/odoo#64090 Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2020-12-22[FIX] website: gallery cover img inside anchor is not well placednie
Steps: - Go to "Website" > "Go to Website" - Click Edit - Add an image gallery - Add an image to the gallery - Add the same image to the gallery - Click the first image - Click "Image Cover" in the side panel - Click on the Link button in the bottom-right of the side panel - Add a link and save Bug: The first image is not displayed in the same way as the second one. Explanation: The layout is not carried over to `img` when it's nested into an `a` tag. Redefining the layout on the `a` tag fixes the issue. opw:2394953 closes odoo/odoo#63675 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-12-16[FIX] website: gallery img inside anchor is too largenie
Steps: - Go to "Website" > "Go to Website" - Click Edit - Add an image gallery - Add an image to the gallery - Click the image - Click on the Link button in the bottom-right of the side panel - Add a link and save Bug: The image is too large. Explanation: The flex layout is not carried over to `img` when it's nested into an `a` tag. Redefining the flex layout on the `a` tag fixes the issue. This fixes portrait images: ```css height: 100%; width: 100%; ``` And adding this also fixes landscape and smaller images: ```css display: flex; ``` opw:2394953 closes odoo/odoo#63364 Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-10-22[FIX] various: not translate the close icon of notificationsBenoit Socias
Same change in several areas where translations existed: - website editor notification popup - elearning share popup - forum remediation filter popup - event registration attendees popup - portal rating popup - stripe payment error popup And many other locations where there were no translations yet "&times;" has been replaced by its UTF8 character. Also introduced aria-label where missing. Before this commit the close icon was included in translated resources. For example, in Spanish the "&times;" had been turned into "&veces;" thus not rendering an icon anymore After this commit the close icon is not a translated text anymore and remains an icon across all languages https://github.com/odoo/odoo/pull/60186 task-2312878 closes odoo/odoo#60186 Related: odoo/enterprise#14209 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-17[FIX] website, website_sale: fix race condition on dynamic snippetLaurent Stukkens (LTU)
Prior to this commit: A race condition could occur when dropping the dynamic product snippet creating a traceback "Cannot read property 'limit' of undefined". After this commit: Potential race condition has been removed from the code. closes odoo/odoo#61872 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-12[FIX] website: prevent traceback on countdown bg color resetqsm-odoo
When the layout background color was reset using the colorpicker of the countdown option, a traceback occurred. This was because the countdown widget relies on having a set color. The text and progress bar colors were working with unset colors but with inconsistent behavior. This commit fixes the traceback and makes the widget consistent: using the reset button on any color tells the countdown widget "use the color you want" and our countdown widget will simply set it to black. Thanks to @dwa-odoo and @jpr-odoo for original investigation. task-2227149 closes odoo/odoo#61657 X-original-commit: 7c29adc8bef633efd53dfd6557206e85a9f55aad Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-21[FIX] website: fix carousel blockquote width on mobileBenjamin Vray
Before this commit, the width of carousel blockquotes was too small to display correctly on mobile device. Part of #55857 task-2318526 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-14[FIX] website: equalize top and bottom paddings in items snippetBenjamin Vray
Before this commit, top and bottom padding were not the same in the items snippet. We also removed horizontal paddings on the section to keep the snippet columns aligned with other snippets. task-2312878 closes odoo/odoo#59960 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-13[FIX] website: remove left margin on mobile in showcase snippetBenjamin Vray
Part of #58552 task-2312878 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-13[FIX] website: disable overlay on arrows in gallery snippetBenjamin Vray
Before this commit it was possible to activate the overlay of the arrows of the gallery snippet (with themes because of animation options) task-2312878 closes odoo/odoo#59860 X-original-commit: d74b7618c750724c2efe448c57b07c6d6191e375 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-13[FIX] website: filter filter_opt of dynamic snippet by website_idBenoit Socias
Add a filtering by the contextual website_id when looking up available website_snippet_filters via an rpc route limited to logged in users but relying on a sudo to actually obtain the list of available filters. Before this commit filters were visible on the editor for all websites. After this commit filters are only visible on the editor of the website that matches their website_id. https://github.com/odoo/odoo/pull/59341 task-2312878 closes odoo/odoo#59341 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-12[FIX] website: remove useless specific scss for quotes carouselqsm-odoo
This reverts commit [1] which was fixed the right way and generically with [2]. [1]: f011c9aacf3a3010c436d4e4f408cd9ae265de1b [2]: https://github.com/odoo/odoo/commit/9c08e119b125b82e2c42dc944920dd8a96789e25 closes odoo/odoo#59787 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-08[FIX] website: add missing styles for social media iconsCocographique
Part of https://github.com/odoo/odoo/pull/59349 task-2327741
2020-09-29[FIX] website: fix table of content navbar links when scrollingBenjamin Vray
Before this commit active navbar links were not correctly updated with the scroll position. task-2312878 closes odoo/odoo#58505 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29[FIX] website: fix snippet blockquote with display coverBenjamin Vray
Adapt the snippet with the new color filter layer and fix the padding Part of https://github.com/odoo/odoo/pull/58850 task-2312878 closes odoo/odoo#58850 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29[FIX] website, *: fix background layer elsewhere than in a sectionBenjamin Vray
*: web_editor Before this commit, the elements (other than section) and with the background layer options avaible (shape, color filter, etc.) did not have the relative position added on their children. So all the children were hidden behind the layer element which is in absolute position. Part of https://github.com/odoo/odoo/pull/58850 task-2312878
2020-09-28[FIX] web_editor, website: fix menu colors in table of contentBenjamin Vray
Before this commit, the colors of the navbar in the table of content menu were not adapted to the color combinations system. With navbar in top position, the background and the colors of the links were using the same color. After this commit, the colors of the list-group-item links are also adapted with color combinations. task-2312878 closes odoo/odoo#58601 X-original-commit: a0dc17676c570887773854243bcb8cd8823359d5 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-25[FIX] website: prevent dynamic snippet flicker in edit modeLaurent Stukkens (LTU)
* Prior to this commit the dynamic snippet was flickering (destroy followed by init) because the parallax option triggers a _refreshPublicWidgets in the onFocus. As such each time the user clicks somewhere in the snippet the snippet desapears and reappears which can be confusing for the user. * After this commit, the parallax option will only trigger a refresh on snippets that are using parallax. This commit also prevent the user from selecting an element of the dynamic snippet as it is not customizable. task-2339246 closes odoo/odoo#57693 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-22[FIX] website: fix redirect message in the countdown snippetBenjamin Vray
Before this commit the redirect message was not added at the end of the countdown if the content-with option of the snippet was not Regular It was because we did an append on the '.container' class to add this message and that class is replaced when we change the content-with. task-2312878 closes odoo/odoo#58189 X-original-commit: f4e3cc6edda13d76368a38f3807be6ea5a279141 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-22[FIX] website: restore vertical alignement for half/full height snippetsqsm-odoo
Commit [1] broke the vertical alignement for half/full height snippets while trying to improve it. Mentioned commit's goal is kept: not messing up the alignement when enabling the scroll button and allowing those height and scroll options for the big boxes snippets, but now the content is still vertically centered (with or without scroll button now). If the user do not want it centered, he still has the possibility to increase the bottom padding. [1]: https://github.com/odoo/odoo/commit/9d5cd2c1747488524c107e6165d7c55d74b80606 Part of https://github.com/odoo/odoo/pull/58192 closes odoo/odoo#58192 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-22[FIX] website, *: properly stack the bg layers for big boxes snippetqsm-odoo
*: web_editor The big boxes snippet's content was appearing below the background layers (filters, shape, video, etc). Part of https://github.com/odoo/odoo/pull/58192
2020-09-22[IMP] website, *: move page scrollbar to #wrapwrapqsm-odoo
*: web, web_editor, portal, account, website_blog, website_forum This is probably not ideal to move the scrolling behavior out of the html element but this will be needed for the editor to not have a double scrollbar on the right. This is actually also useful for the scrollbar to appear under the purple odoo menu instead of its right. This commit, if to be reverted in the future, however contains many improvements to make the transition easier that should be kept: jQuery and Odoo functions to be able to scrollTo a specific element, get the top scrollable element, check if an element is scrollable, etc. Also, some magic was done: if some code tries to scroll to a specific scroll position via jQuery's scrollTop or animate functions on the html/body element, those will still work as intended (obviously, using the new utils to do that is however recommended). This commit also reviews our scroll behaviors to make them more robust and share the code. Part of https://github.com/odoo/odoo/pull/57975 task-2344227
2020-09-15[FIX] website, *: review scroll button and height option behaviorsqsm-odoo
*: website_blog - The scroll button option is now again available for all snippets, not only when the height is forced to 50% or 100%. Indeed, nobody would think to change that option if the snippet is already naturally tall and you could well want that scroll button on small-height covers. - The scroll button is now placed on top of the snippet content instead of below in its natural flow. This allows it to work with snippets like "Big Boxes" and actually prevent to miscenter the snippet content just by adding that scroll button. - Review the option UI and allow to control the spacing around the scroll button. - the "Big Boxes" snippet was at last adapted to work well with 50% and 100% height options. - The 100% height option has now associated JS so that the height is computed to use 100% minus the size of the header. Note: this may be backported to 13.2 where the option was introduced and where those improvements may appear essential for the feature to not be considered as buggy. Part of https://github.com/odoo/odoo/pull/57764 task-2224404
2020-09-10[FIX] website: image gallery do not open the media dialog if not emptyBenjamin Vray
Do not auto open the media dialog after the drop if there are images in snippets images wall and images gallery. task-2312878
2020-09-03[FIX] website: fix shapes overlapping blockquotesCocographique
task-2312878 closes odoo/odoo#57059 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-27[IMP] website: fix interaction between ToC snippet and header effectsqsm-odoo
This commit also add the possibility to indicate a "top gap" = a part on the top of the header which is not supposed to be shown once the page is scrolled (this is a leftover of the "preheader" task which was cancelled for something better, but that JS code still made sense as a possibility). Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: Benjamin Vray <bvr@odoo.com>
2020-08-19[IMP] website: improve dynamic snippet renderingLaurent Stukkens (LTU)
* Prior to this commit, the server side rendering of all the element was sent to the webclient as a block which is splitted there into several elements. * After this commit, the server side rendering sends an array of elements to the web client. closes odoo/odoo#56141 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-18[IMP] website, website_sale: add dynamic snippetsLaurent Stukkens (LTU)
* Implement new snippets that allow the user to choose a filter and a template. Three snippets have been created: - Dynamic Snippet: Displays the data in a grid format - Dynamic Carousel: Displays the date in a carousel - Dynamic Products: Let the user pick a product category and displays the products in a carousel task-2276740 PR #53175 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-18[MOV] website: move JS Qweb templates to snippets directoryLaurent Stukkens (LTU)
* Prior to this commit, Snippets XML Qweb templates files were located under website/static/src/xml/. * After this commit, Snippets XML Qweb templates files will be named AAA.xml (with AAA being the revision number) and located under the related Snippet directory '/website/static/src/snippets/SNIPPET_DIRECTORY/' task-2276740 PR #53175
2020-08-17[IMP] web_editor: add delete button on snippet overlayqsm-odoo
This commit adds a trash icon on the snippet overlay to delete the snippet without using the left panel button. task-2314805 closes odoo/odoo#55612 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-07-30[FIX] website: prevent flickering on image reorder in the image wallThanh Dodeur
Before this commit, reordering the images in the image wall was causing a flicker of the snippet options. It was caused by a forced deselection of the snippet (image) that is not necessary since 17e7e754cdd9f175f39c066484398a572ee0778d task-2307083 closes odoo/odoo#55090 Signed-off-by: Quentin Smetz (qsm) <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[MOV] website: move google map snippet from themes to communityThanh Dodeur
Improve the base code and adapt to new website features as well. Part of https://github.com/odoo/odoo/pull/49101 task-2091396 Co-authored-by: qsm-odoo <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[IMP] website: keep the selected image after moving it in galleryBenjamin Vray
Keep the selected image after moving it in the gallery. So that the options for moving the current image are always displayed. Part of https://github.com/odoo/odoo/pull/45096 task-2162952
2020-07-17[IMP] website: add dots indicators in gallery snippet optionsBenjamin Vray
Add dots indicators in gallery snippet options. Part of https://github.com/odoo/odoo/pull/45096 task-2162952