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:
Nathan Gray
2013-12-23 16:13:40 +00:00
parent a40fdbae0c
commit 9009ef44bb
2 changed files with 4 additions and 3 deletions

View File

@ -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);