e8d0682c22e8f5ed96f40a01d3cdcb59d4efde01
[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 Introduction
7 ------------
8
9 As much of the searching functionality as possible is hosted on
10         <http://mkws.indexdata.com/>
11 so that very simple applications such as
12         <http://example.indexdata.com/simple.html>
13 can have MasterKey searching with minimal effort.
14
15
16 Supported Browsers
17 ------------------
18
19 Any modern browser will work fine. JavaScript must be enabled.
20
21 * IE8 or later
22 * Firefox 17 or later
23 * Google Chrome 27 or later
24 * Safari 6 or later
25 * Opera  12 or later
26 * iOS 6.x (iPhone, iPad)
27 * Android 4.x
28
29 Not supported: IE6, IE7
30
31
32 Configuring a client (short version)
33 ------------------------------------
34
35 The application's HTML must contains the following elements as well as
36 whatever makes up the application itself:
37
38 Prerequisites:
39
40 ~~~
41         <link rel="stylesheet" href="http://mkws.indexdata.com/mkws.css" />
42         <script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
43 ~~~
44
45 Then the following special `<div>`s can be added (with no content), and
46 will be filled in by MKWS:
47
48 * `<div id="mkwsSwitch"></div>` -- switch between record and target views
49 * `<div id="mkwsLang"></div>  ` -- switch between English, Danish and German
50 * `<div id="mkwsSearch"></div>` -- search box and button
51 * `<div id="mkwsResults"></div>` -- result list, including pager/sorting
52 * `<div id="mkwsTargets"></div>` -- target list, including status
53 * `<div id="mkwsStat"></div>` -- summary statistics
54
55 You can configure and control the client by creating an `mkws_config`
56 object before loading the widget-set. Here is an example showing how
57 to use options to offer a choice between English and German UI
58 languages, and to default to sorting by title ascending:
59
60 ~~~
61     <script type="text/javascript">
62       var mkws_config = {
63         lang_options: ["en", "de" ],
64         sort_default: "title:1"
65       };
66     </script>
67 ~~~
68
69 For much more detail, see:
70 [Embedded metasearching with the MasterKey Widget Set](mkws-manual.html)
71
72
73 - - -
74
75 Copyright 2014 Index Data ApS. <http://indexdata.com>