forked from extern/egroupware
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'];
|
||||
|
||||
$value = array(
|
||||
'value' => substr($id, 0, -1) == $type ? $id : $type . $id,
|
||||
'value' => substr($id, 0, 1) == $type ? $id : $type . $id,
|
||||
'label' => $title,
|
||||
'app' => lang($data['app'])
|
||||
);
|
||||
|
@ -79,13 +79,14 @@ export class CalendarOwner extends Et2Select
|
||||
}
|
||||
// Put it in the list of options
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user