From f957bdfa831beda1981758da71e3394053504926 Mon Sep 17 00:00:00 2001 From: Pim Snel Date: Tue, 2 Jan 2007 23:26:53 +0000 Subject: [PATCH] add option custom image path parameter for tree menu to enable custom icons --- phpgwapi/inc/class.html.inc.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 6d91f6e520..815a5044c0 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -1173,13 +1173,17 @@ class html * @param string $_leafImage='' default image of a leaf-node, ''=default of foldertree, set it eg. 'folderClosed.gif' to show leafs as folders * @param boolean/string $_onCheckHandler=false string with handler-name to display a checkbox for each folder, or false (default) * @param string $delimiter='/' path-delimiter, default / + * @param mixed $folderImageDir=null string path to the tree menu images, null uses default path * * @return string the html code, to be added into the template */ - function tree($_folders,$_selected,$_topFolder=false,$_onNodeSelect="null",$_divId='foldertree',$_divClass='',$_leafImage='',$_onCheckHandler=false,$delimiter='/') + function tree($_folders,$_selected,$_topFolder=false,$_onNodeSelect="null",$_divId='foldertree',$_divClass='',$_leafImage='',$_onCheckHandler=false,$delimiter='/',$folderImageDir=null) { - $folderImageDir = $GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/templates/default/images/'; - + if(is_null($folderImageDir)) + { + $folderImageDir = $GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/templates/default/images/'; + } + $html = $this->div("\n",'id="'.$_divId.'"',$_divClass); static $tree_initialised=false;