(id)
| 47 | } |
| 48 | |
| 49 | function toggleFolder(id) |
| 50 | { |
| 51 | // the clicked row |
| 52 | var currentRow = $('#row_'+id); |
| 53 | |
| 54 | // all rows after the clicked row |
| 55 | var rows = currentRow.nextAll("tr"); |
| 56 | |
| 57 | var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub |
| 58 | |
| 59 | // only match elements AFTER this one (can't hide elements before) |
| 60 | var childRows = rows.filter(function() { return this.id.match(re); }); |
| 61 | |
| 62 | // first row is visible we are HIDING |
| 63 | if (childRows.filter(':first').is(':visible')===true) { |
| 64 | // replace down arrow by right arrow for current row |
| 65 | var currentRowSpans = currentRow.find("span"); |
| 66 | currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); |
| 67 | currentRowSpans.filter(".arrow").html('►'); |
| 68 | rows.filter("[id^=row_"+id+"]").hide(); // hide all children |
| 69 | } else { // we are SHOWING |
| 70 | // replace right arrow by down arrow for current row |
| 71 | var currentRowSpans = currentRow.find("span"); |
| 72 | currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen"); |
| 73 | currentRowSpans.filter(".arrow").html('▼'); |
| 74 | // replace down arrows by right arrows for child rows |
| 75 | var childRowsSpans = childRows.find("span"); |
| 76 | childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); |
| 77 | childRowsSpans.filter(".arrow").html('►'); |
| 78 | childRows.show(); //show all children |
| 79 | } |
| 80 | updateStripes(); |
| 81 | } |
| 82 | |
| 83 | |
| 84 | function toggleInherit(id) |
nothing calls this directly
no test coverage detected