Make sure single day does not get partially covered by todos

This commit is contained in:
nathangray 2016-07-04 09:17:34 -06:00
parent d5a97279a7
commit 4d3cf6c58e
2 changed files with 4 additions and 4 deletions

View File

@ -2263,11 +2263,8 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
}
else
{
jQuery(app.classes.calendar.views.day.etemplates[1].DOMContainer).show();
jQuery(app.classes.calendar.views.day.etemplates[1].DOMContainer).css("left","100%");
window.setTimeout(jQuery.proxy(function() {
jQuery(this).hide();
},app.classes.calendar.views.day.etemplates[1].DOMContainer),1000);
jQuery(app.classes.calendar.views.day.etemplates[1].DOMContainer).hide();
jQuery(app.classes.calendar.views.day.etemplates[0].DOMContainer).css("width","100%");
view.etemplates[0].widgetContainer.iterateOver(function(w) {
w.set_width('100%');

View File

@ -2150,6 +2150,9 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
// Try to resize width, though animations cause problems
var total_width = jQuery(this.getInstanceManager().DOMContainer).parent().innerWidth() - this.days.position().left;
// Space for todos, if there
total_width -= jQuery(this.getInstanceManager().DOMContainer).siblings().has(':visible').not('#calendar-toolbar').outerWidth()
var day_width = (total_width > 0 ? total_width : jQuery(this.getInstanceManager().DOMContainer).width())/this.day_widgets.length;
// update day widgets
for(var i = 0; i < this.day_widgets.length; i++)