egw.preference(name, app, true) returns now a promise to query preference async

changed notifications to query preference async together with lang-files
fixed error-handling in new egw.json()
This commit is contained in:
Ralf Becker
2021-07-16 14:50:06 +02:00
parent 87694e660c
commit ce0a513187
3 changed files with 36 additions and 17 deletions

View File

@@ -908,7 +908,10 @@
var self = notifications;
var langRequire = jQuery('#notifications_script_id').attr('data-langRequire');
egw.langRequire(window, [JSON.parse(langRequire)]).then(()=>
Promise.all([
egw.langRequire(window, [JSON.parse(langRequire)]),
egw.preference('notification_chain','notifications', true)
]).then(() =>
{
var $egwpopup_fw = jQuery('#topmenu_info_notifications');
switch (egw.preference('notification_chain','notifications'))