From 7909feac67ed8ae98aa1163e8e5d978e86a1ee92 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 22 May 2014 12:07:01 +0100 Subject: [PATCH] New --- ...e-1efb82332d8d1a9293ad60f7517668cfcce480b0.html | 32 +++++++++++ ...edo-1efb82332d8d1a9293ad60f7517668cfcce480b0.js | 59 ++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 examples/htdocs/mike-1efb82332d8d1a9293ad60f7517668cfcce480b0.html create mode 100644 examples/htdocs/mkws-widget-credo-1efb82332d8d1a9293ad60f7517668cfcce480b0.js diff --git a/examples/htdocs/mike-1efb82332d8d1a9293ad60f7517668cfcce480b0.html b/examples/htdocs/mike-1efb82332d8d1a9293ad60f7517668cfcce480b0.html new file mode 100644 index 0000000..0053fb6 --- /dev/null +++ b/examples/htdocs/mike-1efb82332d8d1a9293ad60f7517668cfcce480b0.html @@ -0,0 +1,32 @@ + + + + MKWS demo: Reference Universe widget + + + + + + + + + + + + + + + + + + + + + + + +
result will appear here
+ + diff --git a/examples/htdocs/mkws-widget-credo-1efb82332d8d1a9293ad60f7517668cfcce480b0.js b/examples/htdocs/mkws-widget-credo-1efb82332d8d1a9293ad60f7517668cfcce480b0.js new file mode 100644 index 0000000..2bb1b1a --- /dev/null +++ b/examples/htdocs/mkws-widget-credo-1efb82332d8d1a9293ad60f7517668cfcce480b0.js @@ -0,0 +1,59 @@ +mkws.registerWidgetType('Credo', function() { + var that = this; + var s = [] + s.push(''); + + // Main panel: encylopaedia and images on the left, topics on the right + s.push(''); + + s.push(''); + + s.push(''); + + s.push(''); + + 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('
'); + s.push(section('encyclopaedia', 'Topic Page: ### title', + this.subwidget('Reference'))); + s.push(section('image', 'Images', + this.subwidget('Images', { /* ### config */ }))); + s.push(''); + 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('
'); + + this.node.html(s.join('')); + + + function section(xclass, title, content) { + var s = []; + s.push('
'); + s.push('
' + title + '
'); + s.push('
' + content + '
'); + s.push('
'); + return s.join(''); + } + + function sectionRow(xclass, title, content) { + var s = []; + s.push(''); + s.push(''); + s.push(section(xclass, title, content)); + s.push(''); + s.push(''); + return s.join(''); + } +}); -- 1.7.10.4