Remove What Next section: it's out of date, none of customers'
[mkws-moved-to-github.git] / tools / htdocs / README.markdown
1 % The MasterKey Widget Set
2 % Mike Taylor; Wolfram Schneider
3 % 10 July 2013
4
5
6 Introduction
7 ------------
8
9 This is the MasterKey Widget Set. The initial version was based on the
10 "jsdemo" application distributed with pazpar2, but it is now far
11 removed from those beginnnings.
12
13 As much of the searching functionality as possible is hosted on
14         <http://mkws.indexdata.com/>
15 so that very simple websites such as
16         <http://example.indexdata.com/>
17 can have MasterKey searching with minimal effort.
18
19 The following files are hosted on `mkws.indexdata.com`:
20
21 * `mkws.js`
22 * `/pazpar2/js/pz2.js`
23 * `mkws-complete.js` -- a single file consisting of `mkws.js`,
24   jQuery (which it uses), Handlebars (ditto) and `pz2.js`
25 * `mkws.css`
26
27
28 Configuring a client
29 --------------------
30
31 The application's HTML must contains the following elements as well as
32 whatever makes up the application itself:
33
34 Prerequisites:
35
36 ~~~
37         <link rel="stylesheet" href="http://mkws.indexdata.com/mkws.css" />
38         <script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
39 ~~~
40
41 Then the following special `<div>`s can be added (with no content), and
42 will be filled in by MKWS:
43
44 * `<div id="mkwsSwitch"></div>` -- switch between record and target views
45 * `<div id="mkwsLang"></div>  ` -- switch between English, Danish and German
46 * `<div id="mkwsSearch"></div>` -- search box and button
47 * `<div id="mkwsResults"></div>` -- result list, including pager/sorting
48 * `<div id="mkwsTargets"></div>` -- target list, including status
49 * `<div id="mkwsStat"></div>` -- summary statistics
50
51 You can configure and control the client by creating an `mkws_config`
52 object _before_ loading the widget-set.  Here is an example of all
53 possible options:
54
55 ~~~
56     <script type="text/javascript">
57       var mkws_config = {
58         use_service_proxy: true,    /* true, flase: use service proxy instead pazpar2 */
59         show_lang: true,            /* true, false: show/hide language menu */
60         show_sort: true,            /* true, false: show/hide sort menu */
61         show_perpage: true,         /* true, false: show/hide perpage menu */
62         lang_options: ["en", "de", "da"],
63                                     /* display languages links for given languages, [] for all */
64         facets: ["sources", "subjects", "authors"],
65                                     /* display facets, in this order, [] for none */
66         sort_default: "relevance",  /* "relevance", "title:1", "date:0", "date:1" */
67         query_width: 50,            /* 5..50 */
68         perpage_default: 20,        /* 10, 20, 30, 50 */
69         lang: "en",                 /* "en", "de", "da" */
70         debug_level: 0,             /* debug level for development: 0..2 */
71
72         responsive_design_wodth: 600,    /* page reflows for devices < 600 pixels wide */
73         pazpar2_url: "/service-proxy/",            /* URL */
74         service_proxy_auth: "/service-proxy-auth", /* URL */
75         // TODO: language_*, perpage_options, sort_options
76       };
77     </script>
78 ~~~
79
80 Supported Browsers
81 ------------------
82
83 Any modern HTML5 browser will work fine. JavaScript must be enabled.
84
85 * IE8 or later
86 * Firefox 17 or later
87 * Google Chrome 27 or later
88 * Safari 6 or later
89 * Opera  12 or later
90 * iOS 6.x (iPhone, iPad)
91 * Android 4.x
92
93 Not supported: IE6, IE7
94
95
96 New Features since jsdemo
97 --------------------------
98
99 - Supports basic pazpar2 and service-proxy requests
100 - Simplified HTML
101 - The search page is fully configurable by a JSON object
102
103
104 Checklist before doing a release
105 ---------------------------------
106 - open the site, e.g. http://mkws-dev.indexdata.com/index-mike.html
107 - open the debug/error console in your browser (alt-cmd-J, shift-cmd-J)
108 - check the language links ("de", "da", "en")
109 - run a search with few, but not to few results, e.g.: freebsd
110 - check "Targets" | "Records" links
111 - check "Next" and "Prev" links
112 - click on the first hit and display details, click on an "URL" to jump to
113   the local catalog or full text
114 - limit search to a "Source"
115 - limit search to an "Author"
116 - sort results by "Title" and "newest"
117 - what else?
118
119
120 - - -
121
122 Copyright 2013 IndexData ApS. <http://www.indexdata.com>