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 res
+= x
[0].toUpperCase()+"</span><a href='"+v
.path
+".html'>"+v
.title
+"</a></div><div class='result_summary'>"+v
.summary
+"</div>";
167 tree
= tree
.subcats
[p
];
170 res
+= "<div class='cat_header'>"+sel
+"</div>";
172 res
+= "<div class='result_summary'>► Category not found: "+p
+"</div>";
179 function countTree(t
) {
181 for(var k
in t
.subcats
)
182 x
+= countTree(t
.subcats
[k
]);
183 x
+= t
.entries
.length
;
187 function buildCategoryTree() {
189 for(var k
in docmap
) {
192 if(v
.installed
=="extension" && !check_extensions
.checked
)
195 if(filter
.value
!= "all" && v
.path
.split("/")[0].toLowerCase() != filter
.value
)
198 var c2
= v
.categories
.match(/[^, ]+[^,]*[^, ]+/g) || ["Uncategorized"];
199 for(var i
=0;i
<c2
.length
;i
++) {
209 for(var cat
in cats
) {
210 var files
= cats
[cat
];
215 for(var i
=0;i
<l
.length
;i
++) {
228 for(var i
=0;i
<files
.length
;i
++)
229 e
.entries
.push(files
[i
]);
231 e
.entries
= e
.entries
.sort(function(a
,b
) {
232 a
=a
.title
; b
=b
.title
;
243 document
.getElementById("total_count").innerHTML
= countTree({subcats
:tree
,entries
:[],count
:0}) + " documents";
246 var check_extensions
;
249 window
.onload = function() {
251 helpRoot
="."; fixTOC();
252 var onChange = function() {
257 check_extensions
= document
.getElementById("check_extensions");
258 check_extensions
.onchange
= onChange
;
259 filter
= document
.getElementById("menu_filter");
260 filter
.onchange
= onChange
;
263 GotoPath(unescape(window
.location
.hash
.slice(1)));
266 window
.onhashchange = function() {
267 GotoPath(unescape(window
.location
.hash
.slice(1)));
273 <ul id=
"menubar"></ul>
276 <div class='contents'
>
278 <div id='label'
>SuperCollider
</div>
279 <h1>Document Browser
</h1>
280 <div id='summary'
>Browse categories
</div>
282 <div id=
"search_checks">
284 <select id=
"menu_filter">
285 <option SELECTED
value=
"all">All documents
</option>
286 <option value=
"classes">Classes only
</option>
287 <option value=
"reference">Reference only
</option>
288 <option value=
"guides">Guides only
</option>
289 <option value=
"tutorials">Tutorials only
</option>
290 <option value=
"overviews">Overviews only
</option>
291 <option value=
"other">Other only
</option>
293 <input type=
"checkbox" id=
"check_extensions" checked=
"true">Include extensions
</input>
296 <div id=
"total_count"></div>
297 <table class=
"browser" id=
"browser"></table>