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;
24 /* margin-top:
0.75em;*/
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;
80 <!--<meta http-equiv="refresh" content="3; URL=Overviews/Categories.html">
81 <p>JavaScript is not available, redirecting to <a href="Overviews/Categories.html">static category overview</a>...-->
82 <p>The document browser needs JavaScript.
85 <script type=
"text/javascript">
86 var categorytree
= null;
89 function GotoPath(p
) {
92 if(window
.location
.hash
!= x
)
93 window
.location
.hash
= x
;
97 function updateTree() {
98 var el
= document
.getElementById("browser");
101 var tree
= {entries
:[],subcats
:categorytree
};
108 res
+= "<div class='result'>";
112 for(var k
in tree
.subcats
)
117 for(var i
=0;i
<l
.length
;i
++) {
120 res
+= "<div class='cat_selected'>";
123 res
+= "<div class='category'>";
124 res
+= "<a href='javascript:GotoPath(\""+link
+k
+"\")'>"+k
+"</a>";
125 res
+= " <span class='cat_count'>("+tree
.subcats
[k
].count
+")</span>";
127 res
+= "<span class='cat_arrow'> ►</span>";
131 for(var i
=0;i
<tree
.entries
.length
;i
++) {
132 var v
= tree
.entries
[i
];
133 var x
= v
.path
.split("/");
135 res
+= "<div class='result_doc'><a href='"+v
.path
+".html'>"+v
.title
+"</a> <span class='soft'>["+x
[0];
136 if(v
.installed
=="extension")
138 else if(v
.installed
=="missing")
139 res
+= " - missing!";
140 res
+= "]</span></div><div class='result_summary'>"+v
.summary
+"</div>";
147 tree
= tree
.subcats
[p
];
150 res
+= "<div class='cat_header'>"+sel
+"</div>";
152 res
+= "<div class='result_summary'>► Category not found: "+p
+"</div>";
159 function countTree(t
) {
161 for(var k
in t
.subcats
)
162 x
+= countTree(t
.subcats
[k
]);
163 x
+= t
.entries
.length
;
167 function buildCategoryTree() {
169 for(var k
in docmap
) {
172 if(v
.installed
=="extension" && !check_extensions
.checked
)
175 if(filter
.value
!= "all" && v
.path
.split("/")[0].toLowerCase() != filter
.value
)
178 var c2
= v
.categories
.match(/[^, ]+[^,]*[^, ]+/g) || ["Uncategorized"];
179 for(var i
=0;i
<c2
.length
;i
++) {
189 for(var cat
in cats
) {
190 var files
= cats
[cat
];
195 for(var i
=0;i
<l
.length
;i
++) {
208 for(var i
=0;i
<files
.length
;i
++)
209 e
.entries
.push(files
[i
]);
211 e
.entries
= e
.entries
.sort(function(a
,b
) {
212 a
=a
.title
; b
=b
.title
;
223 document
.getElementById("total_count").innerHTML
= countTree({subcats
:tree
,entries
:[],count
:0}) + " documents";
226 var check_extensions
;
229 window
.onload = function() {
231 helpRoot
="."; fixTOC();
232 var onChange = function() {
237 check_extensions
= document
.getElementById("check_extensions");
238 check_extensions
.onchange
= onChange
;
239 filter
= document
.getElementById("menu_filter");
240 filter
.onchange
= onChange
;
243 GotoPath(unescape(window
.location
.hash
.slice(1)));
246 window
.onhashchange = function() {
247 GotoPath(unescape(window
.location
.hash
.slice(1)));
253 <ul id=
"menubar"></ul>
256 <div class='contents'
>
258 <div id='label'
>SuperCollider
</div>
259 <h1>Document Browser
</h1>
260 <div id='summary'
>Browse categories
</div>
262 <div id=
"search_checks">
264 <select id=
"menu_filter">
265 <option SELECTED
value=
"all">All documents
</option>
266 <option value=
"classes">Classes only
</option>
267 <option value=
"reference">Reference only
</option>
268 <option value=
"guides">Guides only
</option>
269 <option value=
"tutorials">Tutorials only
</option>
270 <option value=
"overviews">Overviews only
</option>
271 <option value=
"other">Other only
</option>
273 <input type=
"checkbox" id=
"check_extensions" checked=
"true">Include extensions
</input>
276 <div id=
"total_count"></div>
277 <table class=
"browser" id=
"browser"></table>