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