diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index dc3c21859b..def4cb9cf3 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -692,7 +692,7 @@ function etemplate2_handle_load(_type, _response) // need to set app_header before message, as message temp. replaces app_header if (typeof data.data == 'object' && typeof data.data.app_header == 'string') { - window.egw_app_header(data.data.app_header); + window.egw_app_header(data.data.app_header, data.data.currentapp||null); delete data.data.app_header; } diff --git a/phpgwapi/js/jsapi/jsapi.js b/phpgwapi/js/jsapi/jsapi.js index 9d17e8d421..443242fe49 100644 --- a/phpgwapi/js/jsapi/jsapi.js +++ b/phpgwapi/js/jsapi/jsapi.js @@ -313,13 +313,14 @@ function egw_message(_msg, _type) * Update app-header and website-title * * @param _header + * @param {_app=null} Application name, if not for the current app */ -function egw_app_header(_header) +function egw_app_header(_header,_app) { var framework = egw_getFramework(); if (framework && !window.opener) // not for popups { - var app = egw_getAppName(); + var app = _app || egw_getAppName(); var title = document.title.replace(/[.*]$/, '['+_header+']'); framework.setWebsiteTitle.call(window.framework, app, title, _header);