mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
When an infolog changes, only refresh calendar when it's the active app, otherwise wait until it is activated. Fixes event positioning problems caused by refreshing while hidden without needing to recalculate everything while hidden.
This commit is contained in:
parent
d34184e56c
commit
170f53d1af
@ -301,10 +301,25 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
|||||||
}
|
}
|
||||||
if (do_refresh)
|
if (do_refresh)
|
||||||
{
|
{
|
||||||
// Discard cache, reload
|
// Discard cache
|
||||||
this._clear_cache();
|
this._clear_cache();
|
||||||
|
|
||||||
|
// Calendar is the current application, refresh now
|
||||||
|
if(framework.activeApp.appName == this.appName)
|
||||||
|
{
|
||||||
this.setState({state: this.state});
|
this.setState({state: this.state});
|
||||||
}
|
}
|
||||||
|
// Bind once to trigger a refresh when tab is activated again
|
||||||
|
else if(framework.applications.calendar && framework.applications.calendar.tab &&
|
||||||
|
framework.applications.calendar.tab.contentDiv)
|
||||||
|
{
|
||||||
|
jQuery(framework.applications.calendar.tab.contentDiv)
|
||||||
|
.off('show.calendar')
|
||||||
|
.one('show.calendar',
|
||||||
|
jQuery.proxy(function() {this.setState({state: this.state});},this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'calendar':
|
case 'calendar':
|
||||||
// Regular refresh
|
// Regular refresh
|
||||||
|
Loading…
Reference in New Issue
Block a user