use $@ for check-js
[mkws-moved-to-github.git] / doc / index.markdown
index 00a9dcb..d0cb8c4 100644 (file)
@@ -45,13 +45,51 @@ searching application:
 That's it. A complete metasearching application. Everything
 else is refinement.
 
+Configuring a client (short version)
+------------------------------------
+
+The application's HTML must contains the following elements as well as
+whatever makes up the application itself:
+
+Prerequisites:
+
+~~~
+       <link rel="stylesheet" href="http://mkws.indexdata.com/mkws.css" />
+       <script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
+~~~
+
+Then the following special `<div>`s can be added (with no content), and
+will be filled in by MKWS:
+
+* `<div id="mkwsSwitch"></div>` -- switch between record and target views
+* `<div id="mkwsLang"></div>  ` -- switch between English, Danish and German
+* `<div id="mkwsSearch"></div>` -- search box and button
+* `<div id="mkwsResults"></div>` -- result list, including pager/sorting
+* `<div id="mkwsTargets"></div>` -- target list, including status
+* `<div id="mkwsStat"></div>` -- summary statistics
+
+You can configure and control the client by creating an `mkws_config`
+object before loading the widget-set. Here is an example showing how
+to use options to offer a choice between English and German UI
+languages, and to default to sorting by title ascending:
+
+~~~
+    <script type="text/javascript">
+      var mkws_config = {
+        lang_options: ["en", "de" ],
+        sort_default: "title:1"
+      };
+    </script>
+~~~
+
+For much more detail, see:
+[Embedded metasearching with the MasterKey Widget Set](mkws-manual.html)
+
 Documentation
 -------------
 
 * This file.
   [<a href="index.pdf">PDF version</a>]
-* The <a href="README.html">README</a> -- mostly technical details.
-  [<a href="README.pdf">PDF version</a>]
 * The <a href="mkws-manual.html">MKWS manual, including a reference section.</a>
   [<a href="mkws-manual.pdf">PDF version</a>]
 * The <a href="mkws-developer.html">MKWS developers' guide.</a>
@@ -89,8 +127,7 @@ Minified versions of the MKWS JavaScript files are also available:
 * <a href="mkws.min.js">mkws.min.js</a>
 * <a href="mkws-complete.min.js">mkws-complete.min.js</a>
 
-Versions
---------
+### Specific versions
 
 The links above to the various forms of the widget-set JavaScript
 (<a href="mkws.js">mkws.js</a>,