Skip to content
Snippets Groups Projects
  1. Sep 20, 2023
  2. Jun 15, 2023
  3. Jun 06, 2023
    • Benoit Socias's avatar
      [FIX] website: avoid having to scroll to access sub-menu after rotation · 02603d6e
      Benoit Socias authored
      
      When a sub-menu needs to be opened in the navbar, it sometimes gets
      nested within the navbar itself, making a vertical scrollbar appear
      instead of floating outside the navbar, above the top of the page.
      This happens if the navbar was opened in small screen sizes using the
      hamburger icon, then, after a rotation, the navbar is turned into its
      fully expanded version.
      
      This commit hides the hamburger menu if the collapse toggler becomes
      `display: none`.
      
      Steps to reproduce:
      - Add a sub-menu nested under the "Home" menu.
      - Open the developer tools, enable mobile view.
      - Select "Surface Pro 7" (Vertical 912x1368 - use "Rotate" if needed).
      - Open the menu with the hamburger icon.
      - Click on the "Rotate" button.
      - Open the sub-menu by clicking on "Home".
      
      => The menu was displayed within the navbar causing a vertical scrollbar
      to appear.
      
      task-3247552
      
      closes odoo/odoo#117899
      
      Signed-off-by: default avatarColin Louis (loco) <loco@odoo.com>
      02603d6e
  4. Apr 25, 2023
    • Benjamin Vray's avatar
      [FIX] website, website_form: fix anchor link redirects · fb087dbe
      Benjamin Vray authored
      Before this commit, links scrolling to an anchor with a special
      character did not work and displayed a traceback. The issue was that to
      check that the anchor is valid, we don't need to check that the anchor
      is a valid url as we have been doing since these commits [1], [2]. But
      we only need to check if the jQuery selector is valid to correctly
      target the element to which the page must scroll.
      
      Indeed, the anchor widget returns stuff like 'ok%C3%A9%25' when typing
      'oké%' wich is not valid jQuery selector. It has to be encoded to
      '#ok\\%C3\\%A9\\%25' to be valid and that's what this commit does.
      
      We also changed the way to display a new anchor to the user in this
      commit. Before, we showed the anchor unencoded in a notification and now
      we show it encoded. That way, if the user copies the anchor from the
      notification, it's the real anchor.
      
      Also, this commit detect if the success URL of the redirect of a from is
      the current page to perform a scroll to the anchor instead of a
      redirect. To make this comparison, we needed to add the url code of the
      language of the current page to the session info.
      
      Also, before this commit, the page froze when we clicked on the "submit"
      button of a form that redirected to an anchor that did not exist.
      
      [1]: https://github.com/odoo/odoo/commit/0abfaeda96c2eaa868cc7fc5fa1926dfa90fc420
      [2]: https://github.com/odoo/odoo/commit/b492bde6a121be1c15ed90ce0827fcfd72a12f5c
      
      
      
      task-2172312
      
      closes odoo/odoo#82059
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      fb087dbe
  5. Mar 03, 2023
    • Louis (loco)'s avatar
      [FIX] web, website: restore the use of the scroll to top button · 4ca793a3
      Louis (loco) authored
      
      Steps to reproduce the bug:
      - Go to the website and edit a page.
      - Make sure there is enough content to be able to scroll the page.
      - Go to the "Theme" tab and disable the "Show Header" option.
      - Click on the footer and enable the "Scroll Top Button".
      - Click on "Save".
      => Clicking on the "Scroll To Top" button does nothing.
      
      The "Scroll To Top" button is an anchor with its `href` set to `#top`.
      By disabling the "Show Header" option, the header is removed from the
      DOM and there is no existing element with `id=top` anymore. To fix
      this, the `scrollTo` function has been patched in order to be able to
      receive selectors as arguments. In the '#top' and '#bottom' case, those
      positions are known and always the same (either at the top of the
      document or the bottom of it) so there is no need to have the header or
      the footer present in the DOM in order to be able to scroll up to those
      positions.
      
      Now that the `scrollTo` function is able to scroll to the top or the
      bottom of the page even without header or footer, those two positions
      can always be suggested as internal link anchors during link edition.
      
      opw-3133464
      
      closes odoo/odoo#113117
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      4ca793a3
  6. Jan 25, 2023
    • Benjamin Vray's avatar
      [FIX] website, website_mass_mailing: fix parallax in modals · e97f6134
      Benjamin Vray authored
      
      Before this commit "parallax" animation was not working in modals.
      
      This commit adds a parameter to the animation effects to enable
      animations (triggered by the scroll) in the modals.
      
      Note that for the "Newsletter" popup we have hidden the "parallax"
      options. To make them work, it would be necessary to review the
      structure of the "Newsletter" popup so that the vertical scrollbar is in
      the same location as the "s_popup" snippet (on the ".modal" element).
      
      task-2971402
      
      closes odoo/odoo#99894
      
      Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
      e97f6134
  7. Dec 15, 2022
  8. Nov 24, 2022
    • Guillaume (gdi)'s avatar
      [FIX] website: scroll to the next visible element · 076d7ac7
      Guillaume (gdi) authored
      
      Before this commit, the buttons to scroll to the next element might not
      work if the next element was invisible.
      Steps to reproduce the bug fixed by this commit:
      
      (Note that these steps are only reproducible from 15.0. We decided to
      merge this fix in 14.0 to be custo-friendly)
      
      - Install two languages on a website
      - Drop a cover block (1), with a height of 100% and a scroll down button
      - Drop a new block (2) only visible for language B below the block 1
      - Drop a new block (3) visible for everyone below the block 2
      - Save and go to the site in language A
      - Click on the scroll down button
      
      => No scroll at all while the user expects to scroll to the block
      visible to everyone (3). This commit fixes that by making the user
      scroll down to see the next visible element.
      
      opw-2967706
      
      closes odoo/odoo#105334
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      076d7ac7
  9. May 09, 2022
    • qsm-odoo's avatar
      [FIX] website: ensure lazy loaded images are loaded on zoomed Chrome · b14f33bc
      qsm-odoo authored
      
      Before this commit, some images were never appearing on Chrome,
      especially when using the 90% zoom.
      
      Steps to reproduce (on a 1920x1080 screen and using Chrome):
      1. Edit the homepage
      2. Add a "Cover" block and setup a 50% min-height on it
      3. Add 2 "Columns" blocks below the "Cover" block
      4. Set the width of the first "Columns" snippet's first image to the
         recommended size (690px)
      5. Save
      6. As a public user, set the browser zoom to 90% and go to the page
         (you may need to reload the page again so images are in cache)
      
      => The first image of the second "Columns" block never appears.
      
      opw-2731507
      
      closes odoo/odoo#90905
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      b14f33bc
  10. Apr 26, 2022
  11. Apr 21, 2022
  12. Jul 16, 2021
  13. Nov 15, 2021
  14. Sep 21, 2021
  15. Jul 30, 2021
    • Benjamin Vray's avatar
      [FIX] website, *: prevent bottom fixed elements from hiding buttons · 1cdd1f2f
      Benjamin Vray authored
      
      *: web, website_livechat, website_sale_comparison
      
      Before this commit, bottom fixed elements (e.g. the livechat button)
      hid the buttons to go to the next step in website sale when these
      buttons are located at the bottom of the page, on some screen sizes.
      
      After this commit,
      
      - A bottom fixed element is hidden if this element hides a button at
      the bottom of the page.
      
      - Bottom fixed elements are hidden if a modal is open
      to prevent it to hide buttons or any important part of the modal.
      
      task-2501400
      
      closes odoo/odoo#69296
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      1cdd1f2f
  16. Jun 23, 2021
    • Younn Olivier's avatar
      [FIX] website: fix scrollButton option on events · 439381aa
      Younn Olivier authored
      
      On events, or in every part of the website that was built without
      sections, the scroll button of a dropped snippet was not effective.
      
      This was because we were targeting the next section, which was not there
      in the previous case. Yet, we want it to scroll to the next element,
      even if it is not a section.
      
      task-2566338
      
      closes odoo/odoo#72647
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      439381aa
  17. Apr 10, 2021
    • qsm-odoo's avatar
      [FIX] website: restore scroll effects in custom code · 21650ce3
      qsm-odoo authored
      
      The website scroll effects using the `AnimationEffect` Odoo API were not
      working anymore if custom code enforces the html element as the
      scrolling element. Indeed in that case the scroll event handlers were
      now attached to the html element itself while it needs to be the window
      in that case.
      
      This may be something to fix at the source (the `getScrollingElement`
      method). This will be checked later.
      
      closes odoo/odoo#69083
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      21650ce3
  18. Oct 19, 2020
    • qsm-odoo's avatar
      [FIX] website: restore footer slideout effect on Firefox · c8fc4a11
      qsm-odoo authored
      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: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      c8fc4a11
  19. Sep 29, 2020
  20. Sep 22, 2020
    • qsm-odoo's avatar
      [IMP] website, *: move page scrollbar to #wrapwrap · 4e7be698
      qsm-odoo authored
      *: 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
      4e7be698
    • qsm-odoo's avatar
      [FIX] website, *: make scroll to anchor consider the fixed header · 416b1258
      qsm-odoo authored
      *: 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
      416b1258
  21. Sep 15, 2020
    • qsm-odoo's avatar
      [FIX] website, *: review scroll button and height option behaviors · 9d5cd2c1
      qsm-odoo authored
      *: 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
      9d5cd2c1
  22. Aug 27, 2020
  23. Aug 10, 2020
    • qsm-odoo's avatar
      [IMP] website: review parallax option UI · 2f0bf44c
      qsm-odoo authored
      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: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      2f0bf44c
    • Benjamin Vray's avatar
      [IMP] website: add a direction option for the parallax · 5523e5aa
      Benjamin Vray authored
      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
      5523e5aa
    • qsm-odoo's avatar
      [IMP] website, *: enable the parallax option for all snippets · 42e1d4ca
      qsm-odoo authored
      *: 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
      42e1d4ca
    • Francois (fge)'s avatar
      [FIX] website: replacement linkedin share link by the 2020 version · 6286f8aa
      Francois (fge) authored
      
      closes odoo/odoo#55044
      
      Related: odoo/enterprise#12064
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      6286f8aa
  24. Jul 17, 2020
  25. Jun 30, 2020
  26. Jun 17, 2020
    • qsm-odoo's avatar
      [FIX] website: properly go to fixed anchors · 5e89b747
      qsm-odoo authored
      
      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: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      5e89b747
  27. Jan 30, 2020
  28. Jan 08, 2020
    • Samuel Degueldre's avatar
      [IMP] website, *: add full height option and scroll down button · d513c662
      Samuel Degueldre authored
      
      *: 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: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      d513c662
  29. Dec 31, 2019
  30. Dec 18, 2019
Loading