forked from extern/egroupware
Fix yearly planner had different day widths for longer or shorter months
This commit is contained in:
parent
46d02bf967
commit
fa7cbf6fcd
@ -108,10 +108,11 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
|
|||||||
if (this._parent.options.group_by === 'month')
|
if (this._parent.options.group_by === 'month')
|
||||||
{
|
{
|
||||||
days = new Date(this.options.end_date.getUTCFullYear(),this.options.end_date.getUTCMonth()+1,0).getUTCDate();
|
days = new Date(this.options.end_date.getUTCFullYear(),this.options.end_date.getUTCMonth()+1,0).getUTCDate();
|
||||||
|
|
||||||
if(days < 31)
|
if(days < 31)
|
||||||
{
|
{
|
||||||
width = 100*days/31;
|
var diff = 31 - days;
|
||||||
this.rows.css('width','calc('+width+'% - 162px)');
|
width = 'calc('+(diff * 3.23) + '% - ' + (diff * 7) + 'px)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +126,7 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
|
|||||||
{
|
{
|
||||||
// add a filler for non existing days in that month
|
// add a filler for non existing days in that month
|
||||||
this.rows.after('<div class="calendar_eventRowsFiller"'+
|
this.rows.after('<div class="calendar_eventRowsFiller"'+
|
||||||
' style="width:'+(99.5-width)+'%;" ></div>');
|
' style="width:'+width+';" ></div>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -191,7 +192,7 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
|
|||||||
*/
|
*/
|
||||||
_yearlyPlannerMarkDays: function(start,days)
|
_yearlyPlannerMarkDays: function(start,days)
|
||||||
{
|
{
|
||||||
var day_width = 100/days;
|
var day_width = 3.23;
|
||||||
var t = new Date(start);
|
var t = new Date(start);
|
||||||
var content = '';
|
var content = '';
|
||||||
for(var i = 0; i < days;i++)
|
for(var i = 0; i < days;i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user