From: Wolfram Schneider Date: Tue, 9 Sep 2014 14:48:07 +0000 (+0000) Subject: widget that searches WIMP, based on reference UNIVERSE, MKWS-266 X-Git-Tag: 1.0.0~39^2~6^2~7 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=86a755a6e5b487f88ca5e6c1612aca6965acc98e;p=mkws-moved-to-github.git widget that searches WIMP, based on reference UNIVERSE, MKWS-266 --- diff --git a/examples/htdocs/mkws-widget-wimp.css b/examples/htdocs/mkws-widget-wimp.css new file mode 100644 index 0000000..0d5c684 --- /dev/null +++ b/examples/htdocs/mkws-widget-wimp.css @@ -0,0 +1,37 @@ +.mkwsReferenceUniverse { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + background: #FCFBFA; + padding: 0.5em 1em 0.25em; + box-shadow: 0 0 2px 0 #7F8F93; + border-radius: 0 0 1.5em; + -moz-border-radius: 0 0 1.5em; + -webkit-border-radius: 0 0 1.5em; + line-height: 1.4; + color: #86979B; + background: radial-gradient(ellipse at center, #ffffff 0%,#f8f8f8 100%); +} + +h2 { + font-size: 100%; + color: #4A5456; + padding-bottom: .5em; +} + +ul { + margin: 0; + padding: 0; +} + +li { + margin: .95em .25em; + padding-top: .75em; + border-top: 1px dotted #BEC8CC; + font-size: 90%; + list-style: none; +} + +a { + text-decoration: none; + font-weight:bold; + color: #2B77AF; +} diff --git a/examples/htdocs/mkws-widget-wimp.html b/examples/htdocs/mkws-widget-wimp.html new file mode 100644 index 0000000..b8fa131 --- /dev/null +++ b/examples/htdocs/mkws-widget-wimp.html @@ -0,0 +1,8 @@ + +
+ + + +
+
+ diff --git a/examples/htdocs/mkws-widget-wimp.js b/examples/htdocs/mkws-widget-wimp.js new file mode 100644 index 0000000..55b4488 --- /dev/null +++ b/examples/htdocs/mkws-widget-wimp.js @@ -0,0 +1,36 @@ +var mkws_config = { + service_proxy_auth: "http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=paratext&password=paratext_mkc" +}; + +mkws.registerWidgetType('ReferenceUniverse', function() { + if (!this.config.perpage) this.config.perpage = 5; + if (!this.config.sort) this.config.sort = "position"; + this.team.registerTemplate('ReferenceUniverse', '\ +

Results from Reference Universe

\ +\ +'); + + var that = this; + var template = that.team.loadTemplate(that.config.template || "ReferenceUniverse"); + this.team.queue("records").subscribe(function(data) { + that.node.html(template(data)); + }); + that.autosearch(); +}); +