Calendar - Fix events were not displayed if you clicked 'today' in sidebox, then month view

(Faster implementation)
This commit is contained in:
nathangray 2017-06-13 15:14:55 -06:00
parent 5a700b7e40
commit f8adc0cadf
2 changed files with 11 additions and 5 deletions

View File

@ -2236,8 +2236,10 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Set rows that need it
grid.iterateOver(function(widget) {
var was_disabled = false;
if(row_index < value.length)
{
was_disabled = widget.options.disabled;
widget.set_disabled(false);
}
else
@ -2265,6 +2267,15 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
widget.resizeTimes();
window.setTimeout(jQuery.proxy(widget.set_header_classes, widget),0);
// If disabled while the daycols were loaded, they won't load their events
for(var day = 0; was_disabled && day < widget.day_widgets.length; day++)
{
egw.dataStoreUID(
widget.day_widgets[day].registeredUID,
egw.dataGetUIDdata(widget.day_widgets[day].registeredUID).data
);
}
// Hide loader
widget.loader.hide();
row_index++;

View File

@ -646,11 +646,6 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
}
else if (old_value !== disabled)
{
// If disabled while the daycols are loaded, they won't load their events
for(var day = 0; day < this.day_widgets.length; day++)
{
egw.dataStoreUID(this.day_widgets[day].registeredUID, egw.dataGetUIDdata(this.day_widgets[day].registeredUID).data);
}
// Scroll to start of day - stops jumping in FF
// For some reason on Chrome & FF this doesn't quite get the day start
// to the top, so add 2px;