1/* DOKUWIKI:include_once jquery.jOrgChart.js */ 2 3jQuery(function() 4{ 5 jQuery('.wrap_jorgchart > ul').each(function(index){ 6 // Hide the original list 7 jQuery(this).css({display: 'none'}); 8 $orgChartContainer = jQuery(this).parent(); 9 // Add scrollbar, if necessary 10 $orgChartContainer.css({'overflow': 'auto', 'padding-top': '5px', 'padding-bottom': '5px'}); 11 // Add jOrgChart 12 jQuery(this).jOrgChart({ 13 chartElement: $orgChartContainer 14 }); 15 // Fix up the height of the elements, up to 10 levels 16 for(var level=1; level<11; level++) 17 { 18 maxHeight = 0; 19 $orgChartContainer.find("div.node.level" + level).each(function(index) { 20 maxHeight = Math.max(jQuery(this).height(), maxHeight); 21 }); 22 $orgChartContainer.find("div.node.level" + level).each(function(index) { 23 jQuery(this).height(maxHeight); 24 }); 25 } 26 }); 27}); 28