diff options
| author | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-07-31 13:56:45 +0000 |
|---|---|---|
| committer | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-08-11 12:32:54 +0000 |
| commit | 441d9f65b3b90c37ce812d2addbe5b62d2d88229 (patch) | |
| tree | 1a66c5fdaa27a2d0f5b6369299d334cf66426951 /addons/web/static/src/scss | |
| parent | 9a53b032395aba59cee9a2e5660ebf8d6136b978 (diff) | |
[IMP] base,web: add year scale to calendar
This commit adds a new year scale to the calendar view.
It comes with a new view in the calendar, this view displays a
4x3 grid which cells are month views.
Task: 2193921
Diffstat (limited to 'addons/web/static/src/scss')
| -rw-r--r-- | addons/web/static/src/scss/web_calendar.scss | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/web_calendar.scss b/addons/web/static/src/scss/web_calendar.scss index cb98cc47129..b3ab7d7bf6f 100644 --- a/addons/web/static/src/scss/web_calendar.scss +++ b/addons/web/static/src/scss/web_calendar.scss @@ -63,6 +63,10 @@ $o-cw-filter-avatar-size: 20px; .o_calendar_widget { height: 100%; + > .fc-view-container { + height: 100%; + } + // === Adapt calendar table borders === // ===================================== @@ -317,6 +321,100 @@ $o-cw-filter-avatar-size: 20px; } } } + // ====== Year only + .fc-dayGridYear-view { + border: none; + height: 100%; + padding-top: 1rem; + padding-left: $o-horizontal-padding; + box-sizing: border-box; + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + overflow-y: auto; + + > table { + height: 100%; + } + + table, tr, th, td { + border: none; + } + + &.fc-readonly-year-view { + .fc-day-top:not(.fc-has-event) { + cursor: default !important; + } + } + + &:not(.fc-readonly-year-view) { + .fc-day-top:hover > .fc-day-number { + font-weight: bold; + border-radius: 100%; + text-align: center; + background-color: rgba(#87c0d1, 0.5); + color: gray('900'); + } + } + + > .fc-month-container { + width: 25%; + min-width: 25rem; + box-sizing: border-box; + + > .fc-month { + width: 21rem; + margin: auto; + + > .fc-toolbar.fc-header-toolbar { + margin-top: 15px; + margin-bottom: 5px; + cursor: default; + + h2 { + font-size: 1.2rem; + color: gray('600'); + } + } + + .fc-widget-header { + padding: 2px 0; + cursor: default; + } + + .fc-dayGridMonth-view { + padding-left: unset; + } + + .fc-week.fc-row { + min-height: unset; + } + + .fc-disabled-day { + background-color: unset; + } + + .fc-day-top { + text-align: center; + padding: 5px; + cursor: pointer; + + > .fc-day-number { + display: block; + float: unset; + line-height: unset; + margin: auto; + padding: 0.1rem 0; + font-size: 1.2rem; + } + + &.fc-today > .fc-day-number { + font-weight: bold; + } + } + } + } + } // ====== RTL layout(s) &.fc-rtl { .fc-timeGrid-view .fc-event { |
