--- /dev/null
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>MKWS demo: Reference Universe widget</title>
+ <link rel="stylesheet" type="text/css" href="mkws-widget-credo.css" />
+ <script type="text/javascript">
+ var mkws_config = { service_proxy_auth: "//mkws.indexdata.com/service-proxy-testauth" };
+ </script>
+ <script type="text/javascript" src="//code.jquery.com/jquery-1.10.0.min.js"></script>
+ <script type="text/javascript" src="//x.mkws.indexdata.com/jquery.json-2.4.js"></script>
+ <script type="text/javascript" src="//x.mkws.indexdata.com/handlebars-v1.1.2.js"></script>
+ <script type="text/javascript" src="//x.mkws.indexdata.com/pazpar2/js/pz2.js"></script>
+ <script type="text/javascript" src="src/mkws-handlebars.js"></script>
+ <script type="text/javascript" src="src/mkws-core.js"></script>
+ <script type="text/javascript" src="src/mkws-team.js"></script>
+ <script type="text/javascript" src="src/mkws-filter.js"></script>
+ <script type="text/javascript" src="src/mkws-widget.js"></script>
+ <script type="text/javascript" src="src/mkws-widget-main.js"></script>
+ <script type="text/javascript" src="src/mkws-widget-termlists.js"></script>
+ <script type="text/javascript" src="src/mkws-widget-authname.js"></script>
+ <script type="text/javascript" src="src/mkws-widget-categories.js"></script>
+ <script type="text/javascript" src="src/mkws-widget-log.js"></script>
+ <script type="text/javascript" src="src/mkws-widget-record.js"></script>
+ <script type="text/javascript" src="src/mkws-widget-reference.js"></script>
+ <script type="text/javascript" src="src/mkws-widget-builder.js"></script>
+ <script type="text/javascript" xsrc="mkws-widget-credo.js"></script>
+ <script type="text/javascript" src="mkws-widget-credo-1efb82332d8d1a9293ad60f7517668cfcce480b0.js"></script>
+ </head>
+ <body>
+ <div class='mkwsCredo' autosearch='!param!q'>result will appear here</div>
+ </body>
+</html>
--- /dev/null
+mkws.registerWidgetType('Credo', function() {
+ var that = this;
+ var s = []
+ s.push('<table>');
+
+ // Main panel: encylopaedia and images on the left, topics on the right
+ s.push('<tr class="front">');
+
+ s.push('<td class="main">');
+ s.push(section('encyclopaedia', 'Topic Page: ### title',
+ this.subwidget('Reference')));
+ s.push(section('image', 'Images',
+ this.subwidget('Images', { /* ### config */ })));
+ s.push('</td>');
+
+ s.push('<td class="side">');
+ s.push(section('mindmap', 'Create a Mind Map for ### title',
+ '### Is there a way to make a mind-map?'));
+ s.push(section('topics', 'Related Topics',
+ this.subwidget('Facet', { facet: 'subject' })));
+ s.push('</td>');
+
+ s.push('</tr>');
+
+ s.push(sectionRow('entries', 'Credo Entries',
+ this.subwidget('Records', { /* ### config */ })));
+ s.push(sectionRow('articles', 'Articles',
+ this.subwidget('Records', { /* ### config */ })));
+ s.push(sectionRow('books', 'Books',
+ this.subwidget('Records', { /* ### config */ })));
+ s.push(sectionRow('news', 'News',
+ this.subwidget('Records', { /* ### config */ })));
+ s.push(sectionRow('resources', 'Suggested Resources',
+ this.subwidget('Records', { /* ### config */ })));
+
+ s.push('</table>');
+
+ this.node.html(s.join(''));
+
+
+ function section(xclass, title, content) {
+ var s = [];
+ s.push('<div class="' + xclass + ' section">');
+ s.push('<div class="title">' + title + '</div>');
+ s.push('<div class="content">' + content + '</div>');
+ s.push('</div>');
+ return s.join('');
+ }
+
+ function sectionRow(xclass, title, content) {
+ var s = [];
+ s.push('<tr>');
+ s.push('<td colspan="2">');
+ s.push(section(xclass, title, content));
+ s.push('</td>');
+ s.push('</tr>');
+ return s.join('');
+ }
+});