framework->isTop($consider_navbar_not_yet_called_as_true=true): true if we are rendering the top-level EGroupware window

This commit is contained in:
Ralf Becker 2012-03-07 08:45:57 +00:00
parent 548ac686d8
commit 000b74bded
2 changed files with 24 additions and 0 deletions

View File

@ -177,6 +177,16 @@ abstract class egw_framework
*/
abstract function navbar();
/**
* Return true if we are rendering the top-level EGroupware window
*
* A top-level EGroupware window has a navbar: eg. no popup and for a framed template (jdots) only frameset itself
*
* @return boolean $consider_navbar_not_yet_called_as_true=true
* @return boolean
*/
abstract function isTop($consider_navbar_not_yet_called_as_true=true);
/**
* Returns the content of one sidebox
*

View File

@ -292,6 +292,20 @@ egw.set_user('.$GLOBALS['egw']->accounts->json($GLOBALS['egw_info']['user']['acc
return $content;
}
/**
* Return true if we are rendering the top-level EGroupware window
*
* A top-level EGroupware window has a navbar: eg. no popup and for a framed template (jdots) only frameset itself
*
* @return boolean $consider_navbar_not_yet_called_as_true=true
* @return boolean
*/
public function isTop($consider_navbar_not_yet_called_as_true=true)
{
return self::$navbar_done || $consider_navbar_not_yet_called_as_true ||
isset($GLOBALS['egw_info']['flags']['nonavbar']) && !$GLOBALS['egw_info']['flags']['nonavbar'];
}
/**
* displays a login screen
*