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