summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/content
AgeCommit message (Collapse)Author
2020-10-19[FIX] website: restore footer slideout effect on Firefoxqsm-odoo
For some strange reason, the footer slideout effect was not working on Firefox anymore. The height of the footer is not understood by Firefox sticky implementation which it seems to not understand because of the combination of 3 items: the footer is the last :visible element in the `#wrapwrap`, the `#wrapwrap` uses flex layout and the `#wrapwrap` is the element with a scrollbar. As neither of the last two items can be changed, this commit fixes the problem by adding a pixel div element in the DOM after the footer on page load, if the slideout effect is enabled. This is obviously not ideal but solves the problem while waiting for another solution. Part of https://github.com/odoo/odoo/pull/60271 task-2312878 closes odoo/odoo#60271 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12[FIX] website: fix menu direction of header dropdownsBenjamin Vray
Before this commit, the menu direction of header dropdowns was related to the window width but it was wrong because of the right panel. We also enable it in editor mode. task-2312878 closes odoo/odoo#59783 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12[FIX] website, *: keep logged user buttons outside the autohide menuBenjamin Vray
*: portal The dividers were removed with the new header templates but we still needed them to know which items do not need to be folded in the auto-hide menu. Instead of adding these dividers again, we added a new class for these elements. part-of: #59640 task-2312878 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12[FIX] website: enable autohide menu in editor modeBenjamin Vray
Before this commit, autohide menu was disabled in editor mode. This was thus not really wysiwyg for users anymore. part-of: #59640 task-2312878
2020-10-09[FIX] website: fix option to open mega menu dropdown on hoverBenjamin Vray
Before this commit, the option to open dropdown on hover did not work with mega menu. task-2312878 closes odoo/odoo#59618 X-original-commit: 9b3b1c623867d3618220d8bd8a729701ae46448b Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-08[FIX] website: allow transparent menu to work with hamburger templatesqsm-odoo
For those templates, the transparent option was broken at some point: we have to detect the hamburger is opened so that it is not transparent anymore when opened. Part of https://github.com/odoo/odoo/pull/59349 task-2327741 closes odoo/odoo#59458 Related: odoo/design-themes#395 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29[REM] website: remove the folded list snippetAntoine Guenet
2020-09-29[FIX] website: update main padding top before making the header affixedqsm-odoo
When the header goes affixed, a compensating padding-top is added on the content so that the scroll does not flicker. That padding-top was added a bit too late and was enough to mess up the scroll on pages where the content is about the height of the viewport: the header goes affix, the scrollable content becomes smaller, the padding top is added, a scroll is detected, the header is un-affixed since above scroll point -> bug. If the padding top is added first, then there is no problem. Note: the scroll effects code could probably use some refactoring. Part of https://github.com/odoo/odoo/pull/56936 task-2312878 closes odoo/odoo#56936 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29[FIX] website: fix full height snippet optionBenjamin Vray
Before this commit the height of a snippet with the full height option enabled was not correctly updated. task-2312878 closes odoo/odoo#58760 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-24[FIX] website, *: review modal behaviors with right-panelizationqsm-odoo
*: web, web_editor Since the right-panelization made with [1], the modals were not compensating the body scrollbar when opened anymore and the backdrop was misplaced. This commit fixes the problems generically, to support modals with non-body scrolling. [1]: https://github.com/odoo/odoo/pull/57975 closes odoo/odoo#58414 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-23[FIX] website: handle affixed header in full screen modeqsm-odoo
The affixed header was not properly repositioned in editor full screen mode (introduced in 13.4). closes odoo/odoo#58247 X-original-commit: 7502c8aa6e5422b1ecf446002e187fa2f7ca3aa7 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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-22[FIX] website, *: make scroll to anchor consider the fixed headerqsm-odoo
*: website_blog This was fixed and rebroken quite a few times. Hopefully, with this commit and the next ones, the feature will be more robust: when clicking on a link anchor, the animation now considers the fixed header height if any *even if the header becomes fixed during the animation*. Part of https://github.com/odoo/odoo/pull/57975 task-2344227
2020-09-22[FIX] website: correctly add o_top_fixed_element class on headerqsm-odoo
The class is supposed to be placed on elements which are absolutely positioned over the main scrolling element at the top of the page. It was wrongly placed on headers as soon as they become fixed while they should have been placed on headers as soon as they become fixed *and* over the main scrolling element. 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-08-27[IMP] portal, website: add the ability to have a lang selector in headerqsm-odoo
Part of https://github.com/odoo/odoo/pull/56427 task-2264627 closes odoo/odoo#56427 Related: odoo/design-themes#346 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-27[IMP] website, *: add 'hamburger full' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add off-canvas and other hamburger menu optionsstefanorigano (SRI)
*: web, portal Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.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-27[IMP] website: add ripple effect option for buttonsstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[FIX] website: restore website menu loading with imagesqsm-odoo
Since the images are now lazy loaded by default, the website menu was not loaded correctly anymore when a mega menu was enabled and that there was an image inside. Indeed, the menu loading waits for all images to be loaded to compute the menu that should be in a dropdown when there are too many. As the ones in the mega menus are hidden when the menu is closed, the new lazy loading feature does not load them... which makes the menu loading wait for something that is not being done. This commit solves the problem by not waiting for images inside mega menus. This could actually be done as a stable fix in stable versions as there is no point waiting for those particular images in any case. This will be only merged in master as it is not strictly a bug though, at least for now. Part of https://github.com/odoo/odoo/pull/56427 task-2264627
2020-08-27[REF] website: make clearer code for the website menu loadingqsm-odoo
Part of https://github.com/odoo/odoo/pull/56427 task-2264627
2020-08-14[IMP] website, web, portal: new options language selector in footerBenjamin Vray
Add an option to display the language selection inline or with a dropdown. Add an option to choose if language labels are flags, text or both. Part of https://github.com/odoo/odoo/pull/55300 task-2203383 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-10[IMP] website: review parallax option UIqsm-odoo
Instead of two select: Parallax: none/fixed/very slow/slow/... Direction: Bottom to top/top to bottom We now have: Parallax: none/fixed/bottom to top/top to bottom Intensity: slider Part of https://github.com/odoo/odoo/pull/47313 task-46147 closes odoo/odoo#47313 Related: odoo/design-themes#335 Related: odoo/upgrade#1553 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-10[IMP] website: add a direction option for the parallaxBenjamin Vray
Add a setting direction for the parallax. "Top to Bottom" or "Bottom to top". The new one was actually a specific theme option that we lost somewhere between Odoo 8.0 and Odoo 13.0. This is now standard. 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-10[FIX] website: replacement linkedin share link by the 2020 versionFrancois (fge)
closes odoo/odoo#55044 Related: odoo/enterprise#12064 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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-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] website: fix header effects issues with hamburger menuBenjamin Vray
Do not update to main padding-top when opening an hamburger menu with a fixed header. Close the menu hamburger if the page is scrolled. Part of https://github.com/odoo/odoo/pull/51446 task-2229127 closes odoo/odoo#55045 X-original-commit: c06218408df4c8ec2fa3902e0cc03468c32dd36d Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-17[IMP] website: review gallery snippetBenjamin Vray
Review the gallery snippet. It has been improved in multiple ways. Added new options, etc. Part of https://github.com/odoo/odoo/pull/45096 task-2162952
2020-07-13[IMP] web,*: do not deploy services in testsAaron Bohy
*mail,point_of_sale,web_editor,website In the tests, required services are deployed for each test independently. There is no need to have, in additon, all services deployed globally. Worse, it could conflict and lead to unexpected results. This commit ensures services are no longer deployed globally in tests. It turns the module 'web.env' into a declarative module with no side-effect, by moving the service deployment to main.js, which isn't added to the tests page. Task 2287397 closes odoo/odoo#53817 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-06-30[IMP] website, *: add new footer effect optionsBenjamin Vray
*: web Part of https://github.com/odoo/odoo/pull/49142 task-2229551 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-17[FIX] website: properly go to fixed anchorsqsm-odoo
Since the header effects are now done without duplicating the header into a fixed element, link anchors towards it were not working anymore as they could be redirected to the fixed-positioned header. This commit solves the problem "generically" for all fixed elements (I am not sure any link towards a fixed element except the header makes sense though). closes odoo/odoo#53156 X-original-commit: 1a2827f80bd7a66d4190977b22d4bc5846737b08 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-12[IMP] *: update notifications to optional titleJulien Mougenot
closes odoo/odoo#52826 Related: odoo/enterprise#11084 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-25[FIX] web, *: fix keyboard overlay staying active when alt-tab/clickingSamuel Degueldre
*: website The keyboard navigation mixin was initially only used in the web-client, because of this, some of the logic for hiding the overlay was put inside of the web-client. We recently made keyboard navigation available on website [1]. The handlers that would hide the overlay when alt-tabbing or clicking on the page were not registered. This commit fixes that by making the keyboard navigation mixin register the overlay-hiding handlers itself. [1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660 closes odoo/odoo#50122 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-23[FIX] website: prevent infinite loop in header animation codeqsm-odoo
Bug introduced by [1]. When the header starts being animated, the main padding-top of the page is adapted automatically with JS... but that JS was actually starting a never-ending loop. This is fixed now. [1]: https://github.com/odoo/odoo/commit/3defe35a0e4e2097115633797df6898ac2724c66 closes odoo/odoo#51726 X-original-commit: 07ed02608b8f4e3744c5e69c2651aa3df8bdd943 Signed-off-by: bvr-odoo <bvr-odoo@users.noreply.github.com>
2020-05-14[REM] website: remove lazy template callMartin Trigaux
Was making a render_template on an arbitrary template Does not seem to be used anymore
2020-04-16[IMP] website, web: add fullscreen mode and frontend keyboard shortcutsSamuel Degueldre
While the edit mode interface is full of useful things, it also adds a lot of clutter, and alters the page's width and thus, its layout. This commit adds keyboard shortcut for website editors to use, and allows them to enter a "fullscreen" mode that hides the editor interface while remaining in edit mode, allowing the user to have fewer distractions while editing text content, and a closer rendition of the page's final layout while editing. For this, keyboard shortcuts were required, and a few other useful shortcuts have been added, such as alt-1,2,3 for the navbar, just like in the backed. task-2126915 closes odoo/odoo#46953 Related: odoo/enterprise#9295 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-31[IMP] website: add an option for hoverable dropdowns on headerBenjamin Vray
Add an option to open dropdown menus on hover instead of click. Part of https://github.com/odoo/odoo/pull/38950 task-2087641
2020-03-31[IMP] website, *: add and review header visibility optionsBenjamin Vray
*: portal Adding a choice of several header behaviors (fixed, fade out with scroll, etc.). Review the way those animations works in mobile/desktop and now perform them without duplicating the header DOM element. Also allow to hide of adapt the size of the logo when the page is scrolled. Part of https://github.com/odoo/odoo/pull/38950 task-2087641 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-02-26[FIX] website: typo in toastr 'Congratulations'Romain Derie
Missing a `s`. Congratulation > Congratulations (fdba9a878f4b02). task-2144335 closes odoo/odoo#46380 X-original-commit: 7d743029dde14fac18fb3b5331c43fe1d940a772 Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-12[FIX] website: prevent undefined in publish toastrRomain Derie
d92f76592c19 introduced a toastr when publishing a record. It was designed for the topbar publishing toggle button, but some other templates ended up also using that feature. As those templates were missing `data-description` which contains the model business name, it would show `You've published your undefined`. This is only related to a very few places having a publish button inside the page. This commit fixed that by ensuring every publish button template have the necessary code. Also, a fallback is added in case tha `data-description` is missing somehow. task-2191735 closes odoo/odoo#45141 X-original-commit: 4ab6e36b739060eb16e97eac502fd087a072abf3 Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-03[IMP] website(_blog/_slides): show a toaster when a record is publishedRomain Derie
This commit shows a toaster when publishing a record through the toggle in the topbar. The `_description` field is used to do that, as it is supposed to contains a 'business oriented' descriptive name, see task-37311. Indeed, this field is used in studio and in mail templates. task-2144335
2020-01-30[IMP] website: add a new snippet table of contentBenjamin Vray
New snippet table of content with a sticky navbar with links related to headings in content. Part of https://github.com/odoo/odoo/pull/40690 task-2118980 closes odoo/odoo#40690 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-30[IMP] website: set anchor offset by fixed header heightBenjamin Vray
When you click on an anchor link, this commit ensures that the scroll is in the correct place if there are fixed menus on the page. Part of https://github.com/odoo/odoo/pull/40690 task-1894456
2020-01-21[FIX] website: bit which blows up during testsXavier Morel
2020-01-08[IMP] website, *: add full height option and scroll down buttonSamuel Degueldre
*: website_blog, website_event This commit adds a "Height" option to sections, allowing them to have a minimum height of the user's choosing (either full screen height or half screen height, similar to blog covers). Enabling the full screen option also allows the user to add a "scroll down button" that will scroll down to the next section, also similar to blog covers. As such, the classes doing the corresponding things in website_blog and website_event have been renamed to reuse the same code. task-2155710 closes odoo/odoo#41623 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-31[REF] website, *: remove unused class oe_custom_bgSamuel Degueldre
*: web_editor, website_forum, website_mass_mailing, website_slides This class no longer does anything. Part of odoo/odoo#41561 task-2155808 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-18[FIX] website: fix background video widget on mobileJason Van Malder
Issue - Download the customer db: stargue-inc - Go on the website in mobile mode Traceback & the second item in the carousel is not displayed. Cause Traceback: we use `this.$iframe` without checking if it's defined Second item not displayed: the first video promise is overriden by the second video promise. Solution Check if this.$iframe is defined and resolve the old promise instead of overriding it. OPW-2152690 closes odoo/odoo#42139 X-original-commit: f5f569b4705f37865cb976a4df10a0d9f388fae2 Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>