mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
Calendar: Fix different template load order could result in missing categories and extra loading
This commit is contained in:
parent
60643d86b2
commit
3398c97055
@ -722,10 +722,22 @@ export class et2_calendar_planner extends et2_calendar_view implements et2_IDeta
|
||||
row_labels: function()
|
||||
{
|
||||
var im = this.getInstanceManager();
|
||||
this.nodeName = "ET2-SELECT-CAT_RO"
|
||||
var categories = <SelectOption[]>StaticOptions.cached_server_side(this, "cat", ',,,calendar', false);
|
||||
|
||||
var labels = [];
|
||||
var categories = <SelectOption[]>StaticOptions.cached_server_side(this, "cat", ',,,calendar', false);
|
||||
if(!categories || categories.length == 0)
|
||||
{
|
||||
// No categories at all? Probably loading before sidebox is done. Ask directly and wait for them, rather than firing
|
||||
// 50 different requests.
|
||||
egw.json(
|
||||
'EGroupware\\Api\\Etemplate\\Widget\\Select::ajax_get_options',
|
||||
['select-cat', ',,,calendar'],
|
||||
function(data)
|
||||
{
|
||||
categories = data;
|
||||
}
|
||||
).sendRequest(false);
|
||||
}
|
||||
|
||||
let app_calendar = this.getInstanceManager().app_obj.calendar || app.calendar;
|
||||
if(!app_calendar.state.cat_id ||
|
||||
app_calendar.state.cat_id.toString() === '' ||
|
||||
|
Loading…
Reference in New Issue
Block a user