Move supported-browsers section from README.markdown to index.markdown
[mkws-moved-to-github.git] / doc / README.markdown
1 % The MasterKey Widget Set
2 % Mike Taylor; Wolfram Schneider
3 % 28 July 2014
4
5
6 Configuring a client (short version)
7 ------------------------------------
8
9 The application's HTML must contains the following elements as well as
10 whatever makes up the application itself:
11
12 Prerequisites:
13
14 ~~~
15         <link rel="stylesheet" href="http://mkws.indexdata.com/mkws.css" />
16         <script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
17 ~~~
18
19 Then the following special `<div>`s can be added (with no content), and
20 will be filled in by MKWS:
21
22 * `<div id="mkwsSwitch"></div>` -- switch between record and target views
23 * `<div id="mkwsLang"></div>  ` -- switch between English, Danish and German
24 * `<div id="mkwsSearch"></div>` -- search box and button
25 * `<div id="mkwsResults"></div>` -- result list, including pager/sorting
26 * `<div id="mkwsTargets"></div>` -- target list, including status
27 * `<div id="mkwsStat"></div>` -- summary statistics
28
29 You can configure and control the client by creating an `mkws_config`
30 object before loading the widget-set. Here is an example showing how
31 to use options to offer a choice between English and German UI
32 languages, and to default to sorting by title ascending:
33
34 ~~~
35     <script type="text/javascript">
36       var mkws_config = {
37         lang_options: ["en", "de" ],
38         sort_default: "title:1"
39       };
40     </script>
41 ~~~
42
43 For much more detail, see:
44 [Embedded metasearching with the MasterKey Widget Set](mkws-manual.html)
45
46
47 - - -
48
49 Copyright 2014 Index Data ApS. <http://indexdata.com>