From a467bab01f1738c4204766091d5c50d0b7e0639c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 2 Mar 2021 21:00:59 +0200 Subject: [PATCH] return hashed appName of opened tab eg. to set notifcation counter --- api/js/jsapi/egw_global.d.ts | 3 ++- api/js/jsapi/egw_open.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/js/jsapi/egw_global.d.ts b/api/js/jsapi/egw_global.d.ts index e565e57a67..d66c45e602 100644 --- a/api/js/jsapi/egw_global.d.ts +++ b/api/js/jsapi/egw_global.d.ts @@ -1076,8 +1076,9 @@ declare interface IegwWndLocal extends IegwGlobal * @param {string} _type default "edit", possible "view", "view_list", "edit" (falls back to "view") and "add" * @param {object|string} _extra extra url parameters to append as object or string * @param {object} _framework_app framework app attributes e.g. title or displayName + * @return {string} appname of tab */ - openTab(_id, _app, _type, _extra, _framework_app) : void; + openTab(_id, _app, _type, _extra, _framework_app) : string|void; /** * Get available height of screen diff --git a/api/js/jsapi/egw_open.js b/api/js/jsapi/egw_open.js index a04ce43663..95dc25c079 100644 --- a/api/js/jsapi/egw_open.js +++ b/api/js/jsapi/egw_open.js @@ -242,6 +242,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) * @param {string} _type default "edit", possible "view", "view_list", "edit" (falls back to "view") and "add" * @param {object|string} _extra extra url parameters to append as object or string * @param {object} _framework_app framework app attributes e.g. title or displayName + * @return {string} appname of new tab */ openTab: function(_id, _app, _type, _extra, _framework_app) { @@ -249,7 +250,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) { var data = this.open(_id, _app, _type, _extra, "_tab", false); // Use framework's link handler - _wnd.framework.tabLinkHandler(data.url, _framework_app); + return _wnd.framework.tabLinkHandler(data.url, _framework_app); } else {