From 1c18fed409d4474a906c7eead0ca6cf73ada4a43 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 28 Sep 2016 16:44:44 +0200 Subject: [PATCH] Fix calendar's user header not working in jdots template --- calendar/templates/default/app.css | 4 ++-- calendar/templates/pixelegg/app.css | 15 +++++++++++++-- calendar/templates/pixelegg/app.less | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index af7f8df3a0..bea866b06f 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -332,13 +332,13 @@ Hide subsequent headers in week view with non-consolidated owners } #calendar-view_view.hideDayColHeader tr:first-of-type .calendar_calGridHeader .calendar_calDayColHeader_spacer { - height: ~"calc(1.5em + 5px)"; + height:calc(1.5em + 5px); } #calendar-view_view.hideDayColHeader tr .calendar_calGridHeader > span.et2_label { white-space:nowrap; display: block; position: static; - width: ~"calc(100% - 58px)"; + width: calc(100% - 58px); margin-left: 58px; color: white; background-color: #2D6393; diff --git a/calendar/templates/pixelegg/app.css b/calendar/templates/pixelegg/app.css index 3929979100..6670c22983 100755 --- a/calendar/templates/pixelegg/app.css +++ b/calendar/templates/pixelegg/app.css @@ -332,13 +332,13 @@ Hide subsequent headers in week view with non-consolidated owners top: 2em; } #calendar-view_view.hideDayColHeader tr:first-of-type .calendar_calGridHeader .calendar_calDayColHeader_spacer { - height: calc(1.5em + 5px); + height: calc(6.5em); } #calendar-view_view.hideDayColHeader tr .calendar_calGridHeader > span.et2_label { white-space: nowrap; display: block; position: static; - width: calc(100% - 58px); + width: calc(42%); margin-left: 58px; color: white; background-color: #2D6393; @@ -1389,12 +1389,14 @@ input#calendar-edit_location { to see if it still fits. */ @media all and (max-width: 1000px) and (min-width: 481px) { + /* styles assigned when width is smaller than 1000px */ .calendar_calDayColHeader > div[data-date] .long_date { display: inline; } .calendar_calDayColHeader > div[data-date] .short_date { display: none; } + /* 7 day needs short day labels */ .calendar_calDayColHeader:first-child:nth-last-child(7) > div[data-date] .short_date, .calendar_calDayColHeader:first-child:nth-last-child(7) ~ .calendar_calDayColHeader > div[data-date] .short_date { display: inline; @@ -1415,10 +1417,12 @@ input#calendar-edit_location { } } @media all and (max-width: 480px) { + /* styles assigned when width is smaller than 480px; */ .calendar_calDayColHeader > div[data-date] .long_date, .calendar_calDayColHeader > div[data-date] .short_date { display: none; } + /* 5 day and less fits short day labels */ .calendar_calDayColHeader:first-child:nth-last-child(3) > div[data-date] .short_date, .calendar_calDayColHeader:first-child:nth-last-child(3) ~ .calendar_calDayColHeader > div[data-date] .short_date, .calendar_calDayColHeader:first-child:nth-last-child(4) > div[data-date] .short_date, @@ -1427,6 +1431,7 @@ input#calendar-edit_location { .calendar_calDayColHeader:first-child:nth-last-child(5) ~ .calendar_calDayColHeader > div[data-date] .short_date { display: inline; } + /* 2 day view and less has enough room for full label */ .calendar_calDayColHeader:first-child:nth-last-child(1) > div[data-date] .long_date, .calendar_calDayColHeader:first-child:nth-last-child(1) ~ .calendar_calDayColHeader > div[data-date] .long_date, .calendar_calDayColHeader:first-child:nth-last-child(2) > div[data-date] .long_date, @@ -2675,5 +2680,11 @@ div#calendar-container div.calendar table tbody tr.rowhilite td { #calendar_merge { margin: 9px 0 0 0; } +#calendar-view_view.hideDayColHeader tr:first-of-type .calendar_calGridHeader .calendar_calDayColHeader_spacer { + height: calc(1.5em + 5px); +} +#calendar-view_view.hideDayColHeader tr .calendar_calGridHeader > span.et2_label { + width: calc(100% - 58px); +} /* ######################################################################################## /* * Calendar END */ diff --git a/calendar/templates/pixelegg/app.less b/calendar/templates/pixelegg/app.less index b3e55e0423..2e28b94291 100755 --- a/calendar/templates/pixelegg/app.less +++ b/calendar/templates/pixelegg/app.less @@ -1278,6 +1278,14 @@ div#calendar-container { // insert a document #calendar_merge {margin: 9px 0 0 0;} +#calendar-view_view.hideDayColHeader +{ + tr { + &:first-of-type .calendar_calGridHeader .calendar_calDayColHeader_spacer {height: ~"calc(1.5em + 5px)";} + .calendar_calGridHeader > span.et2_label {width:~"calc(100% - 58px)";} + } +} + /* ######################################################################################## /* * Calendar END */