add a note that this widget may not work on older Browsers as IE8, MKWS-309
[mkws-moved-to-github.git] / examples / htdocs / dict.html
index 1c209de..c63f983 100644 (file)
@@ -4,13 +4,13 @@
     <title>Dictionary lookup demo</title>\r
     <script type="text/javascript">\r
       var mkws_config = {\r
-            //responsive_design_width: 990\r
-            //perpage_default: 10,\r
-            service_proxy_auth: "http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=dic&password=dic"\r
-        };\r
+       sp_auth_credentials: "mkwsdict/mkwsdict"\r
+      };\r
     </script>\r
-    <link rel="stylesheet" type="text/css" href="http://mkws.indexdata.com/mkws.css" />\r
-    <script src="http://mkws.indexdata.com/mkws-complete.js"></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
        <p>Modern computers based on <a href="http://en.wikipedia.org/wiki/Integrated_circuit" title="Integrated circuit">integrated circuits</a> are millions to billions of times more capable than the early machines, and occupy a fraction of the space.<sup id="cite_ref-2" class="reference"><a href="http://en.wikipedia.org/wiki/Computer#cite_note-2"><span>[</span>2<span>]</span></a></sup> Simple computers are small enough to fit into <a href="http://en.wikipedia.org/wiki/Mobile_device" title="Mobile device">mobile devices</a>, and <a href="http://en.wikipedia.org/wiki/Mobile_computing" title="Mobile computing">mobile computers</a> can be powered by small <a href="http://en.wikipedia.org/wiki/Battery_(electricity)" title="Battery (electricity)">batteries</a>. Personal computers in their various forms are <a href="http://en.wikipedia.org/wiki/Icon" title="Icon">icons</a> of the <a href="http://en.wikipedia.org/wiki/Information_Age" title="Information Age">Information Age</a> and are what most people think of as “computers.” However, the <a href="http://en.wikipedia.org/wiki/Embedded_system" title="Embedded system">embedded computers</a> found in many devices from <a href="http://en.wikipedia.org/wiki/Digital_audio_player" title="Digital audio player" class="mw-redirect">MP3 players</a> to <a href="http://en.wikipedia.org/wiki/Fighter_aircraft" title="Fighter aircraft">fighter aircraft</a> and from toys to <a href="http://en.wikipedia.org/wiki/Industrial_robot" title="Industrial robot">industrial robots</a> are the most numerous.</p>\r
       </td>\r
       <td width="40%" align="top">\r
-       <div id="mkwsSearch"></div>\r
-       <div id="mkwsRecords"></div>\r
+       <div class="mkws-search"></div>\r
+       <div class="mkws-reference"></div>\r
       </td>\r
     </tr>\r
   </table>\r
     <script type="text/javascript">\r
-      $("#mkwsSearch").hide();\r
+      $(".mkws-search").hide();\r
+      $(".mkws-reference").hide();\r
 \r
       document.onclick = clickfunc;\r
       var selectedtext="";\r
       var clicking = false;\r
       function clickfunc(e) {\r
+       // may not work on older Browsers, as IE8\r
         var sel = window.getSelection();\r
         //console.log("click: " + sel + "  clicking=" + clicking );\r
         if ( sel != "" && ! clicking ) {\r
           clicking  = true;\r
-          $("input#mkwsQuery").val(sel);\r
+         $(".mkws-reference").show();\r
+          $("input.mkws-query").val(sel);\r
           //console.log("click: Set value " + sel + "  clicking=" + clicking );\r
-          $("input#mkwsButton").trigger("click");\r
+          $("input.mkws-button").trigger("click");\r
           clicking = false;\r
         }\r
       }\r