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