Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / HelpSource / Overviews / Documents.html
blob365bd21da4d8a815060afec14df72172e5bf2ead
1 <html>
2 <head>
3 <title>Documents</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>
8 <style>
9 #doclist {
10 margin-top: 1em;
12 .result_item {
13 margin-left: 1.5em;
14 margin-top: 0.2em;
16 #search_checks {
17 font-size: 9pt;
18 color: #555;
19 border-bottom: 1px solid #ddd;
20 margin-top: 1em;
21 padding-bottom: 1em;
23 #total_count {
24 font-size: 9pt;
25 color: #777;
27 </style>
28 <noscript>
29 <p>The document index needs JavaScript.
30 </noscript>
31 <script type="text/javascript">
32 var node;
33 var docs;
34 var check_extensions;
35 var filter;
37 function did_load() {
38 // restoreMenu();
39 helpRoot=".."; fixTOC();
40 node = document.getElementById("doclist");
41 docs = [];
42 for(var k in docmap) {
43 if(docmap.hasOwnProperty(k))
44 docs.push(docmap[k]);
46 docs = docs.sort(function(a,b) {
47 a = a.title.toUpperCase();
48 b = b.title.toUpperCase();
49 if(a<b) return -1;
50 else
51 if(a>b) return +1;
52 else
53 return 0;
54 });
56 var onChange = function() {
57 showdocs();
60 check_extensions = document.getElementById("check_extensions");
61 check_extensions.onchange = onChange;
62 filter = document.getElementById("menu_filter");
63 filter.onchange = onChange;
65 showdocs();
68 function showdocs() {
69 while(node.hasChildNodes())
70 node.removeChild(node.lastChild);
72 var count = 0;
73 var cap = undefined;
74 var div = document.createElement("p");
75 var docs2 = [];
76 div.className = "jump";
77 div.innerHTML = "Jump to: ";
79 for(var i=0;i<docs.length;i++) {
80 var v = docs[i];
81 var x = v.title[0].toUpperCase();
83 if(v.installed=="extension" && !check_extensions.checked)
84 continue;
86 if(filter.value != "all" && v.path.split("/")[0].toLowerCase() != filter.value)
87 continue;
89 if(/Undocumented classes/.test(v.categories))
90 continue;
92 if(cap != x) {
93 cap = x;
94 var a = document.createElement("a");
95 a.setAttribute("href","#section_"+cap);
96 a.innerHTML=cap;
97 div.appendChild(a);
98 div.appendChild(document.createTextNode(" "));
101 docs2.push(v);
103 node.appendChild(div);
105 cap = undefined;
106 for(var i=0;i<docs2.length;i++) {
107 var v = docs2[i];
108 var x = v.path.split("/");
109 var c = v.title[0].toUpperCase();
111 if(cap != c) {
112 var y = document.createElement("h2");
113 var a = document.createElement("a");
114 a.className = "anchor";
115 a.setAttribute("name","section_"+c);
116 a.innerHTML = cap = c;
117 y.appendChild(a);
118 node.appendChild(y);
121 var div = document.createElement("div");
122 div.className = "result_item";
124 var n = document.createElement("a");
125 var link = v.hasOwnProperty("oldhelp")?v.oldhelp:("../"+v.path+".html");
126 n.setAttribute("href",link);
127 n.innerHTML = v.title;
128 div.appendChild(n);
129 div.appendChild(document.createTextNode(" - "+v.summary+" "));
131 n = document.createElement("span");
132 n.className = "soft";
133 var res = "["+x[0];
134 if(v.installed=="extension")
135 res += " +";
136 else if(v.installed=="missing")
137 res += " - missing!";
138 n.innerHTML = res+"]";
139 div.appendChild(n);
140 node.appendChild(div);
141 count++;
143 document.getElementById("total_count").innerHTML = count + " documents";
145 </script>
146 </head>
147 <ul id="menubar"></ul>
149 <body onload="did_load()">
150 <div class='contents'>
151 <div class='header'>
152 <div id='label'>SuperCollider OVERVIEWS</div>
153 <h1>Documents</h1>
154 <div id='summary'>Alphabetical index of all documents</div>
155 </div>
156 <div id="search_checks">
157 Filter:
158 <select id="menu_filter">
159 <option SELECTED value="all">All documents</option>
160 <option value="classes">Classes only</option>
161 <option value="reference">Reference only</option>
162 <option value="guides">Guides only</option>
163 <option value="tutorials">Tutorials only</option>
164 <option value="overviews">Overviews only</option>
165 <option value="other">Other only</option>
166 </select>
167 <input type="checkbox" id="check_extensions" checked="true">Include extensions</input>
168 </div>
169 <div id="total_count"></div>
170 <div id='doclist'></div>
171 </div>
172 </body>
173 </html>