mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 15:18:58 +01:00
Pass current app to egw_app_header() so it can set header for correct app. Fixes sometimes wrong app header shown.
This commit is contained in:
parent
a40fdbae0c
commit
9009ef44bb
@ -692,7 +692,7 @@ function etemplate2_handle_load(_type, _response)
|
|||||||
// need to set app_header before message, as message temp. replaces app_header
|
// need to set app_header before message, as message temp. replaces app_header
|
||||||
if (typeof data.data == 'object' && typeof data.data.app_header == 'string')
|
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;
|
delete data.data.app_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,13 +313,14 @@ function egw_message(_msg, _type)
|
|||||||
* Update app-header and website-title
|
* Update app-header and website-title
|
||||||
*
|
*
|
||||||
* @param _header
|
* @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();
|
var framework = egw_getFramework();
|
||||||
if (framework && !window.opener) // not for popups
|
if (framework && !window.opener) // not for popups
|
||||||
{
|
{
|
||||||
var app = egw_getAppName();
|
var app = _app || egw_getAppName();
|
||||||
var title = document.title.replace(/[.*]$/, '['+_header+']');
|
var title = document.title.replace(/[.*]$/, '['+_header+']');
|
||||||
|
|
||||||
framework.setWebsiteTitle.call(window.framework, app, title, _header);
|
framework.setWebsiteTitle.call(window.framework, app, title, _header);
|
||||||
|
Loading…
Reference in New Issue
Block a user