includes/clientside/static/admin-menu.js
changeset 1023 5a282dbf8fad
parent 1010 12e76b1acb4e
child 1046 cfc6c30c5e2d
equal deleted inserted replaced
1021:5990ac411f34 1023:5a282dbf8fad
    38 else
    38 else
    39 {
    39 {
    40   var ck = 0;
    40   var ck = 0;
    41 }
    41 }
    42 
    42 
    43 function tree (a_items, a_template) {
    43 function tree (a_items, a_template, s_target) {
    44 
    44 
    45 	this.a_tpl      = a_template;
    45 	this.a_tpl      = a_template;
    46 	this.a_config   = a_items;
    46 	this.a_config   = a_items;
    47 	this.o_root     = this;
    47 	this.o_root     = this;
    48 	this.a_index    = [];
    48 	this.a_index    = [];
    75   }
    75   }
    76 
    76 
    77 	this.n_id = trees.length;
    77 	this.n_id = trees.length;
    78 	trees[this.n_id] = this;
    78 	trees[this.n_id] = this;
    79 	
    79 	
    80 	for (var i = 0; i < this.a_children.length; i++) {
    80 	for (var i = 0; i < this.a_children.length; i++)
    81 		document.write(this.a_children[i].init());
    81   {
       
    82     if ( s_target )
       
    83       document.getElementById(s_target).innerHTML += this.a_children[i].init();
       
    84     else
       
    85       document.write(this.a_children[i].init());
    82 		this.a_children[i].open(false, true);
    86 		this.a_children[i].open(false, true);
    83 	}
    87 	}
    84 }
    88 }
    85 function tree_item (o_parent, n_order) {
    89 function tree_item (o_parent, n_order) {
    86 
    90