]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
Integrate API docs with OCamlDoc web interface
authorRob Hoes <rob.hoes@citrix.com>
Tue, 25 May 2010 13:26:27 +0000 (14:26 +0100)
committerRob Hoes <rob.hoes@citrix.com>
Tue, 25 May 2010 13:26:27 +0000 (14:26 +0100)
Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
ocaml/doc/apidoc.html
ocaml/doc/apidoc.js
ocaml/doc/index.html
ocaml/doc/jsapi.ml
ocaml/doc/main.js
ocaml/doc/ocamldoc.js
ocaml/doc/style.css

index ed8007770717a583452cdc886724c7f77c015713..c3ea31c1976426479abb5f5646aaa4c0a3d23b2c 100644 (file)
@@ -6,13 +6,10 @@
                <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
                <script type="text/javascript" src="main.js"></script>
                <script type="text/javascript" src="api/index.json"></script>
-               <script type="text/javascript" src="api/releases.json"></script>
                <script type="text/javascript" src="apidoc.js"></script>
                <script>
                        if (cls != "")
                                document.write('<script src="api/', cls, '.json" type="text/JavaScript"><\/script>');
-                       if (rel != "")
-                               document.write('<script src="api/', rel, '.json" type="text/JavaScript"><\/script>');
                </script>
                <link rel="stylesheet" href="style.css" />
        </head>
index d111b9de95648d583b98048ab2b439da3c04ca0a..73473bd367b0f1ace5624dfa0950ed2c3ece514f 100644 (file)
@@ -15,7 +15,6 @@
 // global variables
 
 var cls = getQuerystring('c');
-var rel = getQuerystring('r');
 
 function qualifier(q)
 {
@@ -25,33 +24,6 @@ function qualifier(q)
                return 'read/write';
 }
 
-function make_enum(t)
-{
-       n = t[1];
-       obj = document.getElementById('enums');
-       i = obj.children.length + 1;
-       obj.style.display = ''
-       
-       if (document.getElementById('enum_' + n) == null) {
-               html = '<div id="enum_' + n + '" class="field' + toggle(i) + '">';
-               html += '<input type="button" class="small-button" value="details" onclick="showhide(document.getElementById(\'enum_' + n + '_details\'))" />';
-               html += '<div class="field-name">' + n + '</div>';
-               html += '<div id="enum_' + n + '_details" style="display: none">';
-               
-               html += '<table class="field-table">';
-               var first = true;
-               for (i in t[2]) {
-                       html += '<tr><td style="white-space: nowrap">' + (first ? '<span class="field-head">Values:</span>' : '') + '</td>';
-                       html += '<td style="white-space: nowrap">' + i + '</td><td>' + t[2][i] + '</td></tr>';
-                       first = false;
-               }
-               html += '</table>';
-               html += '</div></div>';
-
-               obj.innerHTML += html;
-       }
-}
-
 function transform_type(t)
 {
        switch (t) {
@@ -69,8 +41,7 @@ function transform_type(t)
        case "Record":
                return t[1] + ' record';
        case "Enum":
-               make_enum(t);
-               return '<a href="#enum_' + t[1] + '">' + t[1] + '</a>';
+               return t[1];
        case "Set":
                return transform_type(t[1]) + ' set';
        case "Map":
@@ -96,62 +67,34 @@ function transform_default(t)
                return t[1] + ' record';
                return t[1];
        case "VSet":
-               return '{' + map(function(v){return transform_default(v)}, t[1]) + '}';
+               return '{' + t[1].map(function(v){return transform_default(v)}) + '}';
        case "VMap":
-               return '{' + map(function(v){return transform_default(v[0]) + ' \u2192 ' + transform_default(v[1])}, t[1]) + '}';
+               return '{' + t[1].map(function(v){return transform_default(v[0]) + ' \u2192 ' + transform_default(v[1])}) + '}';
        }
        return 'Unknown[' + t + ']';
 }
 
