TreeMaker($prefix);
$this->jsscriptblock = '';
}
/// Generate HTML code for tree. Need to redefine to add javascript cookies block
function make_tree($rootid, $ar) {
global $debugger;
$r = $this->make_tree_r($rootid, $ar);
// $debugger->var_dump('$r');
// return tree with java script block that opens the nodes as remembered in cookies
return $r . "\n";
}
//
// Change default (no code 'cept user data) generation behaviour
//
// Need to generate:
//
// [node start =
]
// [flipper] user data
// [node data end =
]
// [node child start = ]
// [childs code]
// [node child end =
]
//
// Unsymmetrical calls is not important :)
//
function node_start_code($nodeinfo) {
return '';
}
//
function node_flipper_code($nodeinfo) {
$this->itemID = $this->prefix . 'id' . $nodeinfo["id"];
$this->jsscriptblock .= "setFlipWithSign('" . $this->itemID . "'); ";
return '
[+] ';
}
//
function node_data_start_code($nodeinfo) {
return '';
}
//
function node_data_end_code($nodeinfo) {
return '
';
}
//
function node_child_start_code($nodeinfo) {
return '';
}
//
function node_child_end_code($nodeinfo) {
return '
';
}
//
function node_end_code($nodeinfo) {
return '';
}
}
?>