From 44f80b2c953a9a3b48855b72e89c4eda64126d6b Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 4 Jul 2022 16:36:29 +0000 Subject: [PATCH] [FIX] website: remove useless list_website_pages rules Commit [1] made a mistake of copy/pasting the "list_website_pages" ID in two views related to the "search in everything" and "search in pages" views (used when checking all results after a search using the "search" snippet that you can configure to search in everything or in pages). At the time, that ID induced some CSS rules and JS related to the page manager (not made for visitors). - For the "search in everything" page, both the CSS rules and JS had no effect (except instantiating an useless widget in JS). - For the "search in pages" page, the JS had no effect (except the same instantiation of an useless widget) but the CSS had an impact on the `` used to display the results: - The header used an hardcoded odoo-purple background color. - The table paddings were not the ones defined by the theme. Of course, in custos, more of the CSS could have had an impact (for example some icons would use bootstrap blue info color by default for no apparent reason). Since [2], the page manager was removed (converted into a backend view) so the CSS and JS rules actually became totally useless. The JS was removed with [2] but the CSS was kept thinking it was necessary for the "search in everything" and "search in pages" pages. This commit removes the useless CSS and the useless ID in the two views. It also modifies the "search in pages" layout a bit. A fix could be made in stable later on to at least remove the hardcoded odoo-purple background color in the "search in pages" page. The rest should stay as per-stable policy. [1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986 [2]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b closes odoo/odoo#95272 Signed-off-by: Romain Derie (rde) --- .../website/static/src/scss/website.ui.scss | 23 ------------------- addons/website/views/website_templates.xml | 9 ++------ 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/addons/website/static/src/scss/website.ui.scss b/addons/website/static/src/scss/website.ui.scss index 4cde6dc5bcd..dcb590b8e3c 100644 --- a/addons/website/static/src/scss/website.ui.scss +++ b/addons/website/static/src/scss/website.ui.scss @@ -95,29 +95,6 @@ body { } } -// Pages Management -#list_website_pages { - th { - background-color: $o-brand-odoo; - color: white; - } - td, th { - padding: 0.45rem; - } - td { - > a.fa { - margin-left: 5px; - color: $o-brand-odoo; - } - .text-muted { - opacity: 0.5; - } - } - .fa-check, .fa-eye-slash { - color: $info; - } -} - // Post Submit Links .post_link:not(.o_post_link_js_loaded) { pointer-events: none; diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 6af6ed35580..277e7aa44da 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -2376,7 +2376,7 @@ Sitemap: sitemap.xml