summaryrefslogtreecommitdiff
path: root/addons/website_theme_install/static
AgeCommit message (Collapse)Author
2019-11-12[REF] website, *: merge website_theme_install into websiteqsm-odoo
* theme_bootswatch, theme_default, website_theme_install
2019-10-14[FIX] website, website_theme_install: fix theme selection in settingsSébastien Theys
Follow up of commit a3845ae3f058772d4b548c703f5ddf94b571d903 Issue ===== Since the above commit there is a confirmation dialog when clicking on a button, for which the only options are to Discard or Cancel. The problem is that when discarding it will revert the selected website back to the default value. Therefore before the current commit it is impossible to install a theme on a website other than the first. Solution ======== The solution is to avoid showing this dialog when clicking on buttons for which the result depends on the currently selected website. This leads to the same behavior as what existed before the mentioned commit: the settings are implicitly discarded because they are not saved, but at the time of the click the transient model still holds the non-discarded value that the user selected. This restores the "select a theme" feature, but also restores the unfortunate side effect that the user might unknowingly loose all of his pending changes when clicking on the button, but only for those two specific buttons. Other considerations ==================== Saving instead of Discarding was considered but it is impossible to do because saving might do a lot of changes that might even lead to the installation of modules, so the settings page has to be reloaded to apply them, and then the website field will be reset to its default value again. Instead of changing website specific settings from the main settings, it was considered to update them through a form view, but it is apparently too complicated for on-boarding. The last consideration was that the settings view should actually mark the corresponding fields as unchanged when changing the website, but it is too complex to implement for a case that is not supported in the first place, especially for a fix in a stable version. task-2083198 closes odoo/odoo#38745 X-original-commit: 2298ef19bcd9e7a14958dce9a93cea69258064d8 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-02-18[REF] website_theme_install: update theme install screen designqsm-odoo
task-1907934 closes odoo/odoo#31114
2018-08-13[ADD] website_theme_install: try to make theme multi website compliantJeremy Kersten
From now, when you install a theme, it load the data from xml to template table theme [ir.ui.view|ir.attachment|website.page|website.menu]. Data are only copied from this template table into the real table when you choose a theme on a website; Making them website_specific and with a link to the original to allow futur update. A special case is done to create theme.ir.ui.view when you are installing a theme, even if you continue to use template tag to create quick view. Co-authored-by: Derie Romain <rde@odoo.com> Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-09[REF] *: improve app icons, add SVG versionstefanorigano
- Uniform colors and design - Replace duplicated icons (eg. sale / sale_management) - Improve misleading icons (eg. POS) - Add icons for new apps Add SVG versions to lossless future editing and print/marketing use. task-54681
2018-07-27[REF] *: BS4, review color systemqsm-odoo
Odoo used to declare two main colors: primary and optional (which are purple and turquoise in enterprise). Those were respectively assigned to the 'primary' bootstrap variable and the 'btn-primary' bootstrap variable. BS4, however, does not allow to have a different primary color for buttons. Instead, the 'primary' color is used for all 'primary' related components and utility classes, same as for all other colors. So, if we want to keep our enterprise buttons green, our 'optional' colors had to become our 'primary' color. The old odoo primary is then renamed to the 'odoo' color. The palette of grays is now larger by default and is numbered from 100 to 900 alongside the $black and $white variables. The equivalence for older variables and the way we used them is: $gray-darker -> gray 900 (unused before) $gray-dark -> gray 900 $gray -> gray 700 $gray-light -> gray 600 $gray-lighter-darker -> gray 400 (the old variable was created by us) $gray-lighter-dark -> gray 300 (the old variable was created by us) $gray-lighter -> gray 200 Fortunately, the 'lighter' variations we created fit well in the default BS4 system ! Unfortunately, our $gray-lighter which carried the same function as $gray-200 (see above) is very close to the new default $gray-100 and quite distant from the new $gray-200. This will be handled in the next commit.
2018-07-27[REF] *: BS4, the $text-color variable was renamed to $body-colorqsm-odoo
2018-07-27[REF] *: BS4, adapt font-size and padding variablesqsm-odoo
BS variables were renamed or changed and all (most) variables now use 'rem' units instead of 'px' unit.
2018-07-27[REF] *: BS4, adapt dropdowns and caretsqsm-odoo
- The dropdown structure was simplified, allowing to get rid of the 3-levels structure induced by <ul/> elements and dropdowns can now contain anything. The class 'dropdown-item' is now mandatory for each dropdown clickable element. The class 'dropdown-item-text' can be used to add same padding and style but without making the element have a clickable look. - Dividers now use the class 'dropdown-divider' - The way dropdowns are opened and hidden also changed (before the 'open' class was added on the `.dropdown-menu` parent, now the 'show' class is added on both the `.dropdown-menu` parent and the `.dropdown-menu` itself). - JS-wise, no click event handlers can be put on `.dropdown-toggle` elements anymore (instead, use handlers for dropdown events). - Carets are automatically put on `.dropdown-toggle` elements, so this commit replaces the `.caret` elements with this. This feature was possible to disable but would prevent us from adding a caret with scss. Also, this simplifies the DOM. The 'o-no-caret' class was also introduced to allow using the 'dropdown-toggle' class on non-caret elements. - Also adapt the scss to use $caret-width instead of $caret-width-base
2018-07-27[REF] *: BS4, get rid of the removed 'square' mixinqsm-odoo
2018-07-27[REF] *: BS4, adapt media queriesqsm-odoo
media queries that target a specific screen size handled by bootstrap have now a more convenient way to be defined: ``` @​media (min-width: $screen-sm-min) { ... } -> @​include media-breakpoint-up(sm) { ... } ``` ``` @​media (max-width: $screen-sm-max) { ... } -> @​include media-breakpoint-down(sm) { ... } ``` ``` @​media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { ... } -> @​include media-breakpoint-only(sm) { ... } ``` ``` @​media (min-width: $screen-sm-min) and (max-width: $screen-md-max) { ... } -> @​include media-breakpoint-between(sm, md) { ... } ``` Also, bootstrap has changed the values for its default screen sizes: ------------------ | BS3 | BS4 | ------------------ 0 | XS | XS | -> Portrait Mobile 576 | / | SM | -> Landscape Mobile 768 | SM | MD | -> Portrait Tablet 992 | MD | LG | -> Landscape Tablet / Small Desktop 1200 | LG | XL | -> Desktop ------------------ While it is possible to configure BS variables to behave as BS3, we took the decision to keep the BS4 variables untouched. BS4 system seems indeed better and having the purest bootstrap possible is better for Odoo to be used as a framework.
2018-07-27[REF] *: get rid of vendor prefixesqsm-odoo
BS4 do not provide vendor prefixes scss mixins anymore as it is meant to be used with the 'autoprefixer' library. As we only support the last version of every major browsers in Odoo, we took the decision to not use the library as it was also complex to integrate in Odoo. We decided to do the library's work by hand if it ever become necessary.
2018-04-18[REF] *: review scss variables handlingqsm-odoo
Unlike LESS, SCSS variables are not lazy loaded. Our system has thus to be updated. This commit creates new templates which are t-called in assets bundles (to replace the old less_helpers template): - web._assets_utils: regroups the mixins and functions which *can* (and so should) be available in every asset bundle - web._assets_primary_variables: regroups the variables (or mixins used as variables) which *can* (and so should) be available in every asset bundle - web._assets_secondary_variables: same as above but provides an environnement where all the 'primary' ones are accessible. This is for example useful to handle the community/enterprise split: // Community primary variables $o-pink-color: pink; // enterprise color $o-brand-primary: blue; // Enterprise primary variables $o-brand-primary: $o-pink-color; // Community secondary variables $o-my-darker-primary: darken($o-brand-primary, 5%); => If there was only one variable template, enterprise edition would have been able to define its primary color at the end but the darker primary would not have been updated. Using the "!default" system and putting enterprise definition above would not have solved the problem as the $o-pink-color would not have been accessible. - web._assets_backend_helpers: regroups the variables, mixins and functions which *can* (and so should) be available in the backend asset bundle only. This is especially (only?) useful for bootstrap variables overriddes. - web._assets_frontend_helpers: regroups the variables, mixins and functions which *can* (and so should) be available in the frontend asset bundle only. This is especially (only?) useful for bootstrap variables overriddes. Note: bootstrap variables are not accessible in any of those anymore. If you have variables that should depend on bootstrap, you have 3 solutions: - Find another way: your variable is probably useless, use bootstrap variables directly or create a variable that will influence the value of bootstrap variables. E.g. instead of declaring: `$myvar: $bootstrapvar * 3` and using $myvar alone, declare: `$myvar: 3` and use `$myvar * $bootstrapvar` where needed. - Declare a copy of the bootstrap variable and use that one. In that case, you should also force-set the real bootstrap one to be sure they match (this should be done in appropriate templates mentioned above). E.g. ``` $o-boostrapvar: 5; ... $boostrapvar: $o-bootstrapvar; ``` - Set your variable to null and set it to your bootstrap expression in the file you will need it (where bootstrap variables are accessible) without forgetting to add the !default flag to allow overriddes. ``` $myvar: null; ... $myvar: $bootstrapvar * 5 !default; ``` This commit also partly changes the variable names to follow the convention: $o-<app_id>-<name> where 'app_id' is the current's app name or a meaningful unique identifier ("theme" for all themes for example, as no multiple themes can be installed).
2018-04-18[REF] *: convert less content to scss contentqsm-odoo
Convert content so that the assets compile on app installation. The style is still broken after this as the variables/mixins/... are not defined in the right order (as it did not matter in LESS but does in SCSS). This commit basically changes: - Variables: @​var_hello -> $var-hello - Mixins: .mixin_world() {} -> @​mixin mixin-world {} - Classes used as mixin: .my_class() -> @​extend .my_class - Here there were no other solution than to convert the use of a mixin call by the use of an extend as a first approximation - LESS functions -> SCSS functions (e.g. fade -> rgba) - Move first variable definition before the variable is used - Still need to make sure last variable definition is at the right place
2018-04-18[REF] *: rename all LESS files to SCSSqsm-odoo
This is a simple renaming without adaptation.
2017-09-18[FIX] website_theme_install: fix several design issuesqsm-odoo
- Useless horizontal scrollbar - Misalignments - Broken mobile layout
2017-07-03[IMP] website_theme_install: optimize animationqsm-odoo
Following commit 828c7c3da92970e3f0836a62f858ac2f5229947a: the kanban record animation when a theme is hovered was blurry with chrome and laggy with firefox (with linux at least). This commit removes the scale part of the animation which was the cause of this.
2017-06-30[IMP] website_theme_install: new designstefanorigano
- Handle vertical screenshots - If a theme is installed, show it first, hide buttons and use a specific design - If no screenshot has been defined, show the cover (or the icon if no covers has been defined neither) - Show theme's name and category - Allow to filter by category - Design grouped layout
2016-08-18[ADD] various: add missing icons for website appsJainik Patel
2016-01-04[ADD] website_theme_install (+ base: remove comment)qsm-odoo
New module to propose theme installation on website installation.