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