-function current_lifecycle_stage(s)
-{
-       if (s.length == 0)
-               return 'Prototype';
-       else {
-               last_transition = s[s.length-1][0];
-               switch (last_transition) {
-               case 'Deprecated':
-                       return 'Deprecated';
-                       break;
-               case 'Removed':
-                       return 'Removed';
-                       break;
-               case 'Published':
-               case 'Changed':
-               case 'Extended':
-               default:
-                       return '';
-                       break;
-               }
-       }
-}
-
-function get_release_name(s)
-{
-       return s;
-}
-
 function make_field(fld, n)
 {
-       name = fld.full_name.join('_');
+       name = fld.field_name;
 
        html = "";      
        html = '<div class="field' + toggle(n) + '">';
        html += '<input type="button" class="small-button" value="details" onclick="showhide(document.getElementById(\'' + name + '_details\'))" />';
-       html += '<div class="lifecycle">' + current_lifecycle_stage(fld.lifecycle) + '</div>';
        html += '<div><span class="inline-type">' + transform_type(fld.ty) + '</span> <span class="field-name">' + name + '</span> <span class="inline-qualifier">[' + qualifier(fld.qualifier) + ']</span></div>';
        
-       html += '<div id="' + name + '_details" style="display: none">';
+       html += '<div  id="' + name + '_details" style="display: none">';
        html += '<div class="field-description">' + fld.field_description + '</div>';
        
        html += '<table class="field-table">';
-       if (fld.default_value != undefined)
-               html += '<tr><td style="white-space: nowrap"><span class="field-head">Default value:</span></td><td colspan="2">' + transform_default(fld.default_value) + '</td></tr>';
-               
-       for (i in fld.lifecycle) {
-               l = fld.lifecycle[i];
-               html += '<tr><td style="white-space: nowrap"><span class="field-head">' + l[0] + ' in:</span></td><td style="white-space: nowrap">' + get_release_name(l[1]) + '</td><td>' + l[2] + '</td></tr>';
+       if (fld.release != undefined) {
+               html += '<tr><td width="130px"><span class="field-head">Introduced in:</span></td><td>' + fld.release.internal[1] + '</td></tr>';
+               if (fld.release.internal_deprecated_since != undefined)
+                       html += '<tr><td width="130px"><span class="field-head">Deprecated since:</span></td><td>' + fld.release.internal_deprecated_since + '</td></tr>';
        }
+       if (fld.default_value != undefined)
+               html += '<tr><td width="130px"><span class="field-head">Default value:</span></td><td>' + transform_default(fld.default_value) + '</td></tr>';
+       
        html += '</table>';
        html += '</div></div>';
        
@@ -166,44 +109,46 @@ function make_message(msg, n)
        
        html += '<div class="field' + toggle(n) + '">';
        html += '<input type="button" class="small-button" value="details" onclick="showhide(document.getElementById(\'' + name + '_details\'))" />';
-       html += '<div class="lifecycle">' + current_lifecycle_stage(msg.msg_lifecycle) + '</div>';
        html += '<div><span class="inline-type">' + 
                (msg.msg_result != undefined ? transform_type(msg.msg_result[0]) : 'void') + 
                '</span> <span class="field-name">' + name + '</span> <span class="inline-params">(' +
-               map(function(p){return transform_type(p.param_type)}, msg.msg_params).join(', ') + 
+               msg.msg_params.map(function(p){return transform_type(p.param_type)}).join(', ') + 
                ')</span></div>';
        
        html += '<div class="field-description">' + msg.msg_doc + '</div>';
        
-       html += '<div id="' + name + '_details" style="display: none">';
+       html += '<div  id="' + name + '_details" style="display: none">';
        html += '<table class="field-table">';
+       
+       html += '<tr id="' + name + '_params"><td width="130px"><span class="field-head">Parameters:</span></td><td>';
+       html += '<table>';
        for (i in msg.msg_params) {
                p = msg.msg_params[i];
-               html += '<tr><td style="white-space: nowrap">' + (i == 0 ? '<span class="field-head">Parameters:</span>' : '') + '</td>';
-               html += '<td style="white-space: nowrap">' + transform_type(p.param_type) + '  ' + p.param_name + '</td>';
-               html += '<td>' + p.param_doc + '</td></tr>';
+               html += '<tr><td style="padding: 0 .4em 0 0">' + transform_type(p.param_type) + '  ' + p.param_name + '</td>';
+               html += '<td style="padding: 0 0 0 .4em">' + p.param_doc + '</td></tr>';
        }
+       html += '</table></td></tr>';   
 
-       html += '<tr><td><span class="field-head">Minimum role:</span></td><td colspan="2">' + msg.msg_allowed_roles[msg.msg_allowed_roles.length - 1] + '</td></tr>';
-       
+       html += '<tr><td><span class="field-head">Minimum role:</span></td><td>' + msg.msg_allowed_roles[msg.msg_allowed_roles.length - 1] + '</td></tr>';
        if (msg.msg_result != undefined)
-               html += '<tr><td><span class="field-head">Result:</span></td><td colspan="2">' + msg.msg_result[1] + '</td></tr>';
-               
+               html += '<tr><td><span class="field-head">Result:</span></td><td>' + msg.msg_result[1] + '</td></tr>';
        if (msg.msg_errors != undefined && msg.msg_errors.length > 0) {
+               html += '<tr><td><span class="field-head">Errors:</span></td><td>'
+               html += '<table>';
                for (i in msg.msg_errors) {
                        e = msg.msg_errors[i];
-                       html += '<tr><td style="white-space: nowrap">' + (i == 0 ? '<span class="field-head">Errors:</span>' : '') + '</td>';
-                       html += '<td style="white-space: nowrap">' + e.err_name + '</td>';
-                       html += '<td>' + e.err_doc + '</td></tr>';
+                       html += '<tr><td style="padding: 0 .4em 0 0">' + e.err_name + '</td>';
+                       html += '<td style="padding: 0 0 0 .4em">' + e.err_doc + '</td></tr>';
                }
+               html += '</table></td></tr>';
        }
-       
-       for (i in msg.msg_lifecycle) {
-               l = msg.msg_lifecycle[i];
-               html += '<tr><td style="white-space: nowrap"><span class="field-head">' + l[0] + ' in:</span></td>';
-               html += '<td style="white-space: nowrap">' + get_release_name(l[1]) + '</td><td>' + l[2] + '</td></tr>';
+       if (msg.msg_release != undefined) {
+               html += '<tr><td><span class="field-head">Introduced in:</span></td><td>' + msg.msg_release.internal[1] + '</td></tr>';
+               if (msg.msg_release.internal_deprecated_since != undefined)
+                       html += '<tr><td><span class="field-head">Deprecated since:</span></td><td>' + msg.msg_release.internal_deprecated_since + '</td></tr>';
        }
        html += '</table>';
+       
        html += '</div></div>'; 
        
        return html;
@@ -211,40 +156,19 @@ function make_message(msg, n)
 
 function class_doc()
 {      
-       contents = clsdoc.contents;     
-       fields = fold(function(a, x){
-               if (x[0] == "Field") a.push(x);
-               else a = a.concat(x[2]);
-               return a;
-               }, [], contents);
-       fields = map(function(f){return f[1];}, fields);
-       
-       fields.sort(function(a, b){return compare(a.full_name.join('_').toLowerCase(), b.full_name.join('_').toLowerCase());});
+       contents = clsdoc.contents;
+       fields = contents.filter(function(f){return f[0] == "Field";}).map(function(f){return f[1];});
+       fields.sort(function(a, b){return a.field_name.toLowerCase().charCodeAt(0) - b.field_name.toLowerCase().charCodeAt(0);});
        messages = clsdoc.messages;
-       messages = filter(function(m){return m.msg_hide_from_docs == false;}, messages);
-       messages.sort(function(a, b){return compare(a.msg_name.toLowerCase(), b.msg_name.toLowerCase())});
+       messages = messages.filter(function(m){return m.msg_hide_from_docs == false;})
+       messages.sort(function(a, b){return a.msg_name.toLowerCase().charCodeAt(0) - b.msg_name.toLowerCase().charCodeAt(0)});
 
        html = "";
-       html += '<input type="button" class="small-button" value="details" onclick="showhide(document.getElementById(\'class_details\'))" />';
-       html += '<div class="lifecycle">' + current_lifecycle_stage(clsdoc.obj_lifecycle) + '</div>';
        html += '<h1 class="title">Class: ' + cls + '</h1>\n';
        
        html += '<div class="description">' + clsdoc.description + '</div>';
        
-       html += '<div  id="class_details" style="display: none">';
-       html += '<table class="field-table">';
-       for (i in clsdoc.obj_lifecycle) {
-               l = clsdoc.obj_lifecycle[i];
-               html += '<tr><td width="130px"><span class="field-head">' + l[0] + ' in:</span></td><td width="130px">' + get_release_name(l[1]) + '</td><td>' + l[2] + '</td></tr>';
-       }
-       html += '</table>';
-       html += '</div>';
-       
-       html += '<div id="enums" style="display: none"><h2>Enums</h2></div>';
-       
-       set_content(html);
-       
-       html = '<h2>Fields</h2>';
+       html += '<h2>Fields</h2>';
        if (fields.length > 0) {
                for (i in fields)
                        html += make_field(fields[i], i);
@@ -260,101 +184,24 @@ function class_doc()
        else
                html += '<p>None.</p>';
        
-       append_content(html);
-}
-
-function compare_release_notes(a, b)
-{
-       function change_to_num(x) {
-               if (x.indexOf('Published') > -1) return '0';
-               else if (x.indexOf('Extended') > -1) return '1';
-               else if (x.indexOf('Changed') > -1) return '2';
-               else if (x.indexOf('Deprecated') > -1) return '3';
-               else if (x.indexOf('Removed') > -1) return '4';
-               else return '5';
-       }
-       function element_to_num(x) {
-               if (x.indexOf('class') > -1) return '0';
-               else if (x.indexOf('field') > -1) return '1';
-               else if (x.indexOf('message') > -1) return '2';
-               else return '3';
-       }
-       x = change_to_num(a[0]) + element_to_num(a[0]) + (a[1]+a[2]).toLowerCase();
-       y = change_to_num(b[0]) + element_to_num(b[0]) + (b[1]+b[2]).toLowerCase();
-       return compare(x, y);
-}
-
-function release_doc()
-{      
-       changes = [];
-       
-       for (i in release_info) {
-               c = release_info[i];
-               for (j in c.obj_changes)
-                       changes.push([c.obj_changes[j][0] + ' class', c.cls, '', c.obj_changes[j][2]]);
-               for (j in c.field_changes)
-                       changes.push([c.field_changes[j][0] + ' field', c.cls, c.field_changes[j][1], c.field_changes[j][2]]);
-               for (j in c.msg_changes)
-                       changes.push([c.msg_changes[j][0] + ' message', c.cls, c.msg_changes[j][1], c.msg_changes[j][2]]);
-       }
-       
-       changes.sort(compare_release_notes);
-       
-       html = "";
-       html += '<h1 class="title">Release notes: ' + get_release_name(rel) + '</h1>\n';
-
-       html += '<table><tr><th style="width: 12em">Change</th><th>Element</th><th>Description</th></tr>';
-               
-       for (i in changes) {
-               html += '<tr><td>' + changes[i][0] + '</td><td><a href="?c=' + changes[i][1] + (changes[i][2] != '' ? '#' + changes[i][2] : '') + '">' +
-                       changes[i][1] + (changes[i][2] != '' ? '.' + changes[i][2] : '') + '</a></td><td>' + changes[i][3] + '</td></tr>';
-       }
-       
-       html += '</table>';
-
        set_content(html);
 }
 
-function class_list()
+function build()
 {
+       html = "";
        html = '<h2 class="title">Classes</h2>';
        
-       classes.sort(function(a, b){return compare(a.toLowerCase(), b.toLowerCase())});
+       classes.sort(function(a, b){return a.toLowerCase().charCodeAt(0) - b.toLowerCase().charCodeAt(0)});
        for (i in classes) {
                c = classes[i];
                html += '<a href="?c=' + c + '">' + c + '</a><br>';
        }
        
        append_sidebar(html);
-}
-
-function release_list()
-{
-       html = '<h2>Release notes</h2>';
-       
-       for (i in releases) {
-               r = releases[i];
-               html += '<a href="?r=' + r + '">' + get_release_name(r) + '</a><br>';
-       }
        
-       append_sidebar(html);
-}
-
-function build()
-{
        if (cls != "") {
-               class_list();
-               release_list();
                class_doc();
        }
-       else if (rel != "") {
-               class_list();
-               release_list();
-               release_doc();
-       }
-       else {
-               class_list();
-               release_list();
-       }
 }
 
index 1e6d7121c50b77d503c2bf64746bb1b5382691ce..c347158f764ce15f89186716ebe52ebbf748fb99 100644 (file)
@@ -2,38 +2,28 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html>
        <head>
-               <title>OCamlDoc</title>
+               <title>Xapi Toolstack</title>
                <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-               <script type="text/javascript" src="components.js"></script>
-               <script type="text/javascript" src="ocamldoc.js"></script>
-               <script>
-                       for (z in components)
-                               document.write('<script src="content/', components[z], '/index.json" type="text/JavaScript"><\/script>');
-                       if (component != "" && module != "")
-                               document.write('<script src="content/', component, '/', module_chain[0], '.json" type="text/JavaScript"><\/script>');
-               </script>
                <link rel="stylesheet" href="style.css" />
        </head>
        <body onload="build();">
                <div id="wrap">
                        <div id="header">
-                               <h1 style="float:left">Xapi &ndash; OCaml Code Documentation</h1>
+                               <h1 style="float:left">Xapi Toolstack Documentation</h1>
                                <ul id="menu">
-                                       <script>
-                                               document.write('<li><a href="index.html">Component Index</a></li>');
-                                               if (component != "") {
-                                                       document.write('<li><a href="index.html?c=' + component + '">Module Index</a></li>');
-                                               }
-                                               document.write('<li><a href="#" onclick="search_page()">Search</a></li>');
-                                       </script>
+                                       <li><a href="apidoc.html">XenAPI Docs</a></li>
+                                       <li><a href="codedoc.html">Code Docs</a></li>
                                </ul>   
                        </div>
                        <div id="main">
                                <div id="container"><div id="content">
-                                       <h1 class="title">Introduction</h1>
-                                       <p>These web pages contain source documentation of the main libraries and executables related to xapi. The documentation is automatically generated from the OCaml source files via a custom generator for <a href="http://caml.inria.fr/pub/docs/manual-ocaml/manual029.html" target="_blank">OCamlDoc</a>. Below is a list of all components that are covered, the most important one being the <a href="index.html?c=xapi">xapi</a> executable itself. Clicking on a component name will bring up an overview of the OCaml modules contained in it. Clicking further will reveal the internals of a module.</p>
-                                       <p>The OCaml source code contains special comments that are displayed in the documentation, which explain the use of modules, functions etc. We are working hard to add such comments wherever they are needed, but a lot of work still needs to be done. We encourage everyone who contributes to xapi to help out and include good documentation! :)</p>
-                                       <p>Details on how to generate the documentation yourself, and how to properly document the source code, are described on <a href="http://wiki.xensource.com/xenwiki/OCaml_Doc" target="_blank">this</a> wiki page.</p>
+                                       <h1 class="title">Welcome</h1>
+                                       <p>These pages contain documentation of the Xapi toolstack, part of the Xen Cloud Platform, and the API it provides.
+                                       <ul>
+                                               <li><a href="apidoc.html">XenAPI Documentation</a></li>
+                                               <li><a href="codedoc.html">Xapi Code Documentation</a></li>
+                                       </ul>
+                                       <p>The documentation is automatically generated from comments in the source code.
                                </div></div>
                                <div id="sidebar"></div>
                                <div id="footer"></div>
index 86d25b9e3590cbecfcd00fa3305cd887263f3170..ad1c4f5e492e0e206bf69d7bf1823b2339163579 100644 (file)
@@ -18,7 +18,7 @@ let _ =
        let create_json obj =
                let name = obj.Datamodel_types.name in
                let s = Jsonrpc.to_string (Datamodel_types.rpc_of_obj obj) in
-               Unixext.write_string_to_file ("api/" ^ name ^ ".json") s;
+               Unixext.write_string_to_file ("api/" ^ name ^ ".json") ("clsdoc = " ^ s);
                name
        in
        let names = List.map create_json objs in
index 02d2f95bd6c9727ce41f844206d3728becc59f25..c70041a4744d7915458c5253108306c4fd302c39 100644 (file)
@@ -47,40 +47,3 @@ function showhide(obj)
                obj.style.display = '';
 }
 
-// functional stuff
-
-function filter(f, l)
-{
-       var x = [];
-       for (i in l) {
-               if (f(l[i]))
-                       x.push(l[i]);
-       }
-       return x;
-}
-
-function map(f, l)
-{
-       var x = [];
-       for (i in l) {
-               x[i] = f(l[i]);
-       }
-       return x;
-}
-
-function fold(f, a, l)
-{
-       if (l.length == 0)
-               return a;
-       else
-               return fold(f, f(a, l[0]), l.slice(1));
-}
-
-// compare function for sorting
-function compare(a, b)
-{
-       if (a < b) return -1;
-       if (a > b) return 1;
-       return 0;
-}
-
index 66f38461eacf6ab4fefb64e3702bf5aa4dcceec9..cca65ac5a030f60ba105e2f0541d1eacc60dde4e 100644 (file)
@@ -25,19 +25,6 @@ var component_deps = {};
 
 var root = '/bind/myrepos/';
 var code_url = 'http://xenbits.xen.org/xapi/';
-
-// function from http://www.bloggingdeveloper.com/post/JavaScript-QueryString-ParseGet-QueryString-with-Client-Side-JavaScript.aspx
-function getQuerystring(key, default_)
-{
-       if (default_ == null) default_ = ""; 
-       key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
-       var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
-       var qs = regex.exec(window.location.href);
-       if (qs == null)
-               return default_;
-       else
-               return qs[1];
-}
     
 function fill_components()
 {
@@ -59,7 +46,7 @@ function do_search()
                for (y in component_modules[c]) {
                        m = component_modules[c][y].name;
                        if (m.toLowerCase().indexOf(query) > -1)
-                               html += '<a href="index.html?c=' + c + '&m=' + m + '">' + m + ' (' + c + ')</a><br/>';
+                               html += '<a href="codedoc.html?c=' + c + '&m=' + m + '">' + m + ' (' + c + ')</a><br/>';
                }
        }
        
@@ -101,19 +88,11 @@ function find_component_for_module(m)
        return "";
 }
 
-function toggle(i)
-{
-       if (i % 2 == 0)
-               return ""
-       else
-               return "2"
-}
-
 function construct_url(mod, fn)
 {      
        comp = find_component_for_module(mod.split('.')[0]);
        if (comp != "")
-               return 'index.html?c=' + comp + '&m=' + mod + '#' + fn;
+               return 'codedoc.html?c=' + comp + '&m=' + mod + '#' + fn;
        else
                return '#';
 }
@@ -161,7 +140,7 @@ function value(v, n)
        
        html = '<div class="field' + toggle(n) + '">';
        if (v.params.length > 0)
-               html += '<input type="button" class="small-button" value="show parameters" onclick="document.getElementById(\'' + name + '_params\').style.display=\'\';" />';
+               html += '<input type="button" class="small-button" value="parameters" onclick="showhide(document.getElementById(\'' + name + '_params\'))" />';
        html += '<div class="field-type"><a name="' + name + '">[value]</a></div>';
        html += '<div class="field-name">' + name + '</div>';
                        
@@ -309,7 +288,7 @@ function included_module(v, n)
        name = l[l.length - 1];
                
        html = '<div class="field' + toggle(n) + '">';
-       html += '<input type="button" class="small-button" value="show details" onclick="location=\'index.html?c=' + component + '&m=' + v.name + '\'" />';
+       html += '<input type="button" class="small-button" value="show details" onclick="location=\'codedoc.html?c=' + component + '&m=' + v.name + '\'" />';
        html += '<div class="field-type"><a name="' + name + '">[module]</a></div>';
        html += '<div class="field-name">' + name + '</div>';
        html += '<div class="field-description">';
@@ -418,7 +397,7 @@ function make_dependencies(deps)
        
        uses = deps.uses.sort();
 
-       html = '<h2 class="title">Dependencies</h2>';
+       html = '<h2>Dependencies</h2>';
        html += '<h3>Uses</h3>';
        for (i in uses) {
                c = find_component_for_module(uses[i])
@@ -443,14 +422,13 @@ function make_dependencies(deps)
 
 function moduledoc(mod)
 {      
-       set_sidebar("");
        make_dependencies(mod.dependencies);
        
        html = "";
        html += '<h1 class="title">Module: ';
        chain = [];
        for (i in module_chain)
-               chain[i] = '<a href="index.html?c=' + component + 
+               chain[i] = '<a href="codedoc.html?c=' + component + 
                        '&m=' + module_chain.slice(0,i+1).join('.') + '">' + 
                        module_chain[i] + '</a>';
        html += chain.join('.') + '</h1>\n';
@@ -551,7 +529,7 @@ function module_index()
        
        // Sidebar
        
-       html = '<h2 class="title">Module Groups</h2>';
+       html = '<h2>Module Groups</h2>';
        if (group_names.length > 0) {
                for (i in group_names)
                        html += '<a href="#' + group_names[i] + '">' + group_names[i] + '</a><br />';
@@ -570,7 +548,7 @@ function module_index()
                html += '<h3>Libraries</h3>';
                for (i in libs) {
                        if (libraries.indexOf(libs[i]) > -1)
-                               html += '<a href="index.html?c=' + libs[i] + '">' + libs[i] + '</a><br />';
+                               html += '<a href="codedoc.html?c=' + libs[i] + '">' + libs[i] + '</a><br />';
                        else
                                html += '<span class="grey">' + libs[i] + '</span><br />';
                }
@@ -582,13 +560,13 @@ function module_index()
                html += '<h3>Packages</h3>';
                for (i in packs) {
                        if (packages.indexOf(packs[i]) > -1)
-                               html += '<a href="index.html?c=' + packs[i] + '">' + packs[i] + '</a><br />';
+                               html += '<a href="codedoc.html?c=' + packs[i] + '">' + packs[i] + '</a><br />';
                        else
                                html += '<span class="grey">' + packs[i] + '</span><br />';
                }
        }
        
-       set_sidebar(html);
+       append_sidebar(html);
 }
 
 function component_index()
@@ -602,7 +580,7 @@ function component_index()
                stats = component_stats[executables[i]];
                total_descr_cnt += stats.descr_cnt;
                total_completed_descr_cnt += stats.completed_descr_cnt;
-               html += '<a href="index.html?c=' + executables[i] + '">' + executables[i] + '</a>';
+               html += '<a href="codedoc.html?c=' + executables[i] + '">' + executables[i] + '</a>';
                html += ' <span class="stat">(' + 
                        Math.round(100 * stats.completed_descr_cnt / stats.descr_cnt) + '\%)</span><br />';
        }
@@ -610,7 +588,7 @@ function component_index()
        libraries.sort()
        for (i in libraries) {
                stats = component_stats[libraries[i]];
-               html += '<a href="index.html?c=' + libraries[i] + '">' + libraries[i] + '</a>';
+               html += '<a href="codedoc.html?c=' + libraries[i] + '">' + libraries[i] + '</a>';
                html += ' <span class="stat">(' + 
                        Math.round(100 * stats.completed_descr_cnt / stats.descr_cnt) + '\%)</span><br />';
        }
@@ -618,7 +596,7 @@ function component_index()
        packages.sort()
        for (i in packages) {
                stats = component_stats[packages[i]];
-               html += '<a href="index.html?c=' + packages[i] + '">' + packages[i] + '</a>';
+               html += '<a href="codedoc.html?c=' + packages[i] + '">' + packages[i] + '</a>';
                html += ' <span class="stat">(' + 
                        Math.round(100 * stats.completed_descr_cnt / stats.descr_cnt) + '\%)</span><br />';
        }
@@ -654,23 +632,3 @@ function build()
        }
 }
 
