/* DOKUWIKI:include_once jquery.jOrgChart.js */ jQuery(function() { jQuery('.wrap_jorgchart > ul').each(function(index){ // Hide the original list jQuery(this).css({display: 'none'}); $orgChartContainer = jQuery(this).parent(); // Add scrollbar, if necessary $orgChartContainer.css({'overflow': 'auto', 'padding-top': '5px', 'padding-bottom': '5px'}); // Add jOrgChart jQuery(this).jOrgChart({ chartElement: $orgChartContainer }); // Fix up the height of the elements, up to 10 levels for(var level=1; level<11; level++) { maxHeight = 0; $orgChartContainer.find("div.node.level" + level).each(function(index) { maxHeight = Math.max(jQuery(this).height(), maxHeight); }); $orgChartContainer.find("div.node.level" + level).each(function(index) { jQuery(this).height(maxHeight); }); } }); });