mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +01:00
Planner view
- Make week header slightly less weird
This commit is contained in:
parent
db071039a4
commit
f36fe66fe3
@ -1024,7 +1024,7 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
|
||||
var week_end = app.calendar.date.end_of_week(start);
|
||||
var days_in_week = ((week_end-start ) / (24*3600*1000))+1;
|
||||
var week_width = 100 / days * (days <= 7 ? days : days_in_week);
|
||||
for(var left = 0,i = 0; i < days; t.setUTCDate(t.getUTCDate() + 7),left += week_width,i += 7)
|
||||
for(var left = 0,i = 0; i < days; t.setUTCDate(t.getUTCDate() + 7),left += week_width)
|
||||
{
|
||||
// Avoid overflow at the end
|
||||
if(days - i < 7)
|
||||
@ -1058,6 +1058,7 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
|
||||
{
|
||||
content += '<div class="calendar_plannerWeekScale et2_clickable et2_link" data-date=\'' + state + '\' style="left: '+left+'%; width: '+week_width+'%;">'+title+"</div>";
|
||||
}
|
||||
i+= days_in_week;
|
||||
if(days_in_week != 7)
|
||||
{
|
||||
t.setUTCDate(t.getUTCDate() - days_in_week);
|
||||
|
Loading…
Reference in New Issue
Block a user