Planner view

- Make week header slightly less weird - Fix trailing partial weeks
This commit is contained in:
Nathan Gray 2015-12-17 23:38:16 +00:00
parent f36fe66fe3
commit 7e445d2d6b

View File

@ -1029,7 +1029,7 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
// Avoid overflow at the end // Avoid overflow at the end
if(days - i < 7) if(days - i < 7)
{ {
days_in_week = days-i+1; days_in_week = days-i;
} }
week_width = 100 / days * Math.min(days, days_in_week); week_width = 100 / days * Math.min(days, days_in_week);
@ -1054,7 +1054,7 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
title + title +
this._scroll_button('right',app.calendar.date.start_of_week(right).toJSON()); this._scroll_button('right',app.calendar.date.start_of_week(right).toJSON());
} }
if(days_in_week > 2) if(days_in_week > 1)
{ {
content += '<div class="calendar_plannerWeekScale et2_clickable et2_link" data-date=\'' + state + '\' style="left: '+left+'%; width: '+week_width+'%;">'+title+"</div>"; content += '<div class="calendar_plannerWeekScale et2_clickable et2_link" data-date=\'' + state + '\' style="left: '+left+'%; width: '+week_width+'%;">'+title+"</div>";
} }