pass an id to _add_topmenu_info_item, so templates can use that to generate an id for each div

This commit is contained in:
Ralf Becker 2014-01-17 09:23:23 +00:00
parent 605ead0c59
commit bcba09973f
2 changed files with 8 additions and 6 deletions

View File

@ -1298,11 +1298,11 @@ abstract class egw_framework
if($GLOBALS['egw_info']['user']['apps']['notifications']) 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['user_info'], 'user_info');
$this->_add_topmenu_info_item($vars['current_users']); $this->_add_topmenu_info_item($vars['current_users'], 'current_users');
$this->_add_topmenu_info_item($vars['quick_add']); $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 * Add info items to the topmenu template class to be displayed
* *
* @param string $content html of item * @param string $content html of item
* @param string $id=null
* @access protected * @access protected
* @return void * @return void
*/ */
abstract function _add_topmenu_info_item($content); abstract function _add_topmenu_info_item($content, $id=null);
static $top_menu_extra = array(); static $top_menu_extra = array();

View File

@ -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 * Add info items to the topmenu template class to be displayed
* *
* @param string $content html of item * @param string $content html of item
* @param string $id=null
* @access protected * @access protected
* @return void * @return void
*/ */
function _add_topmenu_info_item($content) function _add_topmenu_info_item($content, $id=null)
{ {
$this->tplsav2->menuinfoitems[] = $content; $this->tplsav2->menuinfoitems[] = $content;
} }