Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/mkws
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 23 Oct 2014 12:36:00 +0000 (12:36 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 23 Oct 2014 12:36:00 +0000 (12:36 +0000)
examples/htdocs/mkws-widget-ru.js
examples/htdocs/mkws-widget-ru.readme

index 2ba8a0d..20762f7 100644 (file)
@@ -2,10 +2,10 @@ var mkws_config = {
    service_proxy_auth: "http://sp-mkws.indexdata.com/service-proxy/?command=auth&action=login&username=paratext&password=paratext_mkc"
 };
 
-mkws.registerWidgetType('ReferenceUniverse', function() {
+mkws.registerWidgetType('reference-universe', function() {
   if (!this.config.perpage) this.config.perpage = 5;
   if (!this.config.sort) this.config.sort = "position";
-  this.team.registerTemplate('ReferenceUniverse', '\
+  this.team.registerTemplate('reference-universe', '\
 <h2>Results from Reference Universe</h2>\
 <ul>\
 {{#each hits}}\
@@ -27,7 +27,7 @@ mkws.registerWidgetType('ReferenceUniverse', function() {
 ');
 
   var that = this;
-  var template = that.team.loadTemplate(that.config.template || "ReferenceUniverse");
+  var template = that.team.loadTemplate(that.config.template || "reference-universe");
   this.team.queue("records").subscribe(function(data) {
     that.node.html(template(data));
   }); 
index c55272e..2a1c4e4 100644 (file)
@@ -6,7 +6,7 @@ Simply paste this inline with the markup on any page:
     <script src="//mkws.indexdata.com/mkws-complete.js"></script>
     <script src="//mkws.indexdata.com/mkws-widget-ru.js"></script>
     <link rel="stylesheet" type="text/css" href="//mkws.indexdata.com/mkws-widget-ru.css" />
-    <div class="mkwsReferenceUniverse" autosearch="!param!q"></div>
+    <div class="mkws-reference-universe" autosearch="!param!q"></div>
     
 ## A bit more detail 
 
@@ -21,9 +21,9 @@ The provided stylesheet is generic and you're encouraged to replace it entirely
 
     <link rel="stylesheet" type="text/css" href="//mkws.indexdata.com/mkws-widget-ru.css" />
     
-Any element you give the class `mkwsReferenceUniverse` will have is contents replaced by the top results from a search against the Reference Universe service for the current query.
+Any element you give the class `mkws-reference-universe` will have is contents replaced by the top results from a search against the Reference Universe service for the current query.
     
-    <div class="mkwsReferenceUniverse" autosearch="!param!q"></div>
+    <div class="mkws-reference-universe" autosearch="!param!q"></div>
 
 ### Finding the query