3 <title>Document Browser
</title>
4 <link rel='stylesheet' href='./scdoc.css' type='text/css'
/>
5 <meta http-equiv='Content-Type' content='text/html; charset=UTF-
8'
/>
6 <script src=
"docmap.js" type=
"text/javascript"></script>
7 <script src=
"scdoc.js" type=
"text/javascript"></script>
12 border-collapse: collapse;
23 border-bottom:
1px solid #ddd;
32 .category, .cat_selected {
33 margin-bottom:
0.25em;
34 border-bottom:
1px solid transparent;
37 border-bottom:
1px solid #
777;
40 border-bottom:
2px solid #
999;
44 margin-bottom:
0.25em;
46 /* font-weight: bold;*/
65 border-bottom:
1px solid #ddd;
88 <!--<meta http-equiv="refresh" content="3; URL=Overviews/Categories.html">
89 <p>JavaScript is not available, redirecting to <a href="Overviews/Categories.html">static category overview</a>...-->
90 <p>The document browser needs JavaScript.
93 <script type=
"text/javascript">
94 var categorytree
= null;
97 function GotoPath(p
) {
100 if(window
.location
.hash
!= x
)
101 window
.location
.hash
= x
;
105 function updateTree() {
106 var el
= document
.getElementById("browser");
107 var res
= "<tr><td>";
109 var tree
= {entries
:[],subcats
:categorytree
};
123 res
+= "<div class='result'>";
127 for(var k
in tree
.subcats
)
132 for(var i
=0;i
<l
.length
;i
++) {
135 res
+= "<div class='cat_selected'>";
138 res
+= "<div class='category'>";
139 res
+= "<a href='javascript:GotoPath(\""+link
+k
+"\")'>"+k
+"</a>";
140 res
+= " <span class='cat_count'>("+tree
.subcats
[k
].count
+")</span>";
142 res
+= "<span class='cat_arrow'> ►</span>";
146 for(var i
=0;i
<tree
.entries
.length
;i
++) {
147 var v
= tree
.entries
[i
];
148 var x
= v
.path
.split("/");
150 res
+= "<div class='result_doc'><span class='doc_kind' ";
151 var clr
= colors
[x
[0]];
153 res
+= "style='color:"+clr
+";'";
156 if(v
.installed
=="extension")
158 else if(v
.installed
=="missing")
159 res
+= "(not installed) ";
160 var link
= v
.hasOwnProperty("oldhelp")?v
.oldhelp
:(v
.path
+".html");
161 res
+= x
[0].toUpperCase()+"</span><a href='"+link
+"'>"+v
.title
+"</a></div><div class='result_summary'>"+v
.summary
+"</div>";
168 tree
= tree
.subcats
[p
];
171 res
+= "<div class='cat_header'>"+sel
+"</div>";
173 res
+= "<div class='result_summary'>► Category not found: "+p
+"</div>";
180 function countTree(t
) {
182 for(var k
in t
.subcats
)
183 x
+= countTree(t
.subcats
[k
]);
184 x
+= t
.entries
.length
;
188 function buildCategoryTree() {
190 for(var k
in docmap
) {
193 if(v
.installed
=="extension" && !check_extensions
.checked
)
196 if(filter
.value
!= "all" && v
.path
.split("/")[0].toLowerCase() != filter
.value
)
199 var c2
= v
.categories
.match(/[^, ]+[^,]*[^, ]+/g) || ["Uncategorized"];
200 for(var i
=0;i
<c2
.length
;i
++) {
210 for(var cat
in cats
) {
211 var files
= cats
[cat
];
216 for(var i
=0;i
<l
.length
;i
++) {
229 for(var i
=0;i
<files
.length
;i
++)
230 e
.entries
.push(files
[i
]);
232 e
.entries
= e
.entries
.sort(function(a
,b
) {
233 a
=a
.title
; b
=b
.title
;
244 document
.getElementById("total_count").innerHTML
= countTree({subcats
:tree
,entries
:[],count
:0}) + " documents";
247 var check_extensions
;
250 window
.onload = function() {
252 helpRoot
="."; fixTOC();
253 var onChange = function() {
258 check_extensions
= document
.getElementById("check_extensions");
259 check_extensions
.onchange
= onChange
;
260 filter
= document
.getElementById("menu_filter");
261 filter
.onchange
= onChange
;
264 GotoPath(unescape(window
.location
.hash
.slice(1)));
267 window
.onhashchange = function() {
268 GotoPath(unescape(window
.location
.hash
.slice(1)));
274 <ul id=
"menubar"></ul>
277 <div class='contents'
>
279 <div id='label'
>SuperCollider
</div>
280 <h1>Document Browser
</h1>
281 <div id='summary'
>Browse categories
</div>
283 <div id=
"search_checks">
285 <select id=
"menu_filter">
286 <option SELECTED
value=
"all">All documents
</option>
287 <option value=
"classes">Classes only
</option>
288 <option value=
"reference">Reference only
</option>
289 <option value=
"guides">Guides only
</option>
290 <option value=
"tutorials">Tutorials only
</option>
291 <option value=
"overviews">Overviews only
</option>
292 <option value=
"other">Other only
</option>
294 <input type=
"checkbox" id=
"check_extensions" checked=
"true">Include extensions
</input>
297 <div id=
"total_count"></div>
298 <table class=
"browser" id=
"browser"></table>