From 12ed20302a918463f33493aa1060174cf50a9e8b Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Mon, 15 Dec 2014 14:04:22 -0500 Subject: [PATCH 1/1] Widget for testing Wikipediat-derived categories WCAT-4 --- examples/htdocs/mkws-widget-wikicat.js | 12 + examples/htdocs/tester-wiki.html | 391 ++++++++++++++++++++++++++++++++ 2 files changed, 403 insertions(+) create mode 100644 examples/htdocs/mkws-widget-wikicat.js create mode 100644 examples/htdocs/tester-wiki.html diff --git a/examples/htdocs/mkws-widget-wikicat.js b/examples/htdocs/mkws-widget-wikicat.js new file mode 100644 index 0000000..8bb3901 --- /dev/null +++ b/examples/htdocs/mkws-widget-wikicat.js @@ -0,0 +1,12 @@ +mkws.registerWidgetType('wikicategories', function() { + $.ajax({ + url: mkws.pazpar2_url() + "?command=wiki&query=" + this.config.autosearch, + context: this + }) + .done(function(data) { + outstr = new XMLSerializer().serializeToString(data.getElementsByTagName("targetcategories").item(0)); + this.node.html(outstr.replace("targetcategories", "ul").replace(/targetcategory/g, "li")); + }); +}); + + diff --git a/examples/htdocs/tester-wiki.html b/examples/htdocs/tester-wiki.html new file mode 100644 index 0000000..b49d255 --- /dev/null +++ b/examples/htdocs/tester-wiki.html @@ -0,0 +1,391 @@ + + + + + +MKWS demo: Reference & Credo, and popup widget, development + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + Settings: + + + + + + Results: + + + +
+
+ +
+ + Relevant to query ? + + + + + + + + + Note: + +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+ + + + + + -- 1.7.10.4