From 0211be26ba734f094eeeaf017c350191678aef89 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 21 Dec 2016 08:12:16 -0700 Subject: [PATCH] Fix bug where if daily view is in a window that is to small, vertical scrollbar is in the wrong place --- calendar/js/app.js | 8 +++----- calendar/templates/default/app.css | 3 +-- calendar/templates/pixelegg/app.css | 12 +++--------- calendar/templates/pixelegg/app.less | 5 ----- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index c7018c9c7f..9e269997ce 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -2306,11 +2306,9 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( { if(state.state.view == 'day' && state.state.owner.length === 1 && !isNaN(state.state.owner) && state.state.owner[0] >= 0 && !egwIsMobile()) { - view.etemplates[0].widgetContainer.iterateOver(function(w) { - w.set_width(jQuery(view.etemplates[0].DOMContainer).width() * 0.69); - },this,et2_calendar_timegrid); - - jQuery(view.etemplates[1].DOMContainer).css({"left":"69%", "height":(jQuery(framework.tabsUi.activeTab.contentDiv).height()-30)+'px'}); + // Set width to 70%, otherwise if a scrollbar is needed for the view, it will conflict with the todo list + jQuery(app.classes.calendar.views.day.etemplates[0].DOMContainer).css("width","70%"); + jQuery(view.etemplates[1].DOMContainer).css({"left":"70%", "height":(jQuery(framework.tabsUi.activeTab.contentDiv).height()-30)+'px'}); // TODO: Maybe some caching here this.egw.jsonq('calendar_uiviews::ajax_get_todos', [state.state.date, state.state.owner[0]], function(data) { this.getWidgetById('label').set_value(data.label||''); diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index b64682ea0d..67bd401bb8 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -1004,7 +1004,6 @@ Hide subsequent headers in week view with non-consolidated owners } .calendar_calDayTodos { width: 98%; - margin-left: 10px; border: 1px solid silver; } .calendar_calDayTodosHeader { @@ -1026,7 +1025,7 @@ Hide subsequent headers in week view with non-consolidated owners border: 1px solid silver; background-color: #fafafa; position: absolute; - left: 12px; + left: 2px; } /****************************************************** diff --git a/calendar/templates/pixelegg/app.css b/calendar/templates/pixelegg/app.css index 035d10e0a2..4da491c95a 100755 --- a/calendar/templates/pixelegg/app.css +++ b/calendar/templates/pixelegg/app.css @@ -973,7 +973,6 @@ Hide subsequent headers in week view with non-consolidated owners } .calendar_calDayTodos { width: 98%; - margin-left: 10px; border: 1px solid silver; } .calendar_calDayTodosHeader { @@ -994,7 +993,7 @@ Hide subsequent headers in week view with non-consolidated owners border: 1px solid silver; background-color: #fafafa; position: absolute; - left: 12px; + left: 2px; } /****************************************************** * CSS settings for the planner views (calendar_plannerWidget) * @@ -1631,7 +1630,7 @@ div.calendar { } .calendar thead .active { /* Active (pressed) buttons in header */ - background_color: #408DD2; + background_color: #408dd2; /*padding: 2px 0px 0px 2px;*/ } .calendar tbody tr, @@ -2118,7 +2117,7 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget overflow: auto; } .calendar_calAddEvent:hover { - background-color: #FFDD73; + background-color: #ffdd73; cursor: pointer; color: #ffffff; } @@ -2267,11 +2266,6 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget background-color: #1aa200; background-color: #189800 !important; } -.calendar_calDayTodos { - width: 98%; - margin-left: 10px; - border: 1px solid silver; -} .calendar_calDayTodosHeader { text-align: center; } diff --git a/calendar/templates/pixelegg/app.less b/calendar/templates/pixelegg/app.less index 50013700a2..92d96cbf47 100755 --- a/calendar/templates/pixelegg/app.less +++ b/calendar/templates/pixelegg/app.less @@ -899,11 +899,6 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget } } -.calendar_calDayTodos { - width: 98%; - margin-left: 10px; - border: 1px solid silver; -} .calendar_calDayTodosHeader { text-align: center; }