1 An embryonic MasterKey Widget Set
2 =================================
4 This directory contains an embryonic MasterKey Widget Set, based
5 initially on "jsdemo" though now far removed from those beginnnings.
11 The goal is to make it that as much of the searching functionality as
13 http://mkws.indexdata.com/
14 so that very simple websites such as
15 http://somesite.indexdata.com/
16 can have MasterKey searching with minimal effort.
18 The following files must be hosted on mkws.indexdata.com:
21 /libjs-pz2/pz2api.1.js (*)
23 The following files make up the application:
25 favicon.ico [optional]
28 (At present, the client application's configuruation also needs an
29 Alias for /service-proxy/, to avoid cross-site scripting issues. We
32 (*) if you don't have already installed libjs-pz2 on the machine, you can
33 do it by installing a debian package or check it out from GIT:
34 $ git clone ssh://git.indexdata.com:222/home/git/pub/libjs-pz2
39 The application's HTML must contains the following elements as well as
40 whatever makes up the application itself:
43 <link rel="stylesheet" href="mkwsStyle.css" />
44 <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
45 <script type="text/javascript" src="/libjs-pz2/pz2api.1.js"></script>
46 <script type="text/javascript" src="mkws.js"></script>
47 (Yes, we're using JQuery. We use it only in the most trivial ways, and
48 could probably get rid of it without too much pain. I'd like to have
49 mkws.js automatically pull in pz2api.1.js, too, so you don't need to
50 do so many things, but that's not quite trivial.)
52 Then the following special <div>s can be added (with no content), and
53 will be filled in by MKWS:
54 <div id="mkwsSwitch"></div> -- switch between record and target views
55 <div id="mkwsSearch"></div> -- search box and button
56 <div id="mkwsRecords"></div> -- result list, including pager/sorting
57 <div id="mkwsTargets"></div> -- target list, including status
58 <div id="mkwsStat"></div> -- summary statistics
60 At present, MKWS will not work correctly if any of these is
61 missing. One of the TODOs is to fix it so that it doesn't try to use
62 whatever is not there, and just uses what is.
69 * Fix cross-site issues proper
70 * Make MKWS robust to missing widgets
71 * Make CSS more tightly targeted at MKWS elements only
73 * Embed in a real, existing, site