Mercurial > hg > digilib-old
annotate client/digitallibrary/greyskin/diginew.jsp @ 415:de7200c3a3e2
support for bird's eye view;
arrows for navigation
author | hertzhaft |
---|---|
date | Tue, 20 Dec 2005 17:33:39 +0100 |
parents | 395db075906d |
children | ec504da8f69a |
rev | line source |
---|---|
400 | 1 <%@ page language="java" %><%! |
2 // -- JSP init ------------- | |
3 | |
4 // create DocumentBean instance for all JSP requests | |
5 digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); | |
6 | |
7 // initialize DocumentBean instance in JSP init | |
8 public void jspInit() { | |
9 try { | |
10 // set servlet init-parameter | |
11 docBean.setConfig(getServletConfig()); | |
12 } catch (javax.servlet.ServletException e) { | |
13 System.out.println(e); | |
14 } | |
15 } | |
16 // -- end of JSP init ------------- | |
17 %> | |
18 | |
19 <% | |
20 // -- JSP request ------------- | |
21 | |
22 // parsing the query | |
23 // ----------------- | |
24 digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request); | |
25 docBean.setRequest(dlRequest); | |
26 // check if authentication is needed and redirect if necessary | |
27 docBean.doAuthentication(response); | |
28 // add number of pages | |
29 dlRequest.setValue("pt", docBean.getNumPages()); | |
30 // store objects for jsp:include | |
31 pageContext.setAttribute("docBean", docBean, pageContext.REQUEST_SCOPE); | |
32 %> | |
33 | |
34 <html> | |
35 | |
36 <head> | |
37 <title>Digital Document Library NG</title> | |
38 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
39 <link rel="stylesheet" type="text/css" href="diginew.css" /> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
40 |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
41 <script type="text/javascript" src="debug.js"></script> |
400 | 42 |
43 <script type="text/javascript" src="baselib.js"></script> | |
44 | |
45 <script type="text/javascript" src="dllib.js"></script> | |
46 | |
47 <script language="JavaScript"> | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
48 |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
49 var isOptionDivVisible = false; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
50 var isAboutDivVisible = false; |
415 | 51 var isBirdDivVisible = false; |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
52 var dlTarget = window.name; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
53 var baseUrl = '<%= dlRequest.getAsString("base.url") %>'; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
54 var toolbarEnabledURL = window.location.href; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
55 var timeOut; |
400 | 56 |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
57 function toggleOptionDiv() { |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
58 isOptionDivVisible = !isOptionDivVisible; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
59 showOptions(isOptionDivVisible); |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
60 } |
400 | 61 |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
62 function toggleAboutDiv() { |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
63 isAboutDivVisible = !isAboutDivVisible; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
64 showAboutDiv(isAboutDivVisible); |
400 | 65 } |
66 | |
415 | 67 function toggleBirdDiv() { |
68 isBirdDivVisible = !isBirdDivVisible; | |
69 showBirdDiv(isBirdDivVisible); | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
70 } |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
71 |
415 | 72 // replace img src and display "on" status |
73 function setOnImage(id, src) { | |
74 var elem = getElement(id); | |
75 elem.src = src; | |
76 elem.title += ": on"; | |
77 } | |
78 | |
79 // change icons if image functions are on | |
80 function reflectImageStatus() { | |
81 if (hasFlag("hmir")) setOnImage("hmir", "mirror-horizontal-on.png"); | |
82 if (hasFlag("vmir")) setOnImage("vmir", "mirror-vertical-on.png"); | |
83 if (hasParameter("brgt")) setOnImage("brgt", "brightness-on.png"); | |
84 if (hasParameter("cont")) setOnImage("cont", "contrast-on.png"); | |
85 if (hasParameter("rot")) setOnImage("rot", "rotate-on.png"); | |
86 if (hasParameter("rgb")) setOnImage("rgb", "rgb-on.png"); | |
87 } | |
88 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
89 // initialize image; called by body.onload |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
90 function onBodyLoaded() { |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
91 document.id = 'digilib'; |
415 | 92 initParameters(); // load default values and detail |
400 | 93 dl_param_init(); // parse parameter values |
415 | 94 loadScalerImage(); // ruft auch dl_init() / initScaler auf |
95 loadBirdImage(); // lädt das Bird's Eye Bild | |
96 reflectImageStatus(); // adjust icons | |
97 showArrows(); | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
98 } |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
99 |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
100 // base_init(); // now done on loading baselib.js |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
101 |
400 | 102 </script> |
103 </head> | |
104 | |
105 <body onload="onBodyLoaded();"> | |
106 | |
107 <!-- slot for the scaled image --> | |
108 <div id="scaler-table"> | |
415 | 109 <div id="scaler"> |
400 | 110 <img id="pic"></img> |
111 </div> | |
112 </div> | |
113 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
114 <!-- sensitive overlay for zoom area etc --> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
115 <div id="overlay"> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
116 </div> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
117 |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
118 <!-- the zoom area selection rectangle --> |
400 | 119 <div id="zoom"> |
120 </div> | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
121 |
415 | 122 <!-- the bird's eye overview image --> |
123 <img id="bird-image"></img> | |
124 | |
125 <!-- the bird's eye select area --> | |
126 <div id="bird-area"> | |
127 </div> | |
128 | |
129 <!-- the arrows --> | |
130 <a class="arrow" id="up" href="javascript:moveBy(0, -0.5)"></a> | |
131 <a class="arrow" id="down" href="javascript:moveBy(0, 0.5)"></a> | |
132 <a class="arrow" id="left" href="javascript:moveBy(-0.5, 0)"></a> | |
133 <a class="arrow" id="right" href="javascript:moveBy(0.5, 0)"></a> | |
134 | |
135 <!-- the about window --> | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
136 <div id="about" class="about" onclick="toggleAboutDiv()"> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
137 <p>Digilib Graphic Viewer</p> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
138 <a href="http://digilib.berlios.de" target="_blank" > |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
139 <img class="logo" src="../img/digilib-logo-text1.png" title="digilib"></img> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
140 </a> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
141 <p id="digilib-version"></p> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
142 <p id="baselib-version"></p> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
143 <p id="dllib-version"></p> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
144 </div> |
400 | 145 |
146 | |
147 <div id="buttons"> | |
148 <div class="button"> | |
149 <a | |
150 class="icon" | |
151 href="javascript:getRefWin()" | |
152 > | |
153 | |
154 <img | |
155 class="png" | |
156 id="reference" | |
157 title="get a reference URL" | |
158 src="reference.png" | |
159 > | |
160 </a> | |
161 </div> | |
162 | |
163 <div class="button"> | |
164 <a | |
165 class="icon" | |
166 href="javascript:zoomBy(1.4)" | |
167 > | |
168 | |
169 <img | |
170 class="png" | |
171 id="zoom-in" | |
172 title="zoom in" | |
173 src="zoom-in.png" | |
174 > | |
175 </a> | |
176 </div> | |
177 | |
178 <div class="button"> | |
179 <a | |
180 class="icon" | |
181 href="javascript:zoomBy(0.7)" | |
182 > | |
183 | |
184 <img | |
185 class="png" | |
186 id="zoom-out" | |
187 title="zoom out" | |
188 src="zoom-out.png" | |
189 > | |
190 </a> | |
191 </div> | |
192 | |
193 <div class="button"> | |
194 <a | |
195 class="icon" | |
401 | 196 href="javascript:zoomArea()" |
400 | 197 > |
198 | |
199 <img | |
200 class="png" | |
201 id="zoom-area" | |
202 title="zoom area" | |
203 src="zoom-area.png" | |
204 > | |
205 </a> | |
206 </div> | |
207 | |
208 <div class="button"> | |
209 <a | |
210 class="icon" | |
211 href="javascript:zoomFullpage()" | |
212 > | |
213 | |
214 <img | |
215 class="png" | |
216 id="zoom-full" | |
217 title="view the whole image" | |
218 src="zoom-full.png" | |
219 > | |
220 </a> | |
221 </div> | |
222 | |
223 <div class="button"> | |
224 <a | |
225 class="icon" | |
226 href="javascript:gotoPage('-1')" | |
227 > | |
228 | |
229 <img | |
230 class="png" | |
231 id="back" | |
232 title="goto previous image" | |
233 src="back.png" | |
234 > | |
235 </a> | |
236 </div> | |
237 | |
238 <div class="button"> | |
239 <a | |
240 class="icon" | |
241 href="javascript:gotoPage('+1')" | |
242 > | |
243 | |
244 <img | |
245 class="png" | |
246 id="fwd" | |
247 title="goto next image" | |
248 src="fwd.png" | |
249 > | |
250 </a> | |
251 </div> | |
252 | |
253 <div class="button"> | |
254 <a | |
255 class="icon" | |
415 | 256 href="javascript:toggleBirdDiv()" |
257 > | |
258 | |
259 <img | |
260 class="png" | |
261 id="bird" | |
262 title="show bird's eye view" | |
263 src="birds-eye.png" | |
264 > | |
265 </a> | |
266 </div> | |
267 | |
268 <div class="button"> | |
269 <a | |
270 class="icon" | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
271 href="javascript:toggleAboutDiv()" |
400 | 272 > |
273 | |
274 <img | |
275 class="png" | |
276 id="help" | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
277 title="about Digilib" |
400 | 278 src="help.png" |
279 > | |
280 </a> | |
281 </div> | |
282 | |
283 <div class="button"> | |
284 <a | |
285 class="icon" | |
286 href="javascript:toggleOptionDiv()" | |
287 > | |
288 | |
289 <img | |
290 class="png" | |
291 id="options" | |
292 title="more options" | |
293 src="options.png" | |
294 > | |
295 </a> | |
296 </div> | |
297 | |
298 </div> | |
299 | |
300 <!-- options div --> | |
301 | |
302 <div id="dloptions"> | |
303 <div class="button"> | |
304 <a | |
305 class="icon" | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
306 href="javascript:setMark();" |
400 | 307 > |
308 | |
309 <img | |
310 class="png" | |
311 id="mark" | |
312 title="set a mark" | |
313 src="mark.png" | |
314 > | |
315 </a> | |
316 </div> | |
317 | |
318 <div class="button"> | |
319 <a | |
320 class="icon" | |
321 href="javascript:removeMark()" | |
322 > | |
323 | |
324 <img | |
325 class="png" | |
326 id="delmark" | |
327 title="delete the last mark" | |
328 src="delmark.png" | |
329 > | |
330 </a> | |
331 </div> | |
332 | |
333 <div class="button"> | |
334 <a | |
335 class="icon" | |
336 href="javascript:mirror('h')" | |
337 > | |
338 | |
339 <img | |
340 class="png" | |
415 | 341 id="hmir" |
400 | 342 title="mirror horizontally" |
343 src="mirror-horizontal.png" | |
344 > | |
345 </a> | |
346 </div> | |
347 | |
348 <div class="button"> | |
349 <a | |
350 class="icon" | |
351 href="javascript:mirror('v')" | |
352 > | |
353 | |
354 <img | |
355 class="png" | |
415 | 356 id="vmir" |
400 | 357 title="mirror vertically" |
358 src="mirror-vertical.png" | |
359 > | |
360 </a> | |
361 </div> | |
362 | |
363 <div class="button"> | |
364 <a | |
365 class="icon" | |
366 href="javascript:setParamWin('rot', 'Rotate (0..360) clockwise')" | |
367 > | |
368 | |
369 <img | |
370 class="png" | |
415 | 371 id="rot" |
400 | 372 title="rotate image" |
373 src="rotate.png" | |
374 > | |
375 </a> | |
376 </div> | |
377 | |
378 <div class="button"> | |
379 <a | |
380 class="icon" | |
381 href="javascript:setParamWin('brgt', 'Brightness (-255..255)')" | |
382 > | |
383 | |
384 <img | |
385 class="png" | |
415 | 386 id="brgt" |
400 | 387 title="set brightness" |
388 src="brightness.png" | |
389 > | |
390 </a> | |
391 </div> | |
392 | |
393 <div class="button"> | |
394 <a | |
395 class="icon" | |
396 href="javascript:setParamWin('cont', 'Contrast (0..8)')" | |
397 > | |
398 | |
399 <img | |
400 class="png" | |
415 | 401 id="cont" |
400 | 402 title="set contrast" |
403 src="contrast.png" | |
404 > | |
405 </a> | |
406 </div> | |
407 | |
408 <div class="button"> | |
409 <a | |
410 class="icon" | |
411 href="javascript:setParamWin('rgb', '...')" | |
412 > | |
413 | |
414 <img | |
415 class="png" | |
416 id="rgb" | |
417 title="set rgb values" | |
418 src="rgb.png" | |
419 > | |
420 </a> | |
421 </div> | |
422 | |
423 <div class="button"> | |
424 <a | |
425 class="icon" | |
426 href="javascript:setParamWin('size', '...')" | |
427 > | |
428 | |
429 <img | |
430 class="png" | |
431 id="size" | |
432 title="resize page" | |
433 src="size.png" | |
434 > | |
435 </a> | |
436 </div> | |
437 | |
438 <div class="button"> | |
439 <a | |
440 class="icon" | |
441 href="javascript:setQualityWin('Quality (0..2)')" | |
442 > | |
443 | |
444 <img | |
445 class="png" | |
446 id="quality" | |
447 title="set image quality" | |
448 src="quality.png" | |
449 > | |
450 </a> | |
451 </div> | |
452 | |
453 <div class="button"> | |
454 <a | |
455 class="icon" | |
456 href="javascript:gotoPageWin()" | |
457 > | |
458 | |
459 <img | |
460 class="png" | |
461 id="page" | |
462 title="specify image" | |
463 src="page.png" | |
464 > | |
465 </a> | |
466 </div> | |
467 | |
468 <div class="button"> | |
469 <a | |
470 class="icon" | |
471 href="javascript:pixelByPixel()" | |
472 > | |
473 | |
474 <img | |
475 class="png" | |
476 id="pixel-by-pixel" | |
477 title="view image pixel by pixel" | |
478 src="pixel-by-pixel.png" | |
479 > | |
480 </a> | |
481 </div> | |
482 | |
483 <div class="button"> | |
484 <a | |
485 class="icon" | |
486 href="javascript:originalSize()" | |
487 > | |
488 | |
489 <img | |
490 class="png" | |
491 id="original-size" | |
492 title="view image in original size" | |
493 src="original-size.png" | |
494 > | |
495 </a> | |
496 </div> | |
497 | |
498 <div class="button"> | |
499 <a | |
500 class="icon" | |
501 href="javascript:toggleOptionDiv()" | |
502 > | |
503 | |
504 <img | |
505 class="png" | |
506 id="options-1" | |
507 title="hide options" | |
508 src="options.png" | |
509 > | |
510 </a> | |
511 </div> | |
512 </div> | |
513 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
514 <div class="debug" id="debug"><p class="debug">Debug</p></div> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
515 |
400 | 516 </body> |
517 | |
518 </html> |