<script language="javascript">
var simpleTreeCollection, h2, h1;
$(document).ready(function(){
//});
simpleTreeCollection = $('.simpleTree').simpleTree({
imgFolder: 'jss/simpletree/skin_default/',
autoclose: true,
drag: true,
afterClick:function(node){
//window.location.href = "?id="+node.attr("id");
//alert("text-"+$('span:first',node).text());
//alert(node.attr("id"));
$("span.id2").html($('span:first',node).text());
h1 = document.getElementById("a").parentNode.offsetHeight;
var nodes_close = [2, 3];
$(nodes_close).each(function(i){
var node=$(".simpleTree #"+nodes_close[i]);
node[0].className = node[0].className.replace("folder-open","folder-close");
$(">ul", node).hide();
node.parents("li").each(function(t){
if(this.className!="root")
{
this.className = this.className.replace("folder-open","folder-close");
$(">ul", this).hide();
}
});
});
//document.getElementById("111").className = 'folder-close';
//$(">ul", node).hide();
//document.getElementById("1").className += ' folder-close';
//$("ul.simpleTree li#111").className.replace("folder-open");
//alert(document.getElementById("111").className);
//$("ul.simpleTree").remove();
//$("ul.simpleTree li#111").removeClass();
//$("ul.simpleTree li#111").addClass('folder-close');
//simpleTreeCollection.get(1).convertToDoc(node);
h2 = document.getElementById("a").parentNode.offsetHeight;
//$("div#a").hide();
document.getElementById("b").style.height = document.getElementById("b").parentNode.offsetHeight +h1- h2 +'px';
},
afterDblClick:function(node){
//alert("text-"+$('span:first',node).text());
},
afterMove:function(destination, source, pos){
//alert("destination-"+destination.attr('id')+" source-"+source.attr('id')+" pos-"+pos);
},
afterAjax:function()
{
//alert('Loaded');
},
animate:true
,docToFolderConvert:true
});
$("ul.simpleTree li.folder-open-last #111").click(function(){
h3= document.getElementById("a").parentNode.offsetHeight;
h4 = document.getElementById("a").parentNode.offsetHeight;
document.getElementById("b").style.height = document.getElementById("b").parentNode.offsetHeight -h3+ h4 +'px';
});
});
</script>