1 mkws.registerWidgetType('Credo', function() {
6 // Main panel: encylopaedia and images on the left, topics on the right
7 s.push('<tr class="front">');
9 s.push('<td class="main">');
10 s.push(section('encyclopaedia', 'Topic Page: ### title',
11 this.subwidget('Reference')));
12 s.push(section('image', 'Images',
13 this.subwidget('Images', { /* ### config */ })));
16 s.push('<td class="side">');
17 s.push(section('mindmap', 'Create a Mind Map for ### title',
18 '### Is there a way to make a mind-map?'));
19 s.push(section('topics', 'Related Topics',
20 this.subwidget('Facet', { facet: 'subject' })));
25 s.push(sectionRow('entries', 'Credo Entries',
26 this.subwidget('Records', { /* ### config */ })));
27 s.push(sectionRow('articles', 'Articles',
28 this.subwidget('Records', { /* ### config */ })));
29 s.push(sectionRow('books', 'Books',
30 this.subwidget('Records', { /* ### config */ })));
31 s.push(sectionRow('news', 'News',
32 this.subwidget('Records', { /* ### config */ })));
33 s.push(sectionRow('resources', 'Suggested Resources',
34 this.subwidget('Records', { /* ### config */ })));
38 this.node.html(s.join(''));
41 function section(xclass, title, content) {
43 s.push('<div class="' + xclass + ' section">');
44 s.push('<div class="title">' + title + '</div>');
45 s.push('<div class="content">' + content + '</div>');
50 function sectionRow(xclass, title, content) {
53 s.push('<td colspan="2">');
54 s.push(section(xclass, title, content));