| 1 |
// Variables |
| 2 |
$o-cw-popup-avatar-size: 16px; |
| 3 |
|
| 4 |
.o_cw_popover { |
| 5 |
width: 448px; |
| 6 |
z-index: $zindex-modal - 1; |
| 7 |
font-size: $font-size-base; |
| 8 |
|
| 9 |
.card-header, |
| 10 |
.card-header .popover-header { |
| 11 |
font-size: 1.05em; |
| 12 |
font-weight: 500; |
| 13 |
line-height: 1; |
| 14 |
} |
| 15 |
|
| 16 |
.card-footer, .modal-footer { |
| 17 |
--btn-group-gap: -1px; |
| 18 |
background: none; |
| 19 |
} |
| 20 |
|
| 21 |
.o_cw_popover_close { |
| 22 |
cursor: pointer; |
| 23 |
} |
| 24 |
|
| 25 |
.o_calendar_avatars { |
| 26 |
line-height: 1; |
| 27 |
} |
| 28 |
|
| 29 |
.o_calendar_avatars img { |
| 30 |
margin-right: 0.4rem; |
| 31 |
width: $o-cw-popup-avatar-size; |
| 32 |
height: $o-cw-popup-avatar-size; |
| 33 |
border-radius: 100%; |
| 34 |
} |
| 35 |
|
| 36 |
.list-group-item { |
| 37 |
padding: 0.5rem 1rem; |
| 38 |
border: none; |
| 39 |
} |
| 40 |
|
| 41 |
.o_cw_popover_field .o_field_widget { |
| 42 |
@include o-text-overflow(block); |
| 43 |
} |
| 44 |
|
| 45 |
.o_cw_popover_fields_secondary { |
| 46 |
max-height: 170px; // Fallback for old browsers |
| 47 |
max-height: 25vh; |
| 48 |
overflow: auto; |
| 49 |
padding-bottom: 1px; // prevents the scrollbar to show when not needed |
| 50 |
|
| 51 |
&::-webkit-scrollbar { |
| 52 |
background: map-get($grays, "200"); |
| 53 |
width: 6px; |
| 54 |
} |
| 55 |
&::-webkit-scrollbar-thumb { |
| 56 |
background: map-get($grays, "500"); |
| 57 |
} |
| 58 |
} |
| 59 |
|
| 60 |
.fc-rtl & { |
| 61 |
text-align: right; |
| 62 |
.o_calendar_avatars { |
| 63 |
> div { |
| 64 |
justify-content: flex-end; |
| 65 |
} |
| 66 |
img { |
| 67 |
order: 2; |
| 68 |
margin: 0 0 0 0.4rem; |
| 69 |
} |
| 70 |
} |
| 71 |
} |
| 72 |
// =============== Generate color classes =============== |
| 73 |
.card-header { |
| 74 |
padding-left: 2px; |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
// Put logic in a function so that temporary variable like $-color |
| 79 |
// are not assigned to the global scope and potentially mess with |
| 80 |
// other global variables |
| 81 |
@function o-build-web-calendar-colors() { |
| 82 |
$-calendar-colors: (); |
| 83 |
@for $i from 1 through length($o-colors-complete) { |
| 84 |
$-color: nth($o-colors-complete, $i); |
| 85 |
$-color-subtle: mix($o-white, $-color, 55%); |
| 86 |
$-calendar-colors: append($-calendar-colors, ( |
| 87 |
color-subtle: $-color-subtle, |
| 88 |
popover-background-color: lighten($-color-subtle, 10%), |
| 89 |
popover-color: color-contrast($-color-subtle), |
| 90 |
)); |
| 91 |
} |
| 92 |
@return $-calendar-colors; |
| 93 |
} |
| 94 |
$o-web-calendar-colors: o-build-web-calendar-colors(); |
| 95 |
|
| 96 |
|
| 97 |
@for $i from 1 through length($o-web-calendar-colors) { |
| 98 |
.modal.o_technical_modal.o_modal_full .modal-dialog .modal-content.o_calendar_color_#{$i - 1} { |
| 99 |
.modal-header { |
| 100 |
background-color: map-get(nth($o-web-calendar-colors, $i), "color-subtle"); |
| 101 |
|
| 102 |
.btn { |
| 103 |
color: $body-color; |
| 104 |
} |
| 105 |
} |
| 106 |
} |
| 107 |
|
| 108 |
.o_cw_popover.o_calendar_color_#{$i - 1} { |
| 109 |
$-calendar-colors-map: nth($o-web-calendar-colors, $i); |
| 110 |
.card-header, |
| 111 |
.card-header .popover-header { |
| 112 |
background-color: map-get($-calendar-colors-map, "popover-background-color"); |
| 113 |
color: map-get($-calendar-colors-map, "popover-color"); |
| 114 |
} |
| 115 |
|
| 116 |
.card-header { |
| 117 |
--#{$variable-prefix}card-border-color: #{map-get($-calendar-colors-map, "color-subtle")}; |
| 118 |
} |
| 119 |
} |
| 120 |
} |