summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
AgeCommit message (Collapse)Author
2020-10-20[FIX] website: fix add slide carousel snippetBenjamin Vray
Before this commit, when adding a new slide, the data-target of the new indicator was wrong because we were using the slide ID instead of the carousel ID. task-2318526 closes odoo/odoo#60381 X-original-commit: ac7a117ccc64df54cfd271ee4c4b62ef49dd71ff Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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-14[FIX] website: remove searchbar from kanban themeJeremy Kersten
closes odoo/odoo#60055 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-14[FIX] website: show the correct value for hoverable dropdown optionqsm-odoo
Before this commit, the hoverable dropdown option was broken because we changed the option selector to the navbar element instead of the header element. But we forgot to care about the data-select-class which adds a class on the header. This commit fixes the issues by changing the $target back to the header element for the related option as the fact it is linked to the navbar element is only so that the options appear in a different section, on navbar click. Part of https://github.com/odoo/odoo/pull/59842 task-2312878 closes odoo/odoo#59842 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: theme selector, no primary linkJeremy Kersten
Before this commit, the close button in enterprise version was primary (green). Now we make it black to avoid to have this button like a CTA, and in the same time, while we have already hacked all this kanban view, we continue changing the active breadcrumb to a nearly black closes odoo/odoo#59543 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-08[FIX] website: get visitor tz directly from cookieDavid Beguin
Since tz is now (from 6eb4762fee20a158023d774a90e7ee90c2cacec5) added to the client cookie, visitor timezone can directly be set when creating the visitor, using the request. Jstz can be removed as even for module in ENT that used this lib, we can get the timezone using Intl lib instead. This will also reduce the number of request made only to get visitor's timezone. This commit reverts part of 17e84025239ed78716ed5d5d92c0ee0e10fbfb29 Linked ENT PR: 12963 Task ID: 2333825 closes odoo/odoo#57103 Related: odoo/enterprise#12963 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.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-10-05[FIX] website: matches icon apps to the app switcherThanh Dodeur
This commit makes it so that the icons of the website new-content menu are closer to the icon of the app they are related to. task-2329291 closes odoo/odoo#57746 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-29[IMP] web_editor: add assets for jabberwock editorGoaman
This commit lays the groundwork for the new editor by adding empty files to the assets in order to change them later on. The new editor is not stable enough to be merged right now, but delaying it to 15.0 would be problematic as the current editor has many bugs that we are unable to fix because of how summernote interacts with browser-dependent code as well as all the hacks that were done on top of it for Odoo since 8.0. closes odoo/odoo#58678 Signed-off-by: David Monjoie (dmo) <dmo@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-28[FIX] web_editor, *: show text tools in style tab onlyqsm-odoo
*: website As the text editor is still the summernote one, this improvement was made possible through a series of hack. It has to be reviewed once the new editor is ready. This makes the text tools only appear in the style tab by switching to it as soon as the summernote tools are updated. To prevent flickering, css and js hacks had to be made. This also moves the undo/redo buttons in the top bar with another hack: those simulates click on the hidden summernote ones. Part of https://github.com/odoo/odoo/pull/58638
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-24[FIX] website: edit master wrongly computedJeremy Kersten
In case you don't have the trailing slash and are on your homepage, the indexOf will return -1 and you will be redirectected to the pathname.substr(-1) Now if you don't have trailing slash in your url after position 1, we don't subtract anything. domain.com/fr_BE Before this commit: => redirect to domain.com/E After thi comit => redirect to domain.com task-2345490 closes odoo/odoo#58457 X-original-commit: ada2e2ce68dbc8b1df701691d9d3e958fef4ea31 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-24[IMP] website: rename 'choose a theme' to 'pick a theme'Jeremy Kersten
closes odoo/odoo#58391 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.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: restore top editor bar for translate modeqsm-odoo
The text tools were moved in the right panel with a temporary solution but as there is no right panel in translate mode, the text tools were just floating summernote-way. This commit restores the top editor bar in that case while waiting for the new editor. Part of https://github.com/odoo/odoo/pull/58347 closes odoo/odoo#58347 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[FIX] website: remove console.logstefanorigano (SRI)
Commit [1] introduced the console.log by mistake. [1]: https://github.com/odoo/odoo/commit/eb34a7841978aea5c3f2d04121fd0e6adda94e3b#diff-24b0433302053618c5b742f3eded1d67R2153 task-2335267 closes odoo/odoo#57942 Part-of: #57942 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-22[FIX] website: reorder/reword header's optionsstefanorigano (SRI)
task-2335267 part-of: #57942
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-22[FIX] web_editor, *: wait for drag & drop ending before savingqsm-odoo
*: website This is not the cleanest of fixes because the original code have to be refactored first but this solves the problem we had *sometimes* when drag and dropping a snippet then immediately saving (only saw the bug in automatic tests): same as all snippet options, the operation had to be mutexed so that saving is done after its full execution. Part of https://github.com/odoo/odoo/pull/57975 task-2344227
2020-09-18[IMP] website: typo in helper tourJeremy Kersten
2020-09-18[IMP] web_tour: remove consume button option in step contentJeremy Kersten
This reverts commit 27158a0f612897e41601bf9e9d20861e9b87279f Why keep a new option now that it has been developped ?
2020-09-18[IMP] website: change theme loader during install/updatexO-Tx
This commit attempts to update the old "website.ThemePreview.Loader" style by integrating a loading animation when theme is being installed Common code used to add loader and install the selected theme in both ThemePreviewController & ThemePreviewKanbanController. (preview theme and pick a theme) task-2338062 closes odoo/odoo#57682 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-16[IMP] web_editor, *: make media-dialog search odoo media-librarySamuel Degueldre
*: website, web_unsplash, website_blog We have recently created an odoo media library that exposes a public API for searching for open-source media, including dynamic SVGs that can be used with the dynamic background-shape system to create illustrations whose colors can be changed by the user. This commit adds the corresponding client-side functionalty: search for the images in the media-library, creating a corresponding attachment when selected, as well as an option to customize the colors of the dynamic SVGs. In the process, adaptations have been made in the web_unsplash module to avoid duplicating code and to adapt code that was making assumptions that are no longer valid. To make new users more aware of this feature, all default images have been hidden from the media-dialog, so that the user is prompted so search for images. Some tests and tours that were relying on having default images in the media-dialog (eg in website_blog) have been adapted to match. task-2316651 Linked to: odoo/iap-apps#235 closes odoo/odoo#56479 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-16[IMP] web_editor, website: improve editor loading effectsqsm-odoo
- Share the code for tab switching loading and slow option loading. - Now add a loading effect over the content when the content is changed and a loading effect over the editor panel when the editor panel is being changed Part of https://github.com/odoo/odoo/pull/55614 task-2213114 closes odoo/odoo#55614 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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-14[FIX] website: fix google map snippet tracebackThanh Dodeur
before this commit, when selectioning the snippet with an invalid API key, a traceback was triggered and the snippet was destroyed. task-2338730 closes odoo/odoo#57615 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-11[IMP] website: add helpers for theme tourJeremy Kersten
This commit makes it easy to generate a tour depending on a theme. As each theme will have different tour which will recreate the theme preview, this feature is able to create all of them. task-2172208
2020-09-10[IMP] website: remove welcome tips on homepageJeremy Kersten
Now we only support tour in edit mode already. We win a click on onboarding., and after the install of a theme It avoid to have 2 tips on the same page that can be confusing
2020-09-10[IMP] website: remove extra step of banner tourJeremy Kersten
Now that we will write tour by theme, this part is useless. We just keep the old steps that will be not covered by future theme tour. task-2172208
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: reorganize header options UI + implement shadow & bordersqsm-odoo
Also change the default behavior of all shadow options: now switching inset / outset resets to default bootstrap values. Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: Cocographique <nmi@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, *: review existing navbar templates and templates systemCocographique
*: portal, website_sale, website_sale_wishlist Portal-without-website header is now more basic, without the need of a collapsed element. It is then entirely replaced when website is installed with header templates, t-calling all the main parts. 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-24[IMP] website: implement body image as a SCSS variableqsm-odoo
This is unfortunately replacing old hacks by new ones but using SCSS variables for this is more consistent with the rest of our website customization possibilities. The hack here is for the UI which is controlling two SCSS variables at the same time (body-image and body-image-type). This has to be improved. closes odoo/odoo#56420 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22[IMP] web_editor, website: introduce foldable zones in the editor UIqsm-odoo
Now any set of widgets and rows can be placed in a we-collapse element so that those elements can be foldable. The first element inside (or the mentioned "string" on the we-collapse element itself) is used as the always shown element (with a toggler on its left to toggle the visibility of the other items). we-collapse inside other we-collapse is supported as well. Limitations / Other infos: - The use of '⌙' and &emsp; characters is not automatic (yet?). Sometimes it actually make sense to use them without a we-collapse or to not use them in a we-collapse. - The use of we-collapse is limited to widgets inside the same option. So unfortunately, there is no current way to add all bg image options in a folable section as those contain many different options. Maybe in the future. Part of https://github.com/odoo/odoo/pull/56350 closes odoo/odoo#56350 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>