2 @licstart The following is the entire license notice for the JavaScript code in this file.
6 Copyright (C) 1997-2020 by Dimitri van Heesch
8 Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 and associated documentation files (the "Software"), to deal in the Software without restriction,
10 including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in all copies or
15 substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 @licend The above is the entire license notice for the JavaScript code in this file
25 function toggleVisibility(linkObj)
27 var base = $(linkObj).attr('id');
28 var summary = $('#'+base+'-summary');
29 var content = $('#'+base+'-content');
30 var trigger = $('#'+base+'-trigger');
31 var src=$(trigger).attr('src');
32 if (content.is(':visible')===true) {
35 $(linkObj).addClass('closed').removeClass('opened');
36 $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
40 $(linkObj).removeClass('closed').addClass('opened');
41 $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
46 function updateStripes()
48 $('table.directory tr').
49 removeClass('even').filter(':visible:even').addClass('even');
52 function toggleLevel(level)
54 $('table.directory tr').each(function() {
55 var l = this.id.split('_').length-1;
56 var i = $('#img'+this.id.substring(3));
57 var a = $('#arr'+this.id.substring(3));
59 i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
62 } else if (l==level+1) {
63 i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
73 function toggleFolder(id)
76 var currentRow = $('#row_'+id);
78 // all rows after the clicked row
79 var rows = currentRow.nextAll("tr");
81 var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
83 // only match elements AFTER this one (can't hide elements before)
84 var childRows = rows.filter(function() { return this.id.match(re); });
86 // first row is visible we are HIDING
87 if (childRows.filter(':first').is(':visible')===true) {
88 // replace down arrow by right arrow for current row
89 var currentRowSpans = currentRow.find("span");
90 currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
91 currentRowSpans.filter(".arrow").html('►');
92 rows.filter("[id^=row_"+id+"]").hide(); // hide all children
93 } else { // we are SHOWING
94 // replace right arrow by down arrow for current row
95 var currentRowSpans = currentRow.find("span");
96 currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
97 currentRowSpans.filter(".arrow").html('▼');
98 // replace down arrows by right arrows for child rows
99 var childRowsSpans = childRows.find("span");
100 childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
101 childRowsSpans.filter(".arrow").html('►');
102 childRows.show(); //show all children
108 function toggleInherit(id)
110 var rows = $('tr.inherit.'+id);
111 var img = $('tr.inherit_header.'+id+' img');
112 var src = $(img).attr('src');
113 if (rows.filter(':first').is(':visible')===true) {
114 rows.css('display','none');
115 $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
117 rows.css('display','table-row'); // using show() causes jump in firefox
118 $(img).attr('src',src.substring(0,src.length-10)+'open.png');