forked from extern/egroupware
Fix day header coloring from other months was kept when the week was reused
This commit is contained in:
parent
b86dfa52bb
commit
78593797c9
@ -2254,6 +2254,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
|||||||
// Do not need to re-set this row, but we do need to re-do
|
// Do not need to re-set this row, but we do need to re-do
|
||||||
// the times, as they may have changed
|
// the times, as they may have changed
|
||||||
widget.resizeTimes();
|
widget.resizeTimes();
|
||||||
|
window.setTimeout(jQuery.proxy(widget.set_header_classes, widget),0);
|
||||||
|
|
||||||
// Hide loader
|
// Hide loader
|
||||||
widget.loader.hide();
|
widget.loader.hide();
|
||||||
|
@ -935,22 +935,13 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
|
|||||||
this.day_widgets.splice(delete_index--,1);
|
this.day_widgets.splice(delete_index--,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.set_header_classes();
|
||||||
|
|
||||||
// Create / update day widgets with dates and data
|
// Create / update day widgets with dates and data
|
||||||
for(var i = 0; i < this.day_widgets.length; i++)
|
for(var i = 0; i < this.day_widgets.length; i++)
|
||||||
{
|
{
|
||||||
day = this.day_widgets[i];
|
day = this.day_widgets[i];
|
||||||
|
|
||||||
// Classes
|
|
||||||
if(app.calendar && app.calendar.state &&
|
|
||||||
this.day_list[i] && parseInt(this.day_list[i].substr(4,2)) !== new Date(app.calendar.state.date).getUTCMonth()+1)
|
|
||||||
{
|
|
||||||
day.set_class('calendar_differentMonth');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
day.set_class('');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Position
|
// Position
|
||||||
day.set_left((day_width * i) + 'px');
|
day.set_left((day_width * i) + 'px');
|
||||||
if(this.daily_owner)
|
if(this.daily_owner)
|
||||||
@ -1000,6 +991,30 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
|
|||||||
*/
|
*/
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set header classes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
set_header_classes: function()
|
||||||
|
{
|
||||||
|
var day;
|
||||||
|
for(var i = 0; i < this.day_widgets.length; i++)
|
||||||
|
{
|
||||||
|
day = this.day_widgets[i];
|
||||||
|
|
||||||
|
// Classes
|
||||||
|
if(app.calendar && app.calendar.state &&
|
||||||
|
this.day_list[i] && parseInt(this.day_list[i].substr(4,2)) !== new Date(app.calendar.state.date).getUTCMonth()+1)
|
||||||
|
{
|
||||||
|
day.set_class('calendar_differentMonth');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
day.set_class('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update UI while scrolling within the selected time
|
* Update UI while scrolling within the selected time
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user