param for html::tree() to enable drag-n-drop (can not be done later, if autoloading is used!)

This commit is contained in:
Ralf Becker 2010-12-28 02:59:03 +00:00
parent 70030216f3
commit 3851389fdc

View File

@ -1200,11 +1200,13 @@ class html
* @param string $folderImageDir=null string path to the tree menu images, null uses default path
* @param string|array $autoLoading=null EGw relative path or array with get parameter, both send through egw::link
* @param string $dataMode='JSON' data type for autoloading: XML, JSON, CSV
* @param boolean $dragndrop=false true to enable drag-n-drop (must be before autoloading get enabled!)
*
* @return string the html code, to be added into the template
*/
static function tree($_folders,$_selected,$_topFolder=false,$_onNodeSelect="null",$tree='foldertree',$_divClass='',
$_leafImage='',$_onCheckHandler=false,$delimiter='/',$folderImageDir=null,$autoLoading=null,$dataMode='JSON')
$_leafImage='',$_onCheckHandler=false,$delimiter='/',$folderImageDir=null,$autoLoading=null,$dataMode='JSON',
$dragndrop=false)
{
if(is_null($folderImageDir))
{
@ -1234,6 +1236,8 @@ class html
$html .= "$tree.setOnCheckHandler('$_onCheckHandler');\n";
}
if ($dragndrop) $html .= "$tree.enableDragAndDrop(true);\n";
if ($autoLoading)
{
$autoLoading = is_array($autoLoading) ?