1/** 2 * Javascript functionality for the aclauditor plugin 3 */ 4 5addInitEvent(function() { 6 var t = document.getElementById('aclauditor_scenario_details'); 7 if(!t) return; 8 var trs = t.getElementsByTagName('tr'); 9 for(var i=1; i<trs.length; i++) { 10 if(!trs[i].className.match(/\bexplanations\b/)) continue; 11 trs[i].style.display = 'none'; 12 trs[i-1].style.cursor = 'pointer'; 13 trs[i-1].explanations = trs[i]; 14 trs[i-1].onclick = function() { 15 this.explanations.style.display = (this.explanations.style.display == 'none') ? '' : 'none'; 16 }; 17 } 18}); 19