diff --git a/calendar/js/app.js b/calendar/js/app.js index de3a74d438..ed7e9384d0 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -2186,12 +2186,12 @@ app.classes.calendar = AppJS.extend( { if(state.state.view == 'day' && state.state.owner.length === 1 && !isNaN(state.state.owner) && state.state.owner[0] >= 0) { - + view.etemplates[0].widgetContainer.iterateOver(function(w) { w.set_width($j(view.etemplates[0].DOMContainer).width() * 0.69); },this,et2_calendar_timegrid); - $j(view.etemplates[1].DOMContainer).css({"left":"69%", "height":$j(framework.tabsUi.activeTab.contentDiv).height()+'px'}); + $j(view.etemplates[1].DOMContainer).css({"left":"69%", "height":($j(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/js/et2_widget_planner.js b/calendar/js/et2_widget_planner.js index e32addec0d..1de60f50d6 100644 --- a/calendar/js/et2_widget_planner.js +++ b/calendar/js/et2_widget_planner.js @@ -698,6 +698,9 @@ var et2_calendar_planner = et2_calendar_view.extend([et2_IDetachedDOM, et2_IResi // Busy if(!this.doInvalidate) return; + // Not yet ready + if(!this.options.start_date || !this.options.end_date) return; + // Wait a bit to see if anything else changes, then re-draw the days if(this.update_timer !== null) { @@ -1875,7 +1878,7 @@ var et2_calendar_planner = et2_calendar_view.extend([et2_IDetachedDOM, et2_IResi // Allow for toolbar height -= $j('#calendar-toolbar',this.div.parents('.egw_fw_ui_tab_content')).outerHeight(true); - + this.options.height = height; this.div.css('height', this.options.height); // Set height for rows diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js index 12819db997..d2ea50536d 100644 --- a/calendar/js/et2_widget_timegrid.js +++ b/calendar/js/et2_widget_timegrid.js @@ -1397,7 +1397,11 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes // If it's a short label (eg week number), don't give it an extra line // but is empty, but give extra space for a single owner name - this.div.toggleClass('calendar_TimeGridNoLabel', label.trim().length < 6 && typeof this.options.owner === 'object'); + this.div.toggleClass( + 'calendar_TimeGridNoLabel', + label.trim().length > 0 && label.trim().length < 6 || + this.options.owner.length > 1 + ); }, /** diff --git a/calendar/js/et2_widget_view.js b/calendar/js/et2_widget_view.js index f75ffb86a6..c602713da5 100644 --- a/calendar/js/et2_widget_view.js +++ b/calendar/js/et2_widget_view.js @@ -134,7 +134,7 @@ var et2_calendar_view = et2_valueWidget.extend( { if(!new_date || new_date === null) { - throw exception('Invalid start date. ' + new_date.toString()); + new_date = new Date(); } // Use date widget's existing functions to deal @@ -174,7 +174,7 @@ var et2_calendar_view = et2_valueWidget.extend( { if(!new_date || new_date === null) { - throw exception('Invalid end date. ' + new_date.toString()); + new_date = new Date(); } // Use date widget's existing functions to deal if(typeof new_date === "object" || typeof new_date === "string" && new_date.length > 8) diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index 551a24a91b..05e8524dc4 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -71,22 +71,18 @@ } /* Space for toolbar */ -#calendar-view, #calendar-todo, #calendar-planner { - margin-top: -30px; -} -#calendar-list { - margin-top: -55px; -} -#calendar-planner .calendar_plannerWidget { - top: 30px; +#calendar-view, #calendar-todo, #calendar-planner, #calendar-list { + position: absolute; + left: 0px; + right: 0px; } #calendar-todo { position: absolute; width: 30%; - margin-top: 0px; - /* Nice transition when changing days in a week */ + margin-top: 0px;/* Nice transition when changing days in a week */ transition: 1s ease-in-out; + z-index: 10; } #calendar-view {