mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
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
|
||||
// the times, as they may have changed
|
||||
widget.resizeTimes();
|
||||
window.setTimeout(jQuery.proxy(widget.set_header_classes, widget),0);
|
||||
|
||||
// Hide loader
|
||||
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.set_header_classes();
|
||||
|
||||
// Create / update day widgets with dates and data
|
||||
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('');
|
||||
}
|
||||
|
||||
// Position
|
||||
day.set_left((day_width * i) + 'px');
|
||||
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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user