From bcba09973f2ddfb4563b0f68e7e3757b4b205859 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 17 Jan 2014 09:23:23 +0000 Subject: [PATCH] pass an id to _add_topmenu_info_item, so templates can use that to generate an id for each div --- phpgwapi/inc/class.egw_framework.inc.php | 11 ++++++----- .../templates/idots/class.idots_framework.inc.php | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index f49d05d19e..d2a92ef31f 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -1298,11 +1298,11 @@ abstract class egw_framework if($GLOBALS['egw_info']['user']['apps']['notifications']) { - $this->_add_topmenu_info_item(self::_get_notification_bell()); + $this->_add_topmenu_info_item(self::_get_notification_bell(), 'notifications'); } - $this->_add_topmenu_info_item($vars['user_info']); - $this->_add_topmenu_info_item($vars['current_users']); - $this->_add_topmenu_info_item($vars['quick_add']); + $this->_add_topmenu_info_item($vars['user_info'], 'user_info'); + $this->_add_topmenu_info_item($vars['current_users'], 'current_users'); + $this->_add_topmenu_info_item($vars['quick_add'], 'quick_add'); } /** @@ -1368,10 +1368,11 @@ abstract class egw_framework * Add info items to the topmenu template class to be displayed * * @param string $content html of item + * @param string $id=null * @access protected * @return void */ - abstract function _add_topmenu_info_item($content); + abstract function _add_topmenu_info_item($content, $id=null); static $top_menu_extra = array(); diff --git a/phpgwapi/templates/idots/class.idots_framework.inc.php b/phpgwapi/templates/idots/class.idots_framework.inc.php index bae64d5add..c63a54533d 100644 --- a/phpgwapi/templates/idots/class.idots_framework.inc.php +++ b/phpgwapi/templates/idots/class.idots_framework.inc.php @@ -497,10 +497,11 @@ egw.set_user('.$GLOBALS['egw']->accounts->json($GLOBALS['egw_info']['user']['acc * Add info items to the topmenu template class to be displayed * * @param string $content html of item + * @param string $id=null * @access protected * @return void */ - function _add_topmenu_info_item($content) + function _add_topmenu_info_item($content, $id=null) { $this->tplsav2->menuinfoitems[] = $content; }