get dict.html running again, MKWS-304
authorWolfram Schneider <wosch@indexdata.dk>
Tue, 21 Oct 2014 15:25:01 +0000 (17:25 +0200)
committerWolfram Schneider <wosch@indexdata.dk>
Tue, 21 Oct 2014 15:25:01 +0000 (17:25 +0200)
- setup a new library, with account mkwsdict/mkwsdict
- using the target "Wikimedia Wikipedia Single Result"
- switch from mkwsResults to mkwsReference widget

examples/htdocs/dict.html

index c5f96ab..23edc0c 100644 (file)
@@ -4,10 +4,11 @@
     <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
       </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
@@ -52,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