Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/mkws
authorMike Taylor <mike@indexdata.com>
Wed, 22 Oct 2014 14:59:30 +0000 (15:59 +0100)
committerMike Taylor <mike@indexdata.com>
Wed, 22 Oct 2014 14:59:30 +0000 (15:59 +0100)
doc/Makefile
examples/htdocs/auto.html
examples/htdocs/dict.html
examples/htdocs/localauth.html
examples/htdocs/wolfram.html
src/mkws-widget-termlists.js
test/spec/mkws-pazpar2.js
test/widgets/url.demos
test/widgets/url.mike

index 7d2cbbd..1e436d4 100644 (file)
@@ -5,12 +5,25 @@
 
 # Older versions of pandoc don't do PDF output, but have a companion program
 MARKDOWN2PDF = $(shell if which markdown2pdf > /dev/null; then echo markdown2pdf; else echo pandoc --standalone; fi)
+HAVE_PDFLATEX = $(shell which pdflatex 2>/dev/null)
 
-DOCS = index.html index.pdf \
-       mkws-manual.html mkws-manual.pdf \
-       mkws-developer.html mkws-developer.pdf \
+DOCS = index.html \
+       mkws-manual.html \
+       mkws-developer.html \
        mkws-doc.css
 
+PDFS = index.pdf \
+       mkws-manual.pdf \
+       mkws-developer.pdf
+
+#
+# skip PDF creation if pdflatex is not installed
+# The debian tex package may download up to 650MB
+#
+ifneq "${HAVE_PDFLATEX}" ""
+DOCS+= ${PDFS}
+endif
+
 INSTALLED = $(DOCS:%=../tools/htdocs/%)
 
 all: $(INSTALLED)
@@ -51,4 +64,3 @@ push:
 
 help:
        @echo "make [ all | clean | push ]"
-
index 467318e..c3dc1f3 100644 (file)
 
 
 <div class='mkwsRecords'
-       autosearch='mike'
+       autosearch='sushi'
        sort='relevance'
-       targets='pz:id~josiah.brown.edu:210/innopac|connect.indexdata.com:9000/mit_opencourseware'
+       targets='pz:id~josiah.brown.edu:210/innopac|connect.indexdata.com:9000/mit_opencourseware|lui.indexdata.com:8080/solr4/select?fq=database:3602'
 >results will appear here</div>
 
-
        </td>
       </tr>
     </table>
     <p style="color:grey">
       <a href="http://mkws.indexdata.com/">About MKWS</p>
     </p>
+    <script type="text/javascript">
+      var mkws_config = {
+        sp_auth_credentials: "mkwstest/mkwstest"
+      };
+    </script>
   </body>
 </html>
index 42fde6a..23edc0c 100644 (file)
@@ -4,11 +4,13 @@
     <title>Dictionary lookup demo</title>\r
     <script type="text/javascript">\r
       var mkws_config = {\r
-       sp_auth_credentials: "dict/dict"\r
+       sp_auth_credentials: "mkwsdict/mkwsdict"\r
       };\r
     </script>\r
     <link rel="stylesheet" type="text/css" href="//mkws.indexdata.com/mkws.css" />\r
+    <link rel="stylesheet" type="text/css" href="mkws-widget-reference.css" />\r
     <script src="//mkws.indexdata.com/mkws-complete.js"></script>\r
+    <script>$ = jQuery = mkws.$; </script>\r
   </head>\r
   <body>\r
 \r
       </td>\r
       <td width="40%" align="top">\r
        <div class="mkwsSearch"></div>\r
-       <div class="mkwsRecords"></div>\r
+       <div class="mkwsReference"></div>\r
       </td>\r
     </tr>\r
   </table>\r
     <script type="text/javascript">\r
       $(".mkwsSearch").hide();\r
+      $(".mkwsReference").hide();\r
 \r
       document.onclick = clickfunc;\r
       var selectedtext="";\r
@@ -51,6 +54,7 @@
         //console.log("click: " + sel + "  clicking=" + clicking );\r
         if ( sel != "" && ! clicking ) {\r
           clicking  = true;\r
+         $(".mkwsReference").show();\r
           $("input.mkwsQuery").val(sel);\r
           //console.log("click: Set value " + sel + "  clicking=" + clicking );\r
           $("input.mkwsButton").trigger("click");\r
index 239a5e8..d665a5d 100644 (file)
@@ -6,13 +6,14 @@
     <script type="text/javascript">
       var mkws_config = {
         service_proxy_auth: "http://example.indexdata.com/service-proxy-auth/",
-        service_proxy_auth_domain : "mkws.indexdata.com"
+        service_proxy_auth_domain : "sp-mkws.indexdata.com"
       };
       // See also the Apache2 RewriteRule needed to make this work:
       // http://example.indexdata.com/apache-config.txt
     </script>
     <script type="text/javascript" src="//mkws.indexdata.com/mkws-complete.js"></script>
   </head>
   <body>
     <div class="mkwsSwitch"></div>
     <div class="mkwsLang"></div>
index 83a67a6..34438c1 100644 (file)
@@ -56,7 +56,7 @@
     <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script> -->
     <script type="text/javascript">
       // check for the real jQuery / $ object
-      console.log("Reset jQuery and $ objection to null....");
+      mkws.log("Reset jQuery and $ objection to null....");
       $ = null;
       jQuery = null;
     </script>
index 2e684f6..e8cab10 100644 (file)
@@ -62,11 +62,11 @@ mkws.registerWidgetType('facet', function() {
     if (that.config.template) {
       template = team.loadTemplate(that.config.template);
     } else {
-      template = team.loadTemplate("Facet-" + caption);
+      template = team.loadTemplate("facet-" + name);
       if (template) {
-        that.log("Using Facet-" + caption + " template.")
+        that.log("Using facet-" + name + " template.")
       } else {
-        that.log("No " + caption + " specific template, using default.")
+        that.log("No " + name + " specific template, using default.")
         template = team.loadTemplate("Facet");
       }
     }
index 274e45f..211b61c 100644 (file)
@@ -254,7 +254,7 @@ describe("Check Termlist", function () {
 
         waitsFor(function () {
             return $("div.mkwsFacet[data-mkws-facet='author'] div.mkwsTerm").length >= 2 ? true : false;
-        }, "At least one author link displayed", 4 * jasmine_config.second);
+        }, "At least two author link displayed", 4 * jasmine_config.second);
 
         runs(function () {
             expect($("div.mkwsFacet[data-mkws-facet='author'] div.mkwsTerm").length).toBeGreaterThan(1);
index 56db882..1087ee7 100644 (file)
@@ -3,3 +3,7 @@ http://example.indexdata.com/minimal.html
 http://example.indexdata.com/language.html
 http://example.indexdata.com/mobile.html
 http://example.indexdata.com/lowlevel.html
+http://example.indexdata.com/dict.html
+http://example.indexdata.com/popup.html
+http://example.indexdata.com/auto.html
+http://example.indexdata.com/localauth.html
index b865087..8c8fc40 100644 (file)
@@ -1,2 +1 @@
 http://zthes.z3950.org/
-http://sagp.miketaylor.org.uk/