config = $config;
$this->collections = $collections;
$this->msg = $msg;
}
public function get_config_form(){
//A surcharger
}
public function get_config_form_script() {
//A surcharger
}
protected function get_collections_tree(){
global $charset;
global $base_path;
if(empty($this->config['tree'])){
$this->config['tree'] = array();
}
$result="
";
foreach($this->config['tree'] as $pos => $elem){
$result.="
".htmlentities($this->collections[$elem], ENT_QUOTES, $charset)." |
|
";
}
$result.="
";
return $result;
}
public function get_collections_tree_script() {
global $base_path;
return "
var nb_tree_elems = ".count($this->config['tree']).";
function load_tree_elem(elem){
var selected_option = elem.selectedOptions[0];
if(selected_option.value){
var tr = document.createElement('tr');
document.getElementById('tree').appendChild(tr);
tr.setAttribute('id','tree_elem_tr'+nb_tree_elems);
var td = document.createElement('td');
td.setAttribute('recept','yes');
td.setAttribute('recepttype','tree_elem');
td.setAttribute('highlight','tree_elem_show_recept');
td.setAttribute('downlight','tree_elem_hide_recept');
td.setAttribute('id','tree_elem_td'+nb_tree_elems);
td.setAttribute('draggable','yes');
td.setAttribute('callback_after','move_tree_elem');
td.setAttribute('dragtype','tree_elem');
td.setAttribute('dragicon','".get_url_icon('icone_drag_notice.png')."');
td.setAttribute('dragtext',selected_option.innerHTML);
td.innerHTML = '