e7dcfc19298948b76caa4c214724c93854cf5f4c
Currently, the template headers all have the same default behavior, you cannot define different default behaviors for header A and header B (e.g. have header A appear over the content and header B fixed). This commit allows to specify other behaviors than the default ones for each header template. It should be noted that, as it currently stands, most options trigger a reload of the page, which prevents simpler solutions like using `data-trigger` attributes to tie some options to the header selection. Specifically, this commit: - defines a header visibility for each header with `data-trigger`. This is actually the only option of the 3 concerned by this commit that could be handled that way, for the aforementioned reasons. Only the visibility of the `header_rounded_box` template is actually modified, but to allow switching back and forth between the different templates and still have the intended Odoo experience, a trigger is specified for each header choice (the other ones having the default visibility). - applies the "pills" link style for the `header_rounded_box` template and introduces a `customizeWebsiteVariables` public method to do so. This method, called through the `data-customize-website-variables` attribute, allows to specify additional variables that should be modified by selecting the option. It is as of now only used in that specific case, but could be used with a number of other options which are defined in a similar way, such as the scroll effect, alignment, font, logo height... - uses the default link style to apply it to each template by default through the use of `data-default-variables`. This is needed (1) to make sure that the `header_stretch` template can never have another style than the default one, as the option is hidden when it is selected, and (2) to go back to the default behavior when switching between headers. Both `data-customize-website-variables` and `data-default-variables` use the same syntax: a list of `variable: value` separated by a comma. e.g. `header-links-style: pills, header-scroll-effect: fixed` - removes the "Round corners" option field and border-radius for headers sales_one, sales_two, sales_three and sales_four, because the option does not play well with their layouts. task-3474743 Part-of: odoo/odoo#119650
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%