New Credo widget, nowhere near done.
[mkws-moved-to-github.git] / examples / htdocs / mkws-widget-credo.js
1 mkws.registerWidgetType('Credo', function() {
2   s = []
3   s.push('<table>');
4
5   // Main panel: encylopaedia and images on the left, topics on the right
6   s.push('<tr>');
7
8   s.push('<td class="main">');
9
10   s.push('<div class="encyclopaedia">');
11   s.push('<div class="title">Topic Page: ### title</div>');
12   s.push(this.subwidget('Reference'));
13   s.push('</div>');
14
15   s.push('<div class="images">');
16   s.push('<div class="title">Images</div>');
17   s.push(this.subwidget('Images', { /* ### config */ } ));
18   s.push('</div>');
19
20   s.push('</td>');
21
22   s.push('<td class="side">');
23
24   s.push('<div class="mindmap">');
25   s.push('<div class="title">Create a Mind Map for ### title</div>');
26   // ### Is there a way to make a mind-map?
27   s.push('</div>');
28
29   s.push('<div class="topics">');
30   s.push('<div class="title">Related Topics</div>');
31   s.push(this.subwidget('Facet', { facet: 'subject' }));
32   s.push('</div>');
33
34   s.push('</td>');
35
36   s.push('</tr>');
37
38   s.push('<tr>');
39   s.push('</td>');
40   s.push('<div class="entries">');
41   s.push('<div class="title">Credo Entries</div>');
42   s.push(this.subwidget('Records', { /* ### config */ }));
43   s.push('</div>');
44   s.push('</td>');
45   s.push('</tr>');
46
47   // More TRs for Articles, Books, News, Suggested Resources
48   s.push('</table>');
49
50   this.node.html(s.join(''));
51 });