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