From 2987e468a9aba2ec090ead2b8e55952ca8c2ac17 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 2 Apr 2021 18:21:59 +0200 Subject: [PATCH] Calendars improvements --- customize.dist/src/less2/include/forms.less | 5 + www/calendar/app-calendar.less | 68 ++++- www/calendar/inner.html | 2 +- www/calendar/inner.js | 285 ++++++++++++++++++-- www/common/outer/calendar.js | 52 +++- 5 files changed, 390 insertions(+), 22 deletions(-) diff --git a/customize.dist/src/less2/include/forms.less b/customize.dist/src/less2/include/forms.less index 6daebef46..e39f95b1b 100644 --- a/customize.dist/src/less2/include/forms.less +++ b/customize.dist/src/less2/include/forms.less @@ -117,6 +117,11 @@ &.no-margin { margin: 0; } + &.small { + line-height: initial; + padding: 5px; + height: auto; + } &:hover, &:not(:disabled):not(.disabled):active, &:focus { color: @cp_buttons-fg; diff --git a/www/calendar/app-calendar.less b/www/calendar/app-calendar.less index 6db0be8b6..71c00e8df 100644 --- a/www/calendar/app-calendar.less +++ b/www/calendar/app-calendar.less @@ -1,16 +1,34 @@ @import (reference) '../../customize/src/less2/include/framework.less'; +@import (reference) '../../customize/src/less2/include/sidebar-layout.less'; +@import (reference) '../../customize/src/less2/include/tools.less'; &.cp-app-calendar { .framework_min_main(); + .sidebar-layout_main(); display: flex; flex-flow: column; - #cp-calendar { + #cp-sidebarlayout-container #cp-sidebarlayout-rightside { + padding: 0; + & > div { + margin: 0; + } + .tui-full-calendar-layout { background-color: @cp_sidebar-right-bg !important; color: @cryptpad_text_col; + .tui-full-calendar-month * { + color: @cryptpad_text_col !important; // XXX + } + } + .tui-full-calendar-timegrid-timezone { + background-color: @cp_sidebar-right-bg !important; + .tui-full-calendar-timegrid-hour { + color: @cryptpad_text_col !important; + } + color: @cryptpad_text_col; } .tui-full-calendar-timegrid-gridline, .tui-full-calendar-time-date { border-color: @cp_calendar-border !important; @@ -62,5 +80,53 @@ } } + #cp-sidebarlayout-leftside { + & > div { + padding: 10px + } + .cp-calendar-new { + display: flex; + align-items: center; + justify-content: space-between; + } + .cp-calendar-browse { + display: flex; + align-items: center; + justify-content: space-around; + justify-content: space-evenly; + } + + .cp-calendar-list { + .cp-calendar-entry { + display: flex; + align-items: center; + justify-content: space-around; + padding: 5px; + cursor: pointer; + &:not(:last-child) { + margin-bottom: 10px; + } + &:hover { + background: fade(@cryptpad_text_col, 10%); + } + &.cp-active { + background: @cp_sidebar-left-active; + } + .tools_unselectable(); + .cp-calendar-color { + display: inline-block; + border-radius: 50%; + width: 15px; + height: 15px; + } + } + } + } + .cp-calendar-colorpicker { + width: 100px; + height: 25px; + cursor: pointer; + border: 1px solid @cp_forms-border; + } } diff --git a/www/calendar/inner.html b/www/calendar/inner.html index 9820c78b9..8c77c4fd7 100644 --- a/www/calendar/inner.html +++ b/www/calendar/inner.html @@ -9,7 +9,7 @@
-
+