From c659d1012641bd089f8aa81a5aa08cbc3c767f4b Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 10 Oct 2023 09:31:47 +0200 Subject: [PATCH] [REF] web,crm: remove tempusdominus scss customization The tempusdominus library has been removed by [1]. This commit removes scss customizations of the library that have been forgotten. [1] 910897fc97d87b08f01627094ec8c159f5267628 closes odoo/odoo#138129 Related: odoo/enterprise#48657 Signed-off-by: Samuel Degueldre (sad) --- .../static/tests/tours/crm_forecast_tour.js | 8 -- .../legacy/scss/tempusdominus_overridden.scss | 92 ------------------- 2 files changed, 100 deletions(-) delete mode 100644 addons/web/static/src/legacy/scss/tempusdominus_overridden.scss diff --git a/addons/crm/static/tests/tours/crm_forecast_tour.js b/addons/crm/static/tests/tours/crm_forecast_tour.js index 93a25a02533..52c5b3ecf88 100644 --- a/addons/crm/static/tests/tours/crm_forecast_tour.js +++ b/addons/crm/static/tests/tours/crm_forecast_tour.js @@ -45,10 +45,6 @@ registry.category("web_tour.tours").add('crm_forecast', { trigger: "div[name=date_deadline] input", content: "click to make the datepicker disappear", run: "click" - }, { - trigger: "body:not(:has(div.bootstrap-datetimepicker-widget))", - content: "wait for date_picker to disappear", - run: function () {}, }, { trigger: '.o_back_button', content: 'navigate back to the kanban view', @@ -72,10 +68,6 @@ registry.category("web_tour.tours").add('crm_forecast', { actions.text(`text ${today.plus({months: 5}).startOf('month').minus({days: 1}).toFormat("MM/dd/yyyy")}`, this.$anchor); this.$anchor[0].dispatchEvent(new KeyboardEvent("keydown", { bubbles: true, key: "Escape" })); }, - }, { - trigger: "body:not(:has(div.bootstrap-datetimepicker-widget))", - content: "wait for date_picker to disappear", - run: function () {}, }, { trigger: ".o_field_widget[name=probability] input", content: "max out probability", diff --git a/addons/web/static/src/legacy/scss/tempusdominus_overridden.scss b/addons/web/static/src/legacy/scss/tempusdominus_overridden.scss deleted file mode 100644 index f7dae013aae..00000000000 --- a/addons/web/static/src/legacy/scss/tempusdominus_overridden.scss +++ /dev/null @@ -1,92 +0,0 @@ -// Override Tempusdominus variables -$bs-datetimepicker-active-bg: $o-brand-odoo; -$bs-datetimepicker-active-color: $white; -$bs-datetimepicker-text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -$bs-datetimepicker-secondary-border-color: $dropdown-border-color; - -// TODO remove sr-only when TempusDominus is upgraded to 6+ -.sr-only { - @include visually-hidden(); -} - -// The 'div.dropdown-menu' part is needed to override default bootstrap rule as -// this file is unfortunately placed in common assets. -div.dropdown-menu.bootstrap-datetimepicker-widget { - min-width: 0; - padding: 0; - border: 1px solid $dropdown-border-color; - overflow: visible; // Needed until dropdown-menu will be 'hoverflow:hidden' - - // Need to put datetimepicker widget above everything else - z-index: $zindex-modal + 1; - - // Also fix the dropdown width - width: 22rem; -} - -.bootstrap-datetimepicker-widget .datepicker table { - --datepicker-color: #{map-get($grays, '900')}; - --datepicker__thead-bg: #{map-get($grays, '100')}; - - th, td { - border-radius: 0; - border-bottom-width: $border-width; - width: percentage(1/8); - height: 30px; - line-height: 30px; - color: var(--datepicker-color); - - &.prev, &.next, &.old, &.new { - @include o-hover-opacity(.5); - } - } - - thead tr:nth-child(1) th { - border-top: 0; - } - - thead tr:nth-child(2) th { - height: 20px; - line-height: 20px; - } - - thead tr:nth-child(2) th, td.cw { - background-color: var(--datepicker__thead-bg); - @include font-size($font-size-sm); - font-weight: $font-weight-bold; - color: $o-main-text-color; - } - - td { - @include font-size(($font-size-base + $font-size-sm) * .5); - - &.today:not(.active):before { - border-bottom-color: $o-brand-primary; - } - - &.active { - border-bottom-color: $bs-datetimepicker-active-color; - color: $bs-datetimepicker-active-color; - } - } -} - -.bootstrap-datetimepicker-widget { - .picker-switch { - @include font-size($font-size-lg); - } - - .accordion-toggle { - span.fa { - margin: 0; - border-radius: 0; - color: $o-main-text-color; - border-top: 1px solid var(--datepicker-border-color, #{$border-color}); - box-shadow: 0 1px 0 var(--datepicker-border-color, #{$border-color}); // overlaps with main box border - - &.primary { - color: $o-brand-primary; - } - } - } -}