New
authorMike Taylor <mike@indexdata.com>
Fri, 1 Nov 2013 15:09:47 +0000 (15:09 +0000)
committerMike Taylor <mike@indexdata.com>
Fri, 1 Nov 2013 15:09:47 +0000 (15:09 +0000)
examples/htdocs/dict.html [new file with mode: 0644]

diff --git a/examples/htdocs/dict.html b/examples/htdocs/dict.html
new file mode 100644 (file)
index 0000000..12ee573
--- /dev/null
@@ -0,0 +1,171 @@
+\r
+<html>\r
+  <head>\r
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+    <title>A-group silly 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
+    </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
+  </head>\r
+  <body>\r
+\r
+  <table height="100%" width="100%">\r
+  <tr valign="top" height="100%">\r
+    <td width="60%" valign="top">\r
+\r
+    <h1>MKWS: the MasterKey Widget Set</h1>\r
+    <p>\r
+      This site contains tools, not content:\r
+    </p>\r
+    <ul>\r
+      <li>\r
+        <a href="mkws.js">mkws.js</a>\r
+        --\r
+        JavaScript code that powers the MasterKey Widget Set\r
+      </li>\r
+      <li>\r
+        <a href="/libjs-pz2/pz2api.1.js">/libjs-pz2/pz2api.1.js</a>\r
+        --\r
+        Low-level JavaScript library for access to the MasterKey web\r
+        service.\r
+      </li>\r
+      <li>\r
+        <a href="mkws-complete.js"\r
+                >mkws-complete.js</a>\r
+        --\r
+        A single large JavaScript file containing everything needed for\r
+        MKWS to work: the widget-set itself, the API library, and any\r
+        additional prerequisites such as jQuery.\r
+      </li>\r
+      <li>\r
+        <a href="mkws.css">mkws.css</a>\r
+        --\r
+        A stylesheet which styles only MasterKey widgets, and does not\r
+        otherwise interfere with application-site's styles.\r
+    <!--\r
+        <p style="color:darkred">\r
+          Note. This is not yet quite true: the stylesheet needs tweaking\r
+          to make it more specific to only the MKWS components. At present\r
+          it spills over into styling parts of the containing site, too.\r
+        </p>\r
+    -->\r
+      </li>\r
+    </ul>\r
+    <p>\r
+      For examples of how to use the widget-set, see:\r
+    </p>\r
+    <ul>\r
+      <li>\r
+        A very simple application at\r
+        <a href="http://example.indexdata.com/"\r
+                >http://example.indexdata.com/</a>.\r
+        It's worth viewing the source to see how small it is.\r
+      </li>\r
+      <li>\r
+        <a href="http://example.indexdata.com/index-full.html"\r
+           >A more detailed version</a>\r
+       that contains a configuration structure instead of accepting\r
+        the defaults. Includes a custom translation option to present\r
+        the application in Arabic.\r
+      </li>\r
+      <li>\r
+        The\r
+        <a href="http://example.indexdata.com/index-jquery.html"\r
+           >jQuery plugin</a>\r
+        version, consisting of a single line of JavaScript code.\r
+      </li>\r
+      <li>\r
+       An application that\r
+       <a href="http://example.indexdata.com/index-lowlevel.html"\r
+          >uses lower-level MKWS components</a>\r
+       rather than the all-in-one <tt>#mkwsResults</tt> division,\r
+       allowing it to use a rather different layout.\r
+      </li>\r
+      <li>\r
+        <a href="http://example.indexdata.com/index-mobile.html"\r
+           >A version suitable for mobile devices</a>,\r
+       with a responsive design that moves components around\r
+        depending on the screen size.\r
+      </li>\r
+      <li>\r
+        <a href="http://example.indexdata.com/index-popup.html"\r
+           >A version that uses a jQuery popup</a>.\r
+      </li>\r
+      <li>\r
+        An existing web-site,\r
+        <a href="http://sagp.miketaylor.org.uk/"\r
+           >The Self-Appointed Grammar Police</a>,\r
+        which has been fitted with an MKWS searching widget.\r
+        (See also the MKWS-widget customisations in\r
+        <a href="http://sagp.miketaylor.org.uk/style.css"\r
+           >that site's stylesheet</a>.)\r
+      </li>\r
+      <li>\r
+       Another existing web-site,\r
+        <a href="http://zthes.z3950.org/"\r
+           >The Zthes specifications</a>,\r
+       which has been fitted with a popup MKWS search-box.\r
+      </li>\r
+    </ul>\r
+    <p>\r
+      The set of targets can be maintained:\r
+    </p>\r
+    <ul>\r
+      <li>\r
+       Use the main\r
+       <a href="http://mk2.indexdata.com/console/"\r
+          >MasterKey Admin Console</a>,\r
+       and act as the "MK Demo" library administrator.\r
+      </li>\r
+    </ul>\r
+    <p>\r
+      Documentation:\r
+    </p>\r
+    <ul>\r
+      <li>\r
+        The <a href="whitepaper.html">The whitepaper, including a reference section.</a>\r
+      </li>\r
+      <li>\r
+        The <a href="README.html">README.html</a>\r
+      </li>\r
+      <li>\r
+        The <a href="html-structure.txt"\r
+               >structure of the HTML generated by the MKWS widgets</a>,\r
+        which can be used to guide the customisation of its CSS styles.\r
+      </li>\r
+    </ul>\r
+  </td>\r
+  <td width="40%" align="top">\r
+       <div id="mkwsSearch"></div>\r
+       <div id="mkwsRecords"></div>\r
+       <div id="mkwsPager"></div>\r
+  </td>\r
+  </tr>\r
+  </table>\r
+    <script type="text/javascript">\r
+      $("#mkwsSearch").hide();\r
+      $("#mkwsPager").hide();\r
+\r
+      document.onclick = clickfunc;\r
+      var selectedtext="";\r
+      var clicking = false;\r
+      function clickfunc(e) {\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
+          //console.log("click: Set value " + sel + "  clicking=" + clicking );\r
+          $("input#mkwsButton").trigger("click");\r
+          clicking = false;\r
+        }\r
+      }\r
+    </script>\r
+  </body>\r
+</html>\r