[IMP] calendar,web: extract static CSS rules out of loops
This commit seperates the static and color dependent rules for the Calendar view and app to avoid duplicating the static ones. task-3546717 Part-of: odoo/odoo#138615
This commit is contained in:
@@ -43,6 +43,46 @@
|
||||
border-color: map-get($theme-colors, 'light');
|
||||
}
|
||||
|
||||
.o_cw_popover_link {
|
||||
&.o_attendee_status_needsAction {
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
}
|
||||
|
||||
&.o_attendee_status_declined {
|
||||
text-decoration: line-through;
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.o_calendar_renderer {
|
||||
.fc-event {
|
||||
&.o_attendee_status_needsAction,
|
||||
&.o_attendee_status_tentative,
|
||||
&.o_attendee_status_declined,
|
||||
&.o_attendee_status_alone {
|
||||
border-width: 2px !important;
|
||||
}
|
||||
|
||||
&.o_attendee_status_alone,
|
||||
&.o_attendee_status_needsAction {
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
color: $o-black !important;
|
||||
.fc-bg {
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.o_attendee_status_declined {
|
||||
text-decoration: line-through;
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
color: $o-black !important;
|
||||
.fc-bg {
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@for $i from 1 through length($o-colors-complete) {
|
||||
$color: nth($o-colors-complete, $i);
|
||||
|
||||
@@ -57,15 +97,6 @@
|
||||
rgba($color, 0.7) 20px
|
||||
) !important;
|
||||
}
|
||||
|
||||
&.o_attendee_status_needsAction {
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
}
|
||||
|
||||
&.o_attendee_status_declined {
|
||||
text-decoration: line-through;
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.o_calendar_renderer {
|
||||
@@ -74,8 +105,6 @@
|
||||
&.o_attendee_status_tentative,
|
||||
&.o_attendee_status_declined,
|
||||
&.o_attendee_status_alone {
|
||||
border-width: 2px 2px 2px !important;
|
||||
|
||||
&.o_cw_custom_highlight {
|
||||
background-color: $color;
|
||||
}
|
||||
@@ -93,24 +122,6 @@
|
||||
) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.o_attendee_status_alone,
|
||||
&.o_attendee_status_needsAction {
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
color: $o-black !important;
|
||||
.fc-bg {
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.o_attendee_status_declined {
|
||||
text-decoration: line-through;
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
color: $o-black !important;
|
||||
.fc-bg {
|
||||
background-color: rgba($o-view-background-color, 0.9) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -550,6 +550,36 @@
|
||||
}
|
||||
}
|
||||
|
||||
.o_calendar_renderer .fc-view {
|
||||
.fc-bgevent {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.fc-event {
|
||||
opacity: 1;
|
||||
|
||||
&.o_event_highlight {
|
||||
opacity: 1;
|
||||
.fc-content {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
&.o_cw_custom_highlight {
|
||||
z-index: 10 !important;
|
||||
opacity: 1;
|
||||
right: 1px !important;
|
||||
left: 1px !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_cw_popover {
|
||||
.card-header {
|
||||
padding-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
// =============== Generate color classes ===============
|
||||
@for $i from 1 through length($o-colors-complete) {
|
||||
$color: nth($o-colors-complete, $i);
|
||||
@@ -559,31 +589,17 @@
|
||||
border-color: $color;
|
||||
&.fc-bgevent {
|
||||
background-color: $color;
|
||||
opacity: 0.5;
|
||||
}
|
||||
&.fc-event {
|
||||
color: darken($color, 45%);
|
||||
opacity: 1;
|
||||
background: scale-color($color, $lightness: 50%);
|
||||
.fc-bg {
|
||||
background: scale-color($color, $lightness: 50%);
|
||||
}
|
||||
|
||||
&.o_event_highlight {
|
||||
opacity: 1;
|
||||
.fc-content {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
&.o_cw_custom_highlight {
|
||||
box-shadow: 0 12px 12px -5px rgba($color, 0.3);
|
||||
color: color-contrast($color);
|
||||
z-index: 10 !important;
|
||||
opacity: 1;
|
||||
right: 1px !important;
|
||||
left: 1px !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -634,7 +650,6 @@
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding-left: 2px;
|
||||
border-color: mix($card-border-color, mix($o-white, $color));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user