Mercurial > hg > digilib-old
annotate client/digitallibrary/greyskin/diginew.jsp @ 439:65219f4fcf6b
added osize and pixel-by-pixel;
reordered buttons;
author | hertzhaft |
---|---|
date | Tue, 10 Jan 2006 12:28:57 +0100 |
parents | 4eeabb5ed193 |
children | 85aef29cc1da |
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 |
434 | 49 var jspVersion = "diginew.jsp 1.009"; |
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 |
439 | 166 <!-- the buttons --> |
400 | 167 <div id="buttons"> |
168 <div class="button"> | |
169 <a | |
170 class="icon" | |
439 | 171 href="javascript:toggleBirdDiv()" |
400 | 172 > |
173 | |
174 <img | |
175 class="png" | |
439 | 176 id="bird" |
177 title="show bird's eye view" | |
178 src="birds-eye.png" | |
400 | 179 > |
439 | 180 </a> |
400 | 181 </div> |
439 | 182 |
400 | 183 <div class="button"> |
184 <a | |
185 class="icon" | |
186 href="javascript:zoomBy(1.4)" | |
187 > | |
188 | |
189 <img | |
190 class="png" | |
191 id="zoom-in" | |
192 title="zoom in" | |
193 src="zoom-in.png" | |
194 > | |
195 </a> | |
196 </div> | |
197 | |
198 <div class="button"> | |
199 <a | |
200 class="icon" | |
201 href="javascript:zoomBy(0.7)" | |
202 > | |
203 | |
204 <img | |
205 class="png" | |
206 id="zoom-out" | |
207 title="zoom out" | |
208 src="zoom-out.png" | |
209 > | |
210 </a> | |
211 </div> | |
212 | |
213 <div class="button"> | |
214 <a | |
215 class="icon" | |
401 | 216 href="javascript:zoomArea()" |
400 | 217 > |
218 | |
219 <img | |
220 class="png" | |
221 id="zoom-area" | |
222 title="zoom area" | |
223 src="zoom-area.png" | |
224 > | |
225 </a> | |
226 </div> | |
227 | |
228 <div class="button"> | |
229 <a | |
230 class="icon" | |
231 href="javascript:zoomFullpage()" | |
232 > | |
233 | |
234 <img | |
235 class="png" | |
236 id="zoom-full" | |
237 title="view the whole image" | |
238 src="zoom-full.png" | |
239 > | |
240 </a> | |
241 </div> | |
242 | |
243 <div class="button"> | |
244 <a | |
245 class="icon" | |
439 | 246 href="javascript:pageWidth()" |
247 > | |
248 | |
249 <img | |
250 class="png" | |
251 id="page-width" | |
252 title="page width" | |
253 src="pagewidth.png" | |
254 > | |
255 </a> | |
256 </div> | |
257 | |
258 <div class="button"> | |
259 <a | |
260 class="icon" | |
400 | 261 href="javascript:gotoPage('-1')" |
262 > | |
263 | |
264 <img | |
265 class="png" | |
266 id="back" | |
267 title="goto previous image" | |
268 src="back.png" | |
269 > | |
270 </a> | |
271 </div> | |
272 | |
273 <div class="button"> | |
274 <a | |
275 class="icon" | |
276 href="javascript:gotoPage('+1')" | |
277 > | |
278 | |
279 <img | |
280 class="png" | |
281 id="fwd" | |
282 title="goto next image" | |
283 src="fwd.png" | |
284 > | |
285 </a> | |
286 </div> | |
287 | |
288 <div class="button"> | |
289 <a | |
290 class="icon" | |
434 | 291 href="javascript:gotoPageWin()" |
292 > | |
293 | |
294 <img | |
295 class="png" | |
296 id="page" | |
297 title="specify image" | |
298 src="page.png" | |
299 > | |
300 </a> | |
301 </div> | |
302 | |
303 <div class="button"> | |
304 <a | |
305 class="icon" | |
439 | 306 href="javascript:getRefWin()" |
415 | 307 > |
308 | |
309 <img | |
310 class="png" | |
439 | 311 id="reference" |
312 title="get a reference URL" | |
313 src="reference.png" | |
415 | 314 > |
439 | 315 </a> |
415 | 316 </div> |
439 | 317 |
415 | 318 <div class="button"> |
319 <a | |
320 class="icon" | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
321 href="javascript:toggleAboutDiv()" |
400 | 322 > |
323 | |
324 <img | |
325 class="png" | |
326 id="help" | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
327 title="about Digilib" |
400 | 328 src="help.png" |
329 > | |
330 </a> | |
331 </div> | |
332 | |
333 <div class="button"> | |
334 <a | |
335 class="icon" | |
336 href="javascript:toggleOptionDiv()" | |
337 > | |
338 | |
339 <img | |
340 class="png" | |
341 id="options" | |
342 title="more options" | |
343 src="options.png" | |
344 > | |
345 </a> | |
346 </div> | |
347 | |
348 </div> | |
349 | |
350 <!-- options div --> | |
351 | |
352 <div id="dloptions"> | |
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:setMark();" |
400 | 357 > |
358 | |
359 <img | |
360 class="png" | |
361 id="mark" | |
362 title="set a mark" | |
363 src="mark.png" | |
364 > | |
365 </a> | |
366 </div> | |
367 | |
368 <div class="button"> | |
369 <a | |
370 class="icon" | |
371 href="javascript:removeMark()" | |
372 > | |
373 | |
374 <img | |
375 class="png" | |
376 id="delmark" | |
377 title="delete the last mark" | |
378 src="delmark.png" | |
379 > | |
380 </a> | |
381 </div> | |
382 | |
383 <div class="button"> | |
384 <a | |
385 class="icon" | |
386 href="javascript:mirror('h')" | |
387 > | |
388 | |
389 <img | |
390 class="png" | |
415 | 391 id="hmir" |
400 | 392 title="mirror horizontally" |
393 src="mirror-horizontal.png" | |
394 > | |
395 </a> | |
396 </div> | |
397 | |
398 <div class="button"> | |
399 <a | |
400 class="icon" | |
401 href="javascript:mirror('v')" | |
402 > | |
403 | |
404 <img | |
405 class="png" | |
415 | 406 id="vmir" |
400 | 407 title="mirror vertically" |
408 src="mirror-vertical.png" | |
409 > | |
410 </a> | |
411 </div> | |
412 | |
413 <div class="button"> | |
414 <a | |
415 class="icon" | |
416 href="javascript:setParamWin('rot', 'Rotate (0..360) clockwise')" | |
417 > | |
418 | |
419 <img | |
420 class="png" | |
415 | 421 id="rot" |
400 | 422 title="rotate image" |
423 src="rotate.png" | |
424 > | |
425 </a> | |
426 </div> | |
427 | |
428 <div class="button"> | |
429 <a | |
430 class="icon" | |
431 href="javascript:setParamWin('brgt', 'Brightness (-255..255)')" | |
432 > | |
433 | |
434 <img | |
435 class="png" | |
415 | 436 id="brgt" |
400 | 437 title="set brightness" |
438 src="brightness.png" | |
439 > | |
440 </a> | |
441 </div> | |
442 | |
443 <div class="button"> | |
444 <a | |
445 class="icon" | |
446 href="javascript:setParamWin('cont', 'Contrast (0..8)')" | |
447 > | |
448 | |
449 <img | |
450 class="png" | |
415 | 451 id="cont" |
400 | 452 title="set contrast" |
453 src="contrast.png" | |
454 > | |
455 </a> | |
456 </div> | |
457 | |
458 <div class="button"> | |
459 <a | |
460 class="icon" | |
461 href="javascript:setParamWin('rgb', '...')" | |
462 > | |
463 | |
464 <img | |
465 class="png" | |
466 id="rgb" | |
467 title="set rgb values" | |
468 src="rgb.png" | |
469 > | |
470 </a> | |
471 </div> | |
472 | |
473 <div class="button"> | |
474 <a | |
475 class="icon" | |
476 href="javascript:setParamWin('size', '...')" | |
477 > | |
478 | |
479 <img | |
480 class="png" | |
481 id="size" | |
482 title="resize page" | |
483 src="size.png" | |
484 > | |
485 </a> | |
486 </div> | |
487 | |
488 <div class="button"> | |
489 <a | |
490 class="icon" | |
491 href="javascript:setQualityWin('Quality (0..2)')" | |
492 > | |
493 | |
494 <img | |
495 class="png" | |
496 id="quality" | |
497 title="set image quality" | |
498 src="quality.png" | |
499 > | |
500 </a> | |
501 </div> | |
502 | |
503 <div class="button"> | |
504 <a | |
505 class="icon" | |
434 | 506 href="javascript:calibrate('x')" |
400 | 507 > |
508 | |
509 <img | |
510 class="png" | |
434 | 511 id="calibration-x" |
512 title="calibrate screen x-ratio" | |
513 src="calibration-x.png" | |
400 | 514 > |
434 | 515 </a> |
400 | 516 </div> |
434 | 517 |
518 <div class="button"> | |
519 <a | |
520 class="icon" | |
521 href="javascript:calibrate('y')" | |
522 > | |
523 | |
524 <img | |
525 class="png" | |
526 id="calibration-y" | |
527 title="calibrate screen y-ratio" | |
528 src="calibration-y.png" | |
529 > | |
530 </a> | |
531 </div> | |
532 | |
400 | 533 <div class="button"> |
534 <a | |
535 class="icon" | |
536 href="javascript:pixelByPixel()" | |
537 > | |
538 | |
539 <img | |
540 class="png" | |
541 id="pixel-by-pixel" | |
542 title="view image pixel by pixel" | |
543 src="pixel-by-pixel.png" | |
544 > | |
545 </a> | |
546 </div> | |
547 | |
548 <div class="button"> | |
549 <a | |
550 class="icon" | |
551 href="javascript:originalSize()" | |
552 > | |
553 | |
554 <img | |
555 class="png" | |
556 id="original-size" | |
557 title="view image in original size" | |
558 src="original-size.png" | |
559 > | |
560 </a> | |
561 </div> | |
562 | |
563 <div class="button"> | |
564 <a | |
565 class="icon" | |
566 href="javascript:toggleOptionDiv()" | |
567 > | |
568 | |
569 <img | |
570 class="png" | |
571 id="options-1" | |
572 title="hide options" | |
573 src="options.png" | |
574 > | |
575 </a> | |
576 </div> | |
577 </div> | |
578 | |
410
395db075906d
removed mark divs and images, they are added programmatically now;
hertzhaft
parents:
401
diff
changeset
|
579 <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
|
580 |
400 | 581 </body> |
582 | |
583 </html> |