mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-19 04:46:42 +02:00
Favourites:
- dispatch event when adding / removing preference - favourite widgets listen for event to update
This commit is contained in:
@@ -1230,6 +1230,15 @@ export abstract class EgwApp
|
||||
this.egw.set_preference(this.appname, favorite_pref, favorite);
|
||||
}
|
||||
|
||||
// Trigger event so widgets can update
|
||||
document.dispatchEvent(new CustomEvent("preferenceChange", {
|
||||
bubbles: true,
|
||||
detail: {
|
||||
application: this.appname,
|
||||
preference: favorite_pref
|
||||
}
|
||||
}));
|
||||
|
||||
// Add to list immediately
|
||||
if(this.sidebox)
|
||||
{
|
||||
|
Reference in New Issue
Block a user