(id)
| 73 | } |
| 74 | |
| 75 | function toggleFolder(id) |
| 76 | { |
| 77 | // the clicked row |
| 78 | var currentRow = $('#row_'+id); |
| 79 | |
| 80 | // all rows after the clicked row |
| 81 | var rows = currentRow.nextAll("tr"); |
| 82 | |
| 83 | var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub |
| 84 | |
| 85 | // only match elements AFTER this one (can't hide elements before) |
| 86 | var childRows = rows.filter(function() { return this.id.match(re); }); |
| 87 | |
| 88 | // first row is visible we are HIDING |
| 89 | if (childRows.filter(':first').is(':visible')===true) { |
| 90 | // replace down arrow by right arrow for current row |
| 91 | var currentRowSpans = currentRow.find("span"); |
| 92 | currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); |
| 93 | currentRowSpans.filter(".arrow").html('►'); |
| 94 | rows.filter("[id^=row_"+id+"]").hide(); // hide all children |
| 95 | } else { // we are SHOWING |
| 96 | // replace right arrow by down arrow for current row |
| 97 | var currentRowSpans = currentRow.find("span"); |
| 98 | currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen"); |
| 99 | currentRowSpans.filter(".arrow").html('▼'); |
| 100 | // replace down arrows by right arrows for child rows |
| 101 | var childRowsSpans = childRows.find("span"); |
| 102 | childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); |
| 103 | childRowsSpans.filter(".arrow").html('►'); |
| 104 | childRows.show(); //show all children |
| 105 | } |
| 106 | updateStripes(); |
| 107 | } |
| 108 | |
| 109 | |
| 110 | function toggleInherit(id) |
nothing calls this directly
no test coverage detected