Mercurial > hg > digilib-old
annotate client/digitallibrary/greyskin/diginew.jsp @ 440:85aef29cc1da
sizes menu;
button separators;
switched off debug window
author | hertzhaft |
---|---|
date | Tue, 10 Jan 2006 16:48:28 +0100 |
parents | 65219f4fcf6b |
children | 089adc9e2a5f |
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 |
440 | 49 var jspVersion = "diginew.jsp 1.011"; |
434 | 50 var cookie = new Cookie(); |
51 // alert(strObject(cookie)); | |
52 | |
53 var isOptionDivVisible = cookie.getbool("isOptionDivVisible"); | |
54 var isBirdDivVisible = cookie.getbool("isBirdDivVisible"); | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
55 var isAboutDivVisible = false; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
56 var dlTarget = window.name; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
57 var baseUrl = '<%= dlRequest.getAsString("base.url") %>'; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
58 var toolbarEnabledURL = window.location.href; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
59 var timeOut; |
400 | 60 |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
61 function toggleOptionDiv() { |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
62 isOptionDivVisible = !isOptionDivVisible; |
434 | 63 cookie.addbool("isOptionDivVisible", isOptionDivVisible); |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
64 showOptions(isOptionDivVisible); |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
65 } |
400 | 66 |
434 | 67 function toggleBirdDiv() { |
68 isBirdDivVisible = !isBirdDivVisible; | |
69 cookie.addbool("isBirdDivVisible", isBirdDivVisible); | |
70 showBirdDiv(isBirdDivVisible); | |
71 } | |
72 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
73 function toggleAboutDiv() { |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
74 isAboutDivVisible = !isAboutDivVisible; |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
75 showAboutDiv(isAboutDivVisible); |
400 | 76 } |
77 | |
415 | 78 // replace img src and display "on" status |
79 function setOnImage(id, src) { | |
80 var elem = getElement(id); | |
81 elem.src = src; | |
82 elem.title += ": on"; | |
83 } | |
84 | |
85 // change icons if image functions are on | |
86 function reflectImageStatus() { | |
87 if (hasFlag("hmir")) setOnImage("hmir", "mirror-horizontal-on.png"); | |
88 if (hasFlag("vmir")) setOnImage("vmir", "mirror-vertical-on.png"); | |
89 if (hasParameter("brgt")) setOnImage("brgt", "brightness-on.png"); | |
90 if (hasParameter("cont")) setOnImage("cont", "contrast-on.png"); | |
91 if (hasParameter("rot")) setOnImage("rot", "rotate-on.png"); | |
92 if (hasParameter("rgb")) setOnImage("rgb", "rgb-on.png"); | |
93 } | |
94 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
95 // initialize image; called by body.onload |
434 | 96 function onBodyLoad() { |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
97 document.id = 'digilib'; |
415 | 98 initParameters(); // load default values and detail |
400 | 99 dl_param_init(); // parse parameter values |
415 | 100 loadScalerImage(); // ruft auch dl_init() / initScaler auf |
101 loadBirdImage(); // lädt das Bird's Eye Bild | |
102 reflectImageStatus(); // adjust icons | |
434 | 103 showOptions(isOptionDivVisible); |
104 showBirdDiv(isBirdDivVisible); | |
428 | 105 showArrows(); // show arrow overlays for zoom navigation |
434 | 106 moveCenter(true); // click to move point to center |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
107 } |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
108 |
434 | 109 function onBodyUnload() { |
110 // alert(strObject(cookie)); | |
111 cookie.store(); | |
112 } | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
113 // base_init(); // now done on loading baselib.js |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
114 |
400 | 115 </script> |
116 </head> | |
117 | |
434 | 118 <body onload="onBodyLoad();" onunload="onBodyUnload();"> |
400 | 119 |
120 <!-- slot for the scaled image --> | |
434 | 121 <div id="scaler"> |
122 <img id="pic"></img> | |
400 | 123 </div> |
124 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
125 <!-- sensitive overlay for zoom area etc --> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
126 <div id="overlay"> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
127 </div> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
128 |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
129 <!-- the zoom area selection rectangle --> |
400 | 130 <div id="zoom"> |
131 </div> | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
132 |
415 | 133 <!-- the bird's eye overview image --> |
134 <img id="bird-image"></img> | |
135 | |
136 <!-- the bird's eye select area --> | |
137 <div id="bird-area"> | |
138 </div> | |
434 | 139 |
415 | 140 <!-- the arrows --> |
141 <a class="arrow" id="up" href="javascript:moveBy(0, -0.5)"></a> | |
142 <a class="arrow" id="down" href="javascript:moveBy(0, 0.5)"></a> | |
143 <a class="arrow" id="left" href="javascript:moveBy(-0.5, 0)"></a> | |
144 <a class="arrow" id="right" href="javascript:moveBy(0.5, 0)"></a> | |
145 | |
146 <!-- the about window --> | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
147 <div id="about" class="about" onclick="toggleAboutDiv()"> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
148 <p>Digilib Graphic Viewer</p> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
149 <a href="http://digilib.berlios.de" target="_blank" > |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
150 <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
|
151 </a> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
152 <p id="digilib-version"></p> |
434 | 153 <p id="jsp-version"></p> |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
154 <p id="baselib-version"></p> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
155 <p id="dllib-version"></p> |
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
156 </div> |
400 | 157 |
434 | 158 <!-- the calibration div --> |
439 | 159 <div id="calibration"> |
160 <div> | |
161 <p>0 px</p> | |
162 <p class="cm">10 cm</p> | |
163 </div> | |
164 </div> | |
400 | 165 |
440 | 166 <!-- the size menu --> |
167 <div id="sizes"> | |
168 <p><a href="javascript:resize(1)">1</a></p> | |
169 <p><a href="javascript:resize(1.41)">1.41</a></p> | |
170 <p><a href="javascript:resize(2)">2</a></p> | |
171 <p><a href="javascript:resize(3)">3</a></p> | |
172 </div> | |
173 | |
439 | 174 <!-- the buttons --> |
400 | 175 <div id="buttons"> |
440 | 176 <div class="separator"> |
177 </div> | |
178 | |
400 | 179 <div class="button"> |
180 <a | |
181 class="icon" | |
440 | 182 href="javascript:getRefWin()" |
400 | 183 > |
184 | |
185 <img | |
186 class="png" | |
440 | 187 id="reference" |
188 title="get a reference URL" | |
189 src="reference.png" | |
400 | 190 > |
440 | 191 </a> |
400 | 192 </div> |
440 | 193 |
400 | 194 <div class="button"> |
195 <a | |
196 class="icon" | |
197 href="javascript:zoomBy(1.4)" | |
198 > | |
199 | |
200 <img | |
201 class="png" | |
202 id="zoom-in" | |
203 title="zoom in" | |
204 src="zoom-in.png" | |
205 > | |
206 </a> | |
207 </div> | |
208 | |
209 <div class="button"> | |
210 <a | |
211 class="icon" | |
212 href="javascript:zoomBy(0.7)" | |
213 > | |
214 | |
215 <img | |
216 class="png" | |
217 id="zoom-out" | |
218 title="zoom out" | |
219 src="zoom-out.png" | |
220 > | |
221 </a> | |
222 </div> | |
223 | |
224 <div class="button"> | |
225 <a | |
226 class="icon" | |
401 | 227 href="javascript:zoomArea()" |
400 | 228 > |
229 | |
230 <img | |
231 class="png" | |
232 id="zoom-area" | |
233 title="zoom area" | |
234 src="zoom-area.png" | |
235 > | |
236 </a> | |
237 </div> | |
238 | |
239 <div class="button"> | |
240 <a | |
241 class="icon" | |
242 href="javascript:zoomFullpage()" | |
243 > | |
244 | |
245 <img | |
246 class="png" | |
247 id="zoom-full" | |
248 title="view the whole image" | |
249 src="zoom-full.png" | |
250 > | |
251 </a> | |
252 </div> | |
253 | |
254 <div class="button"> | |
255 <a | |
256 class="icon" | |
439 | 257 href="javascript:pageWidth()" |
258 > | |
259 | |
260 <img | |
261 class="png" | |
262 id="page-width" | |
263 title="page width" | |
264 src="pagewidth.png" | |
265 > | |
266 </a> | |
267 </div> | |
268 | |
269 <div class="button"> | |
270 <a | |
271 class="icon" | |
440 | 272 href="javascript:sizeMenu()" |
273 > | |
274 | |
275 <img | |
276 class="png" | |
277 id="size" | |
278 title="resize page" | |
279 src="size.png" | |
280 > | |
281 </a> | |
282 </div> | |
283 | |
284 <div class="button"> | |
285 <a | |
286 class="icon" | |
400 | 287 href="javascript:gotoPage('-1')" |
288 > | |
289 | |
290 <img | |
291 class="png" | |
292 id="back" | |
293 title="goto previous image" | |
294 src="back.png" | |
295 > | |
296 </a> | |
297 </div> | |
298 | |
299 <div class="button"> | |
300 <a | |
301 class="icon" | |
302 href="javascript:gotoPage('+1')" | |
303 > | |
304 | |
305 <img | |
306 class="png" | |
307 id="fwd" | |
308 title="goto next image" | |
309 src="fwd.png" | |
310 > | |
311 </a> | |
312 </div> | |
313 | |
314 <div class="button"> | |
315 <a | |
316 class="icon" | |
434 | 317 href="javascript:gotoPageWin()" |
318 > | |
319 | |
320 <img | |
321 class="png" | |
322 id="page" | |
323 title="specify image" | |
324 src="page.png" | |
325 > | |
326 </a> | |
327 </div> | |
328 | |
329 <div class="button"> | |
330 <a | |
331 class="icon" | |
440 | 332 href="javascript:toggleBirdDiv()" |
415 | 333 > |
334 | |
335 <img | |
336 class="png" | |
440 | 337 id="bird" |
338 title="show bird's eye view" | |
339 src="birds-eye.png" | |
415 | 340 > |
440 | 341 </a> |
415 | 342 </div> |
439 | 343 |
440 | 344 <div class="separator"> |
345 </div> | |
346 | |
415 | 347 <div class="button"> |
348 <a | |
349 class="icon" | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
350 href="javascript:toggleAboutDiv()" |
400 | 351 > |
352 | |
353 <img | |
354 class="png" | |
355 id="help" | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
356 title="about Digilib" |
400 | 357 src="help.png" |
358 > | |
359 </a> | |
360 </div> | |
361 | |
362 <div class="button"> | |
363 <a | |
364 class="icon" | |
365 href="javascript:toggleOptionDiv()" | |
366 > | |
367 | |
368 <img | |
369 class="png" | |
370 id="options" | |
371 title="more options" | |
372 src="options.png" | |
373 > | |
374 </a> | |
375 </div> | |
376 | |
440 | 377 <div class="separator"> |
378 </div> | |
400 | 379 </div> |
380 | |
381 <!-- options div --> | |
382 | |
383 <div id="dloptions"> | |
440 | 384 <div class="separator"> |
385 </div> | |
386 | |
400 | 387 <div class="button"> |
388 <a | |
389 class="icon" | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
390 href="javascript:setMark();" |
400 | 391 > |
392 | |
393 <img | |
394 class="png" | |
395 id="mark" | |
396 title="set a mark" | |
397 src="mark.png" | |
398 > | |
399 </a> | |
400 </div> | |
401 | |
402 <div class="button"> | |
403 <a | |
404 class="icon" | |
405 href="javascript:removeMark()" | |
406 > | |
407 | |
408 <img | |
409 class="png" | |
410 id="delmark" | |
411 title="delete the last mark" | |
412 src="delmark.png" | |
413 > | |
414 </a> | |
415 </div> | |
416 | |
417 <div class="button"> | |
418 <a | |
419 class="icon" | |
420 href="javascript:mirror('h')" | |
421 > | |
422 | |
423 <img | |
424 class="png" | |
415 | 425 id="hmir" |
400 | 426 title="mirror horizontally" |
427 src="mirror-horizontal.png" | |
428 > | |
429 </a> | |
430 </div> | |
431 | |
432 <div class="button"> | |
433 <a | |
434 class="icon" | |
435 href="javascript:mirror('v')" | |
436 > | |
437 | |
438 <img | |
439 class="png" | |
415 | 440 id="vmir" |
400 | 441 title="mirror vertically" |
442 src="mirror-vertical.png" | |
443 > | |
444 </a> | |
445 </div> | |
446 | |
447 <div class="button"> | |
448 <a | |
449 class="icon" | |
450 href="javascript:setParamWin('rot', 'Rotate (0..360) clockwise')" | |
451 > | |
452 | |
453 <img | |
454 class="png" | |
415 | 455 id="rot" |
400 | 456 title="rotate image" |
457 src="rotate.png" | |
458 > | |
459 </a> | |
460 </div> | |
461 | |
462 <div class="button"> | |
463 <a | |
464 class="icon" | |
465 href="javascript:setParamWin('brgt', 'Brightness (-255..255)')" | |
466 > | |
467 | |
468 <img | |
469 class="png" | |
415 | 470 id="brgt" |
400 | 471 title="set brightness" |
472 src="brightness.png" | |
473 > | |
474 </a> | |
475 </div> | |
476 | |
477 <div class="button"> | |
478 <a | |
479 class="icon" | |
480 href="javascript:setParamWin('cont', 'Contrast (0..8)')" | |
481 > | |
482 | |
483 <img | |
484 class="png" | |
415 | 485 id="cont" |
400 | 486 title="set contrast" |
487 src="contrast.png" | |
488 > | |
489 </a> | |
490 </div> | |
491 | |
492 <div class="button"> | |
493 <a | |
494 class="icon" | |
495 href="javascript:setParamWin('rgb', '...')" | |
496 > | |
497 | |
498 <img | |
499 class="png" | |
500 id="rgb" | |
501 title="set rgb values" | |
502 src="rgb.png" | |
503 > | |
504 </a> | |
505 </div> | |
506 | |
507 <div class="button"> | |
508 <a | |
509 class="icon" | |
510 href="javascript:setQualityWin('Quality (0..2)')" | |
511 > | |
512 | |
513 <img | |
514 class="png" | |
515 id="quality" | |
516 title="set image quality" | |
517 src="quality.png" | |
518 > | |
519 </a> | |
520 </div> | |
521 | |
522 <div class="button"> | |
523 <a | |
524 class="icon" | |
434 | 525 href="javascript:calibrate('x')" |
400 | 526 > |
527 | |
528 <img | |
529 class="png" | |
434 | 530 id="calibration-x" |
531 title="calibrate screen x-ratio" | |
532 src="calibration-x.png" | |
400 | 533 > |
434 | 534 </a> |
400 | 535 </div> |
434 | 536 |
537 <div class="button"> | |
538 <a | |
539 class="icon" | |
540 href="javascript:calibrate('y')" | |
541 > | |
542 | |
543 <img | |
544 class="png" | |
545 id="calibration-y" | |
546 title="calibrate screen y-ratio" | |
547 src="calibration-y.png" | |
548 > | |
549 </a> | |
550 </div> | |
551 | |
400 | 552 <div class="button"> |
553 <a | |
554 class="icon" | |
555 href="javascript:pixelByPixel()" | |
556 > | |
557 | |
558 <img | |
559 class="png" | |
560 id="pixel-by-pixel" | |
561 title="view image pixel by pixel" | |
562 src="pixel-by-pixel.png" | |
563 > | |
564 </a> | |
565 </div> | |
566 | |
567 <div class="button"> | |
568 <a | |
569 class="icon" | |
570 href="javascript:originalSize()" | |
571 > | |
572 | |
573 <img | |
574 class="png" | |
575 id="original-size" | |
576 title="view image in original size" | |
577 src="original-size.png" | |
578 > | |
579 </a> | |
580 </div> | |
581 | |
440 | 582 <div class="separator"> |
583 </div> | |
584 | |
400 | 585 <div class="button"> |
586 <a | |
587 class="icon" | |
588 href="javascript:toggleOptionDiv()" | |
589 > | |
590 | |
591 <img | |
592 class="png" | |
593 id="options-1" | |
594 title="hide options" | |
595 src="options.png" | |
596 > | |
597 </a> | |
598 </div> | |
440 | 599 |
600 <div class="separator"> | |
601 </div> | |
602 | |
400 | 603 </div> |
604 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
605 <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
|
606 |
400 | 607 </body> |
608 | |
609 </html> |