Skip to content
Snippets Groups Projects
  1. May 15, 2023
    • xO-Tx's avatar
      [FIX] website: correctly mark translatable attributes · 8b522e5c
      xO-Tx authored
      
      Steps to reproduce:
      
      - Go to a website page > Add a 'Form' block > Set an input "Placeholder"
      value.
      - Go to the page (in 'edit_translations' mode) > The translation of the
      input "Placeholder" attribute doesn't mark the input as translated and
      even after saving the translation, the input is still marked as
      "to_translate".
      
      The goal of this commit is to fix this issue by extending the same
      behaviour on the translated `<select/>` options (using `.oe_translated`
      class) and setting the right translation state on the input from the
      linked attribute translation `<span/>`.
      
      task-3323245
      
      closes odoo/odoo#121128
      
      Signed-off-by: default avatarBenoit Socias (bso) <bso@odoo.com>
      8b522e5c
  2. Apr 27, 2023
    • xO-Tx's avatar
      [FIX] website, tools: make select options translatable · 57d7e75b
      xO-Tx authored
      
      Steps to reproduce:
      
      - Go to a website page > Add a 'Form' block > Add a new 'Selection'
      field.
      - Go to the page (in 'edit_translations' mode) > The selection field
      options are not translatable.
      
      The goal of this commit is to make the select options translatable
      by adding an intermediate `.o_translation_select` element.
      
      This element will handle option's text translations from the linked
      `<select/>`. The final values are copied to the original element
      right before save.
      
      opw-3233360
      
      closes odoo/odoo#117519
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      57d7e75b
  3. Apr 03, 2023
  4. Oct 25, 2022
    • Romain Derie's avatar
      [IMP] website: add possibility to self host google font · fa362f72
      Romain Derie authored
      This is a backport of [1] from Odoo 16
      
      -----------------
      
      Before this commit, the only possibility when adding a google font was
      to use google servers to serve the font.
      
      This was not ideal as some people really want to serve it themselves
      without the need of their visitors to reach google servers.
      That's especially true since recently where it seems like German clients
      are receiving letters about that to tell them it's illegal and this
      should be changed, as it wouldn't respect the GDPR.
      Somehow, it seems related to the fact that google knows you visited a
      website by just downloading the font, because they very well know with
      just your IP who you are exactly.
      
      It's yet unsure if that issue is well-founded or not, but since German
      courts seem to be sanctioning people about this, there is no reason to
      not at least provide a workaround.
      
      What is sure is that it makes a lot of noise and more and more people
      seem to be impacted by this as many opw are getting opened, as well as
      github messages.
      
      Whether it is well-founded or not is thus not really our problem
      anymore, we should just provide a way for our users to protect
      themselves against this "German law problem" (or at least think they are
      protecting, if Odoo thinks that's a non issue or the German court is
      wrong or ambiguous).
      
      Note that a cookies banner to inform users would not be enough for that
      "problem", as the user would already have accessed your website and thus
      the related problematic fonts.
      Another solution which is not something we want (at all) would be to
      serve local system fonts while the user did not consent about google
      fonts, or having a blocking screen page telling people visiting the
      website will fetch google fonts. Obviously those 2 possibilities are a
      no go as it leads to terrible UX.
      
      Finally, note that:
      - in Odoo 16, the default fonts will be the system fonts, meaning there
        won't be any call to google by default, regardless of this pr
      - there is a work in progress to improve the current cookies bar to
        differentiate essential and non essential cookies and to allow user
        to accept only one or both (task-2800976).
      
      Useful links:
      - https://github.com/odoo/odoo/issues/83638#issuecomment-1054470699
        ODO detailed point of view about this
      - https://rewis.io/urteile/urteil/lhm-20-01-2022-3-o-1749320/
        The German law about this
      
      [1]: https://github.com/odoo/odoo/commit/b06ce21eba6388ce34bbffffadcb489f0e8557dd
      
      
      
      Closes #83638
      task-2756486
      opw-2970167
      opw-2960466
      opw-2960555
      opw-2952427
      opw-2800976
      opw-2748647
      (possibly many more)
      
      Courtesy of @bso-odoo for the regex part which was inspired by another
      of his google font fix attempt
      
      closes odoo/odoo#103389
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      fa362f72
  5. Oct 02, 2020
  6. Dec 10, 2020
  7. Sep 23, 2020
  8. Sep 22, 2020
  9. Aug 22, 2020
    • qsm-odoo's avatar
      [IMP] web_editor, website: introduce foldable zones in the editor UI · d9c450ac
      qsm-odoo authored
      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: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      d9c450ac
  10. Aug 14, 2020
  11. Jul 14, 2020
    • qsm-odoo's avatar
      [IMP] website, *: add prettier preview of border styles · b4ce6fbc
      qsm-odoo authored
      *: web_editor
      
      Part of https://github.com/odoo/odoo/pull/53930
      task-2157252
      b4ce6fbc
    • qsm-odoo's avatar
      [IMP] web_editor, *: review the editor design CSS · f16113a0
      qsm-odoo authored
      *: web, mass_mailing, website, website_form, website_sale
      
      New CSS design of the editor (step 1/x).
      
      This work is unfortunately far from perfect but is a first step towards
      what we want. In particular, much CSS linked to elements that are meant
      to be removed/moved in the upcoming weeks was done in a huge rush but
      will thus hopefully be removed/reviewed before the 14.0 release.
      
      As the design is now far more complex including gradients and other
      "complex" elements, it was also very difficult to keep a design based on
      css-variable so this system was removed, which means that the editor now
      appears the same everywhere (backend, frontend, ...). The original goal
      of this system was to have an adapted style for backend, frontend and
      website visitors. Unfortunately, the current result was a very good
      frontend editor design, a not-so-good backend editor design (for mass
      mailing at least) and a totally unadapted design for the website
      visitors. Making this perfect will be achievable by loading different
      assets for those 3 areas and hopefully those assets will only differ by
      the values of editor scss variables.
      
      Part of https://github.com/odoo/odoo/pull/53930
      task-2157252
      f16113a0
  12. Jul 09, 2020
  13. Jul 28, 2020
  14. Jun 02, 2020
    • qsm-odoo's avatar
      [IMP] website, *: allow color palette selection · e505ed28
      qsm-odoo authored
      *: web_editor
      
      Note: on color palette change, all the colors of the user are reset and
      he is warned about it.
      
      Part of https://github.com/odoo/odoo/pull/52224
      task-2197038
      e505ed28
    • qsm-odoo's avatar
      [IMP] website, *: allow presets user edition · 55c90cc9
      qsm-odoo authored
      *: web, web_editor
      
      Now, the user can edit each individual component of each color preset
      thanks to the third tab of the left panel. The edition of the first
      preset is the same as the others for the users but it is actually
      also used for "no-preset" areas, meaning that they impact the whole
      website by default (*without impacting the other presets*). The website
      thus appears as areas using presets, preset 1 being the default (in the
      future all areas will be customizable with a different preset). The only
      difference between "using preset 1 explicitely" and "not using a preset"
      will be that background color is transparent in no-preset, leaving the
      body background appear. If the body background has no image, then there
      is no difference at all as the background color of the body is set to be
      the background color of the preset 1. In boxed mode, that color is used
      for the "box" and the website body uses a different customizable color.
      
      Note: before this commit, the "text" color edition was used to set the
      main text color and one of the constrasting color for the color-yiq
      function (the darkest if a dark color or the lightest if a light color).
      That last part has been removed and automatic colors will now always
      use $gray-900 and $white as contrasting colors, unless changed by the
      theme explicitely. This needed to be removed as now the "text color"
      edition has been moved in the "preset 1" config and should thus only
      impact the "no-preset / preset 1" areas instead of all the presets.
      
      Part of https://github.com/odoo/odoo/pull/45856
      task-2197038
      55c90cc9
    • qsm-odoo's avatar
  15. Feb 06, 2020
    • qsm-odoo's avatar
      [IMP] website, *: make theme custo options act as simple snippet options · 6fb4ed44
      qsm-odoo authored
      * web_editor, theme_bootswatch
      
      Instead of having an entirely dedicated system for theme options in a
      third tab of the left panel, those theme options are now simple snippet
      options. See the customizeWebsite generic method.
      
      This allows to make any option available in the third tab or on any
      meaningful element like the header or the footer. This also allows to
      take advantage of all the features of the left panel: dependencies,
      visibility update, etc.
      
      Note: same as before, those changes do apply the color/size/layout
      immediately on the website, even if not saved. Changing that behavior
      is complex and might be the job of another task.
      
      Part of https://github.com/odoo/odoo/pull/41166
      task-2088298
      6fb4ed44
  16. Feb 03, 2020
  17. Dec 23, 2019
  18. Dec 09, 2019
  19. Nov 28, 2019
  20. Nov 18, 2019
    • Samuel Degueldre's avatar
      [IMP] web_editor: rework background-sizing option · dfd98f49
      Samuel Degueldre authored
      Previously, background size and position for snippets was configured in
      a modal, the user could choose a "focus point", which is rather
      unintuitive. They could also choose to use the "contain" background
      mode, with or without repeat, or a third option, where they could
      customize everything, from the background size in both directions to
      whether to repeat the background in only one or in both directions.
      
      This commit streamlines the background-sizing options, only the "cover"
      and "repeat pattern" options have been kept, as they cover almost every
      use case. Their configuration has been moved into the options menu for
      consistency with the rest of the editor, and the background's position
      is now chosen by clicking on the corresponding menu option, and dragging
      the background to the desired place.
      
      Part of https://github.com/odoo/odoo/pull/38959
      maintask-2066614
      task-2088304
      dfd98f49
  21. Aug 28, 2019
    • qsm-odoo's avatar
      [IMP] web_editor, *: introduce and restore new web_editor UI · 4f27e52c
      qsm-odoo authored
      * mass_mailing, note, website, website_blog, website_form,
      website_mass_mailing, website_sale
      
      This commit, unfortunately, mixes three things:
      
      - Restoring as much as possible the scss organisation to allow styling
      the web_editor UI properly.
      
      - Fixing some bugs like a border around the page once the editor is
      loaded, no ability to scroll the snippets, etc
      
      - Introducing a whole new UI for snippet options: a left panel instead
      of the old dropdown & button overlay.
      
      Note: this commit also do some linting and ES6 convertion even though
      some of it has been done in the parent commit.
      
      Note 2: some elements that were removed are still styled in the POS apps
      but this is because part of a feature was removed while leaving dead
      code behind, this is handled in another PR which is to be merged
      (https://github.com/odoo/odoo/pull/36136).
      
      Part of https://github.com/odoo/odoo/pull/36068
      
      
      task-1942370
      
      closes odoo/odoo#36068
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      4f27e52c
  22. Aug 21, 2019
  23. Jun 17, 2019
  24. Mar 21, 2019
  25. Feb 14, 2019
Loading