1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
"function toggleVisibility(linkObj)\n"
"{\n"
" var base = $(linkObj).attr('id');\n"
" var summary = $('#'+base+'-summary');\n"
" var content = $('#'+base+'-content');\n"
" var trigger = $('#'+base+'-trigger');\n"
" var src=$(trigger).attr('src');\n"
" if (content.is(':visible')===true) {\n"
" content.hide();\n"
" summary.show();\n"
" $(linkObj).addClass('closed').removeClass('opened');\n"
" $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');\n"
" } else {\n"
" content.show();\n"
" summary.hide();\n"
" $(linkObj).removeClass('closed').addClass('opened');\n"
" $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');\n"
" } \n"
" return false;\n"
"}\n"
"\n"
"function updateStripes()\n"
"{\n"
" $('table.directory tr').\n"
" removeClass('even').filter(':visible:even').addClass('even');\n"
"}\n"
"function toggleLevel(level)\n"
"{\n"
" $('table.directory tr').each(function(){ \n"
" var l = this.id.split('_').length-1;\n"
" var i = $('#img'+this.id.substring(3));\n"
" var a = $('#arr'+this.id.substring(3));\n"
" if (l<level+1) {\n"
" i.attr('src','ftv2folderopen.png');\n"
" a.attr('src','ftv2mnode.png');\n"
" $(this).show();\n"
" } else if (l==level+1) {\n"
" i.attr('src','ftv2folderclosed.png');\n"
" a.attr('src','ftv2pnode.png');\n"
" $(this).show();\n"
" } else {\n"
" $(this).hide();\n"
" }\n"
" });\n"
" updateStripes();\n"
"}\n"
"\n"
"function toggleFolder(id)\n"
"{\n"
" //The clicked row\n"
" var currentRow = $('#row_'+id);\n"
" var currentRowImages = currentRow.find(\"img\");\n"
"\n"
" //All rows after the clicked row\n"
" var rows = currentRow.nextAll(\"tr\");\n"
"\n"
" //Only match elements AFTER this one (can't hide elements before)\n"
" var childRows = rows.filter(function() {\n"
" var re = new RegExp('^row_'+id+'\\\\d+_$', \"i\"); //only one sub\n"
" return this.id.match(re);\n"
" });\n"
"\n"
" //First row is visible we are HIDING\n"
" if (childRows.filter(':first').is(':visible')===true) {\n"
" currentRowImages.filter(\"[id^=arr]\").attr('src', 'ftv2pnode.png');\n"
" currentRowImages.filter(\"[id^=img]\").attr('src', 'ftv2folderclosed.png');\n"
" rows.filter(\"[id^=row_\"+id+\"]\").hide();\n"
" } else { //We are SHOWING\n"
" //All sub images\n"
" var childImages = childRows.find(\"img\");\n"
" var childImg = childImages.filter(\"[id^=img]\");\n"
" var childArr = childImages.filter(\"[id^=arr]\");\n"
"\n"
" currentRow.find(\"[id^=arr]\").attr('src', 'ftv2mnode.png'); //open row\n"
" currentRow.find(\"[id^=img]\").attr('src', 'ftv2folderopen.png'); //open row\n"
" childImg.attr('src','ftv2folderclosed.png'); //children closed\n"
" childArr.attr('src','ftv2pnode.png'); //children closed\n"
" childRows.show(); //show all children\n"
" }\n"
" updateStripes();\n"
"}\n"
"\n"
"\n"
"function toggleInherit(id)\n"
"{\n"
" var rows = $('tr.inherit.'+id);\n"
" var img = $('tr.inherit_header.'+id+' img');\n"
" var src = $(img).attr('src');\n"
" if (rows.filter(':first').is(':visible')===true) {\n"
" rows.css('display','none');\n"
" $(img).attr('src',src.substring(0,src.length-8)+'closed.png');\n"
" } else {\n"
" rows.css('display','table-row'); // using show() causes jump in firefox\n"
" $(img).attr('src',src.substring(0,src.length-10)+'open.png');\n"
" }\n"
"}\n"
"\n"
|