From be441f5cd3b8de2ecd431802c62d8ca7e1b16d59 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 27 Jan 2016 10:28:40 -0500 Subject: [PATCH] (css,js) Fix display of all-day events --- .../Scheduler/sgCalendarDayBlock.directive.js | 6 ++++-- .../scss/views/SchedulerUI.scss | 17 +++++++++++++---- UI/WebServerResources/scss/views/_view.scss | 1 + 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/UI/WebServerResources/js/Scheduler/sgCalendarDayBlock.directive.js b/UI/WebServerResources/js/Scheduler/sgCalendarDayBlock.directive.js index bed21bb48..e488c227d 100644 --- a/UI/WebServerResources/js/Scheduler/sgCalendarDayBlock.directive.js +++ b/UI/WebServerResources/js/Scheduler/sgCalendarDayBlock.directive.js @@ -85,8 +85,10 @@ // Set position iElement.css('left', left + '%'); iElement.css('right', right + '%'); - iElement.addClass('starts' + scope.block.start); - iElement.addClass('lasts' + scope.block.length); + if (!scope.block.component || !scope.block.component.c_isallday) { + iElement.addClass('starts' + scope.block.start); + iElement.addClass('lasts' + scope.block.length); + } // Set background color if (scope.block.component) diff --git a/UI/WebServerResources/scss/views/SchedulerUI.scss b/UI/WebServerResources/scss/views/SchedulerUI.scss index 2962a1f7a..87603a01d 100644 --- a/UI/WebServerResources/scss/views/SchedulerUI.scss +++ b/UI/WebServerResources/scss/views/SchedulerUI.scss @@ -63,11 +63,12 @@ $quarter_height: 10px; md-toolbar { &.daysView, &.monthView { background-color: #fff; - overflow: hidden; z-index: $z-index-toolbar - 1; .days { margin-left: $hours_margin; - overflow-y: scroll; + &:not([sg-calendar-scroll-view$="allday"]) { + overflow-y: scroll; + } &.dayLabels { .day { padding-left: 1%; @@ -78,7 +79,12 @@ $quarter_height: 10px; } } } + &.daysView { + // Toolbar of day/week views + min-height: inherit; + } &[sg-view$=dayview] { + // Toolbar of day view only .dayLabels { .day { display: flex; @@ -87,6 +93,7 @@ $quarter_height: 10px; } } &.monthView { + // Toolbar of month view > div { overflow-y: scroll; } @@ -97,6 +104,8 @@ $quarter_height: 10px; .allDaysView { border-bottom: 1px solid sg-color($sogoPaper, 300); max-height: $sg-font-size-4 * 6; + overflow: hidden; + overflow-y: scroll; .day { position: relative; @@ -337,7 +346,7 @@ $quarter_height: 10px; } &-left { - left: -$block_margin; + left: -2px; .dragGrip { bottom: 0; left: -1px; @@ -345,7 +354,7 @@ $quarter_height: 10px; } &-right { - right: -$block_margin; + right: -2px; .dragGrip { right: -1px; } diff --git a/UI/WebServerResources/scss/views/_view.scss b/UI/WebServerResources/scss/views/_view.scss index 68253fd00..fea0c37ef 100644 --- a/UI/WebServerResources/scss/views/_view.scss +++ b/UI/WebServerResources/scss/views/_view.scss @@ -96,6 +96,7 @@ $detailView-width: grid-step(8) !global; .sg-face, .sg-back { > md-card { + // Make sure the card is visible and its content scrollable overflow: hidden; min-width: 100%; min-height: 0;