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