1 function toggleVisibility(linkObj)
3 var base = $(linkObj).attr(
'id');
4 var summary = $(
'#'+base+
'-summary');
5 var content = $(
'#'+base+
'-content');
6 var trigger = $(
'#'+base+
'-trigger');
7 var src=$(trigger).attr(
'src');
8 if (content.is(
':visible')===
true) {
11 $(linkObj).addClass(
'closed').removeClass(
'opened');
12 $(trigger).attr(
'src',src.substring(0,src.length-8)+
'closed.png');
16 $(linkObj).removeClass(
'closed').addClass(
'opened');
17 $(trigger).attr(
'src',src.substring(0,src.length-10)+
'open.png');
22 function updateStripes()
24 $(
'table.directory tr').
25 removeClass(
'even').filter(
':visible:even').addClass(
'even');
28 function toggleLevel(level)
30 $(
'table.directory tr').each(
function() {
31 var l = this.
id.split(
'_').length-1;
32 var i = $(
'#img'+this.
id.substring(3));
33 var
a = $(
'#arr'+this.
id.substring(3));
35 i.removeClass(
'iconfopen iconfclosed').addClass(
'iconfopen');
38 }
else if (l==level+1) {
39 i.removeClass(
'iconfclosed iconfopen').addClass(
'iconfclosed');
49 function toggleFolder(
id)
52 var currentRow = $(
'#row_'+id);
55 var rows = currentRow.nextAll(
"tr");
57 var re =
new RegExp(
'^row_'+
id+
'\\d+_$',
"i");
60 var childRows = rows.filter(
function() {
return this.
id.match(re); });
63 if (childRows.filter(
':first').is(
':visible')===
true) {
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();
71 var currentRowSpans = currentRow.find(
"span");
72 currentRowSpans.filter(
".iconfclosed").removeClass(
"iconfclosed").addClass(
"iconfopen");
73 currentRowSpans.filter(
".arrow").html(
'▼');
75 var childRowsSpans = childRows.find(
"span");
76 childRowsSpans.filter(
".iconfopen").removeClass(
"iconfopen").addClass(
"iconfclosed");
77 childRowsSpans.filter(
".arrow").html(
'►');
84 function toggleInherit(
id)
86 var rows = $(
'tr.inherit.'+id);
87 var img = $(
'tr.inherit_header.'+
id+
' img');
88 var src = $(img).attr(
'src');
89 if (rows.filter(
':first').is(
':visible')===
true) {
90 rows.css(
'display',
'none');
91 $(img).attr(
'src',src.substring(0,src.length-8)+
'closed.png');
93 rows.css(
'display',
'table-row');
94 $(img).attr(
'src',src.substring(0,src.length-10)+
'open.png');