Change all references to libjs-pz2/pz2api.1.js to pazpar2/js/pz2.js
[mkws-moved-to-github.git] / examples / htdocs / dict.html
1 \r
2 <html>\r
3   <head>\r
4     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
5     <title>A-group silly demo</title>\r
6     <script type="text/javascript">\r
7       var mkws_config = {\r
8             //responsive_design_width: 990\r
9             //perpage_default: 10,\r
10             service_proxy_auth: "http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=dic&password=dic"\r
11         };\r
12     </script>\r
13     <link rel="stylesheet" type="text/css" href="http://mkws.indexdata.com/mkws.css" />\r
14     <script src="http://mkws.indexdata.com/mkws-complete.js"></script>\r
15   </head>\r
16   <body>\r
17 \r
18   <table height="100%" width="100%">\r
19   <tr valign="top" height="100%">\r
20     <td width="60%" valign="top">\r
21 \r
22     <h1>MKWS: the MasterKey Widget Set</h1>\r
23     <p>\r
24       This site contains tools, not content:\r
25     </p>\r
26     <ul>\r
27       <li>\r
28         <a href="mkws.js">mkws.js</a>\r
29         --\r
30         JavaScript code that powers the MasterKey Widget Set\r
31       </li>\r
32       <li>\r
33         <a href="/pazpar2/js/pz2.js">/pazpar2/js/pz2.js</a>\r
34         --\r
35         Low-level JavaScript library for access to the MasterKey web\r
36         service.\r
37       </li>\r
38       <li>\r
39         <a href="mkws-complete.js"\r
40                 >mkws-complete.js</a>\r
41         --\r
42         A single large JavaScript file containing everything needed for\r
43         MKWS to work: the widget-set itself, the API library, and any\r
44         additional prerequisites such as jQuery.\r
45       </li>\r
46       <li>\r
47         <a href="mkws.css">mkws.css</a>\r
48         --\r
49         A stylesheet which styles only MasterKey widgets, and does not\r
50         otherwise interfere with application-site's styles.\r
51     <!--\r
52         <p style="color:darkred">\r
53           Note. This is not yet quite true: the stylesheet needs tweaking\r
54           to make it more specific to only the MKWS components. At present\r
55           it spills over into styling parts of the containing site, too.\r
56         </p>\r
57     -->\r
58       </li>\r
59     </ul>\r
60     <p>\r
61       For examples of how to use the widget-set, see:\r
62     </p>\r
63     <ul>\r
64       <li>\r
65         A very simple application at\r
66         <a href="http://example.indexdata.com/"\r
67                 >http://example.indexdata.com/</a>.\r
68         It's worth viewing the source to see how small it is.\r
69       </li>\r
70       <li>\r
71         <a href="http://example.indexdata.com/index-full.html"\r
72            >A more detailed version</a>\r
73         that contains a configuration structure instead of accepting\r
74         the defaults. Includes a custom translation option to present\r
75         the application in Arabic.\r
76       </li>\r
77       <li>\r
78         The\r
79         <a href="http://example.indexdata.com/index-jquery.html"\r
80            >jQuery plugin</a>\r
81         version, consisting of a single line of JavaScript code.\r
82       </li>\r
83       <li>\r
84         An application that\r
85         <a href="http://example.indexdata.com/index-lowlevel.html"\r
86            >uses lower-level MKWS components</a>\r
87         rather than the all-in-one <tt>#mkwsResults</tt> division,\r
88         allowing it to use a rather different layout.\r
89       </li>\r
90       <li>\r
91         <a href="http://example.indexdata.com/index-mobile.html"\r
92            >A version suitable for mobile devices</a>,\r
93         with a responsive design that moves components around\r
94         depending on the screen size.\r
95       </li>\r
96       <li>\r
97         <a href="http://example.indexdata.com/index-popup.html"\r
98            >A version that uses a jQuery popup</a>.\r
99       </li>\r
100       <li>\r
101         An existing web-site,\r
102         <a href="http://sagp.miketaylor.org.uk/"\r
103            >The Self-Appointed Grammar Police</a>,\r
104         which has been fitted with an MKWS searching widget.\r
105         (See also the MKWS-widget customisations in\r
106         <a href="http://sagp.miketaylor.org.uk/style.css"\r
107            >that site's stylesheet</a>.)\r
108       </li>\r
109       <li>\r
110         Another existing web-site,\r
111         <a href="http://zthes.z3950.org/"\r
112            >The Zthes specifications</a>,\r
113         which has been fitted with a popup MKWS search-box.\r
114       </li>\r
115     </ul>\r
116     <p>\r
117       The set of targets can be maintained:\r
118     </p>\r
119     <ul>\r
120       <li>\r
121         Use the main\r
122         <a href="http://mk2.indexdata.com/console/"\r
123            >MasterKey Admin Console</a>,\r
124         and act as the "MK Demo" library administrator.\r
125       </li>\r
126     </ul>\r
127     <p>\r
128       Documentation:\r
129     </p>\r
130     <ul>\r
131       <li>\r
132         The <a href="whitepaper.html">The whitepaper, including a reference section.</a>\r
133       </li>\r
134       <li>\r
135         The <a href="README.html">README.html</a>\r
136       </li>\r
137       <li>\r
138         The <a href="html-structure.txt"\r
139                >structure of the HTML generated by the MKWS widgets</a>,\r
140         which can be used to guide the customisation of its CSS styles.\r
141       </li>\r
142     </ul>\r
143   </td>\r
144   <td width="40%" align="top">\r
145         <div id="mkwsSearch"></div>\r
146         <div id="mkwsRecords"></div>\r
147         <div id="mkwsPager"></div>\r
148   </td>\r
149   </tr>\r
150   </table>\r
151     <script type="text/javascript">\r
152       $("#mkwsSearch").hide();\r
153       $("#mkwsPager").hide();\r
154 \r
155       document.onclick = clickfunc;\r
156       var selectedtext="";\r
157       var clicking = false;\r
158       function clickfunc(e) {\r
159         var sel = window.getSelection();\r
160         //console.log("click: " + sel + "  clicking=" + clicking );\r
161         if ( sel != "" && ! clicking ) {\r
162           clicking  = true;\r
163           $("input#mkwsQuery").val(sel);\r
164           //console.log("click: Set value " + sel + "  clicking=" + clicking );\r
165           $("input#mkwsButton").trigger("click");\r
166           clicking = false;\r
167         }\r
168       }\r
169     </script>\r
170   </body>\r
171 </html>\r