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