scheduler.attachEvent("onTimelineCreated",function(A){if(A.render=="tree"){A.y_unit_original=A.y_unit;A.y_unit=scheduler._getArrayToDisplay(A.y_unit_original);scheduler.form_blocks[A.name]={render:function(C){var B="
";return B},set_value:function(D,I,G,C){var J=scheduler._getArrayForSelect(scheduler.matrix[C.type].y_unit_original,C.type);D.innerHTML="";var F=document.createElement("select");D.appendChild(F);var H=D.getElementsByTagName("select")[0];for(var E=0;E"+((E.open)?"-":"+")+"";G=(H.folder_events_available)?"dhx_data_table folder_events":"dhx_data_table folder"}else{I=H.dy;D="dhx_row_item";B="dhx_matrix_scell item";C="";G="dhx_data_table"}td_content=""+C+"
"+(scheduler.templates[H.name+"_scale_label"](E.key,E.label,H)||E.label)+"
";F={height:I,style_height:A,tr_className:D,td_className:B,td_content:td_content,table_className:G}}return F});var section_id_before;scheduler.attachEvent("onBeforeEventChanged",function(D,A,C){if(scheduler._isRender("tree")){var B=scheduler.getSection(D.section_id);if(typeof B.children!="undefined"&&!scheduler.matrix[scheduler._mode].folder_events_available){if(!C){D[scheduler.matrix[scheduler._mode].y_property]=section_id_before}return false}}return true});scheduler.attachEvent("onBeforeDrag",function(D,E,C){var A=scheduler._locate_cell_timeline(C);if(A){var B=scheduler.matrix[scheduler._mode].y_unit[A.y].key;if(typeof scheduler.matrix[scheduler._mode].y_unit[A.y].children!="undefined"&&!scheduler.matrix[scheduler._mode].folder_events_available){return false}}if(scheduler._isRender("tree")){ev=scheduler.getEvent(D);section_id_before=B||ev[scheduler.matrix[scheduler._mode].y_property]}return true});scheduler._getArrayToDisplay=function(C){var A=[];var B=function(G,D){var F=D||0;for(var E=0;E