-function set_content(html)
-{
-       document.getElementById('content').innerHTML = html;
-}
-
-function append_content(html)
-{
-       document.getElementById('content').innerHTML += html;
-}
-
-function set_sidebar(html)
-{
-       document.getElementById('sidebar').innerHTML = html;
-}
-
-function append_sidebar(html)
-{
-       document.getElementById('sidebar').innerHTML += html;
-}
-
index 5e66ec1d45c262028aa831c9242b5a83995538d4..fc110407760b5da83dd126e13b6810c49f9a68c6 100644 (file)
@@ -161,6 +161,16 @@ hr {
        text-decoration: none;
 }
 
+#sidemenu {
+       padding-top: 1em;
+       padding-bottom: 1em;
+//     border-bottom: 1px solid white;
+       font-size: 1em;
+       text-align: center;
+       font-weight: bold;
+       background-color: #ee4400;
+}
+
 .grey {
        color: #ccc;
 }
@@ -250,6 +260,20 @@ tt, .code {
        padding: .3em .5em .3em 0;
 }
 
+.inline-type {
+       margin-right: .5em;
+}
+
+.inline-qualifier {
+       font-size: 70%;
+       vertical-align: top;
+       margin-left: .5em;
+}
+
+.inline-params {
+       margin-left: .5em;
+}
+
 .small-button {
        font-size: 70%;
 //     text-align: right;