annotate webapp/doc/old/digilib_interop.html @ 1158:2ee261676828 default tip

better out-of-the box experience: * digilib works without config files using sensible defaults * new sample images folder used by default * config files moved to templates
author robcast
date Tue, 19 Feb 2013 17:32:25 +0100
parents a00114a0c957
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
326
665f2f4559d0 new doc
robcast
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
665f2f4559d0 new doc
robcast
parents:
diff changeset
2 <html>
665f2f4559d0 new doc
robcast
parents:
diff changeset
3 <head>
665f2f4559d0 new doc
robcast
parents:
diff changeset
4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
665f2f4559d0 new doc
robcast
parents:
diff changeset
5 <title>digilib toolbar interoperability</title>
665f2f4559d0 new doc
robcast
parents:
diff changeset
6 </head>
665f2f4559d0 new doc
robcast
parents:
diff changeset
7 <body>
665f2f4559d0 new doc
robcast
parents:
diff changeset
8 <h1>Interoperability of digilib HTML pages with the Alcatraz toolbar</h1>
665f2f4559d0 new doc
robcast
parents:
diff changeset
9
665f2f4559d0 new doc
robcast
parents:
diff changeset
10 <p>A toolbar-friendly digilib page must define a Javascript variable
665f2f4559d0 new doc
robcast
parents:
diff changeset
11 <b><code>toolbarEnabledURL</code></b> whose value is a HTTP URL that
665f2f4559d0 new doc
robcast
parents:
diff changeset
12 produces a <em>toolbar-enabled</em> page. The toolbar should present a
665f2f4559d0 new doc
robcast
parents:
diff changeset
13 button to &quot;take over&quot; the page design by replacing
665f2f4559d0 new doc
robcast
parents:
diff changeset
14 the current page with the page from the given URL.</p>
665f2f4559d0 new doc
robcast
parents:
diff changeset
15
665f2f4559d0 new doc
robcast
parents:
diff changeset
16 <h2>Toolbar-enabled page</h2>
665f2f4559d0 new doc
robcast
parents:
diff changeset
17
665f2f4559d0 new doc
robcast
parents:
diff changeset
18 <p>A <em>toolbar-enabled</em> page must offer the following Javascript functions:</p>
665f2f4559d0 new doc
robcast
parents:
diff changeset
19
665f2f4559d0 new doc
robcast
parents:
diff changeset
20 <h3>Identification</h3>
665f2f4559d0 new doc
robcast
parents:
diff changeset
21
665f2f4559d0 new doc
robcast
parents:
diff changeset
22 <ul>
665f2f4559d0 new doc
robcast
parents:
diff changeset
23 <li><b><code>dlScriptVersion</code></b>: a String variable that contains the version number of the Javascript code (e.g. &quot;1.12b3&quot;)<br>
665f2f4559d0 new doc
robcast
parents:
diff changeset
24 The existence of this variable can be used to test for a <em>toolbar-enabled</em> page</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
25 </ul>
665f2f4559d0 new doc
robcast
parents:
diff changeset
26
665f2f4559d0 new doc
robcast
parents:
diff changeset
27 <h3>Interactive operations</h3>
665f2f4559d0 new doc
robcast
parents:
diff changeset
28
665f2f4559d0 new doc
robcast
parents:
diff changeset
29 <ul>
665f2f4559d0 new doc
robcast
parents:
diff changeset
30 <li><b><code>setMark()</code></b>: lets the user click and sets a mark at the clicked location</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
31 <li><b><code>zoomArea()</code></b>: lets the user click to select an area and zooms to the selected area</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
32 <li><b><code>moveCenter()</code></b>: lets the user click and recenters the image around the clicked location</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
33 </ul>
665f2f4559d0 new doc
robcast
parents:
diff changeset
34
665f2f4559d0 new doc
robcast
parents:
diff changeset
35 <h3>Page operations</h3>
665f2f4559d0 new doc
robcast
parents:
diff changeset
36
665f2f4559d0 new doc
robcast
parents:
diff changeset
37 <ul>
665f2f4559d0 new doc
robcast
parents:
diff changeset
38 <li><b><code>getRef()</code></b>: returns a String with a URL reference to the current document</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
39 <li><b><code>removeMark()</code></b>: removes the last mark</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
40 <li><b><code>zoomBy(float factor)</code></b>: magnifies the image by the given factor around the current center</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
41 <li><b><code>zoomFullpage()</code></b>: zooms out so that the whole image is visible</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
42 <li><b><code>display(int prio)</code></b>: reloads the page with the current parameters</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
43 </ul>
665f2f4559d0 new doc
robcast
parents:
diff changeset
44
665f2f4559d0 new doc
robcast
parents:
diff changeset
45 <h3>Parameter operations</h3>
665f2f4559d0 new doc
robcast
parents:
diff changeset
46
665f2f4559d0 new doc
robcast
parents:
diff changeset
47 <ul>
665f2f4559d0 new doc
robcast
parents:
diff changeset
48 <li><b><code>newParameter(String name, String defaultValue, int prio)</code></b>: declares a new parameter with name, default value (can be of any type) and priority</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
49 <li><b><code>getParameter(String name)</code></b>: returns the value of the parameter with the name <code>name</code></li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
50 <li><b><code>setParameter(String name, String value)</code></b>: sets the value of the named parameter (value can be of any type)</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
51 <li><b><code>getAllParameters(int prio)</code></b>: returns a String of all parameters in HTTP request format (name=value) below the given priority</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
52 <li><b><code>addMark(Position pos)</code></b>: adds a mark with the given Position</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
53 <li><b><code>deleteMark()</code></b>: removes the last mark form the list</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
54 <li><b><code>getAllMarks()</code></b>: returns a String with all current marks in digilib format (for parameter &quot;mk&quot;)</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
55 <li><b><code>addFlag(String name)</code></b>: adds a digilib mode flag with the given name</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
56 <li><b><code>hasFlag(String name)</code></b>: returns if the given flag is currently set</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
57 <li><b><code>removeFlag(String name)</code></b>: removes the given flag</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
58 <li><b><code>toggleFlag(String name)</code></b>: toggles the given flag</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
59 <li><b><code>getAllFlags()</code></b>: returns a String with all current flags in digilib format (for parameter &quot;mo&quot;)</li>
665f2f4559d0 new doc
robcast
parents:
diff changeset
60 </ul>
665f2f4559d0 new doc
robcast
parents:
diff changeset
61
665f2f4559d0 new doc
robcast
parents:
diff changeset
62 </body>
665f2f4559d0 new doc
robcast
parents:
diff changeset
63 </html>