mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 18:31:26 +01:00
Fix missing / doubled calendar owners in sidemenu
This commit is contained in:
parent
26d4082cda
commit
05a4fc2758
@ -299,7 +299,7 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
|
|||||||
$type = $data['type'];
|
$type = $data['type'];
|
||||||
|
|
||||||
$value = array(
|
$value = array(
|
||||||
'value' => substr($id, 0, -1) == $type ? $id : $type . $id,
|
'value' => substr($id, 0, 1) == $type ? $id : $type . $id,
|
||||||
'label' => $title,
|
'label' => $title,
|
||||||
'app' => lang($data['app'])
|
'app' => lang($data['app'])
|
||||||
);
|
);
|
||||||
|
@ -79,13 +79,14 @@ export class CalendarOwner extends Et2Select
|
|||||||
}
|
}
|
||||||
// Put it in the list of options
|
// Put it in the list of options
|
||||||
let index = this.select_options.findIndex(o => o.value == owner);
|
let index = this.select_options.findIndex(o => o.value == owner);
|
||||||
if(index !== -1)
|
let remote_index = this._selected_remote.findIndex(o => o.value == owner);
|
||||||
|
if(remote_index !== -1)
|
||||||
{
|
{
|
||||||
this.select_options[index] = data[owner];
|
this._selected_remote[remote_index] = data[owner];
|
||||||
}
|
}
|
||||||
else
|
else if(index == -1)
|
||||||
{
|
{
|
||||||
this.select_options.push(data[owner]);
|
this._selected_remote.push(data[owner]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.requestUpdate("select_options");
|
this.requestUpdate("select_options");
|
||||||
|
Loading…
Reference in New Issue
Block a user