Mercurial > hg > digilib-old
comparison client/digitallibrary/greyskin/diginew.jsp @ 434:4eeabb5ed193
bug fixes;
added saving status in cookie;
added basic screen calibration functionality;
author | hertzhaft |
---|---|
date | Mon, 09 Jan 2006 17:53:03 +0100 |
parents | ec504da8f69a |
children | 65219f4fcf6b |
comparison
equal
deleted
inserted
replaced
433:35044254c5af | 434:4eeabb5ed193 |
---|---|
44 | 44 |
45 <script type="text/javascript" src="dllib.js"></script> | 45 <script type="text/javascript" src="dllib.js"></script> |
46 | 46 |
47 <script language="JavaScript"> | 47 <script language="JavaScript"> |
48 | 48 |
49 var isOptionDivVisible = false; | 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"); | |
50 var isAboutDivVisible = false; | 55 var isAboutDivVisible = false; |
51 var isBirdDivVisible = false; | |
52 var dlTarget = window.name; | 56 var dlTarget = window.name; |
53 var baseUrl = '<%= dlRequest.getAsString("base.url") %>'; | 57 var baseUrl = '<%= dlRequest.getAsString("base.url") %>'; |
54 var toolbarEnabledURL = window.location.href; | 58 var toolbarEnabledURL = window.location.href; |
55 var timeOut; | 59 var timeOut; |
56 | 60 |
57 function toggleOptionDiv() { | 61 function toggleOptionDiv() { |
58 isOptionDivVisible = !isOptionDivVisible; | 62 isOptionDivVisible = !isOptionDivVisible; |
63 cookie.addbool("isOptionDivVisible", isOptionDivVisible); | |
59 showOptions(isOptionDivVisible); | 64 showOptions(isOptionDivVisible); |
65 } | |
66 | |
67 function toggleBirdDiv() { | |
68 isBirdDivVisible = !isBirdDivVisible; | |
69 cookie.addbool("isBirdDivVisible", isBirdDivVisible); | |
70 showBirdDiv(isBirdDivVisible); | |
60 } | 71 } |
61 | 72 |
62 function toggleAboutDiv() { | 73 function toggleAboutDiv() { |
63 isAboutDivVisible = !isAboutDivVisible; | 74 isAboutDivVisible = !isAboutDivVisible; |
64 showAboutDiv(isAboutDivVisible); | 75 showAboutDiv(isAboutDivVisible); |
65 } | |
66 | |
67 function toggleBirdDiv() { | |
68 isBirdDivVisible = !isBirdDivVisible; | |
69 showBirdDiv(isBirdDivVisible); | |
70 } | 76 } |
71 | 77 |
72 // replace img src and display "on" status | 78 // replace img src and display "on" status |
73 function setOnImage(id, src) { | 79 function setOnImage(id, src) { |
74 var elem = getElement(id); | 80 var elem = getElement(id); |
85 if (hasParameter("rot")) setOnImage("rot", "rotate-on.png"); | 91 if (hasParameter("rot")) setOnImage("rot", "rotate-on.png"); |
86 if (hasParameter("rgb")) setOnImage("rgb", "rgb-on.png"); | 92 if (hasParameter("rgb")) setOnImage("rgb", "rgb-on.png"); |
87 } | 93 } |
88 | 94 |
89 // initialize image; called by body.onload | 95 // initialize image; called by body.onload |
90 function onBodyLoaded() { | 96 function onBodyLoad() { |
91 document.id = 'digilib'; | 97 document.id = 'digilib'; |
92 initParameters(); // load default values and detail | 98 initParameters(); // load default values and detail |
93 dl_param_init(); // parse parameter values | 99 dl_param_init(); // parse parameter values |
94 loadScalerImage(); // ruft auch dl_init() / initScaler auf | 100 loadScalerImage(); // ruft auch dl_init() / initScaler auf |
95 loadBirdImage(); // lädt das Bird's Eye Bild | 101 loadBirdImage(); // lädt das Bird's Eye Bild |
96 reflectImageStatus(); // adjust icons | 102 reflectImageStatus(); // adjust icons |
103 showOptions(isOptionDivVisible); | |
104 showBirdDiv(isBirdDivVisible); | |
97 showArrows(); // show arrow overlays for zoom navigation | 105 showArrows(); // show arrow overlays for zoom navigation |
98 moveCenter(); // click to move point to center | 106 moveCenter(true); // click to move point to center |
99 } | 107 } |
100 | 108 |
109 function onBodyUnload() { | |
110 // alert(strObject(cookie)); | |
111 cookie.store(); | |
112 } | |
101 // base_init(); // now done on loading baselib.js | 113 // base_init(); // now done on loading baselib.js |
102 | 114 |
103 </script> | 115 </script> |
104 </head> | 116 </head> |
105 | 117 |
106 <body onload="onBodyLoaded();"> | 118 <body onload="onBodyLoad();" onunload="onBodyUnload();"> |
107 | 119 |
108 <!-- slot for the scaled image --> | 120 <!-- slot for the scaled image --> |
109 <div id="scaler-table"> | 121 <div id="scaler"> |
110 <div id="scaler"> | 122 <img id="pic"></img> |
111 <img id="pic"></img> | |
112 </div> | |
113 </div> | 123 </div> |
114 | 124 |
115 <!-- sensitive overlay for zoom area etc --> | 125 <!-- sensitive overlay for zoom area etc --> |
116 <div id="overlay"> | 126 <div id="overlay"> |
117 </div> | 127 </div> |
124 <img id="bird-image"></img> | 134 <img id="bird-image"></img> |
125 | 135 |
126 <!-- the bird's eye select area --> | 136 <!-- the bird's eye select area --> |
127 <div id="bird-area"> | 137 <div id="bird-area"> |
128 </div> | 138 </div> |
129 | 139 |
130 <!-- the arrows --> | 140 <!-- the arrows --> |
131 <a class="arrow" id="up" href="javascript:moveBy(0, -0.5)"></a> | 141 <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> | 142 <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> | 143 <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> | 144 <a class="arrow" id="right" href="javascript:moveBy(0.5, 0)"></a> |
138 <p>Digilib Graphic Viewer</p> | 148 <p>Digilib Graphic Viewer</p> |
139 <a href="http://digilib.berlios.de" target="_blank" > | 149 <a href="http://digilib.berlios.de" target="_blank" > |
140 <img class="logo" src="../img/digilib-logo-text1.png" title="digilib"></img> | 150 <img class="logo" src="../img/digilib-logo-text1.png" title="digilib"></img> |
141 </a> | 151 </a> |
142 <p id="digilib-version"></p> | 152 <p id="digilib-version"></p> |
153 <p id="jsp-version"></p> | |
143 <p id="baselib-version"></p> | 154 <p id="baselib-version"></p> |
144 <p id="dllib-version"></p> | 155 <p id="dllib-version"></p> |
145 </div> | 156 </div> |
146 | 157 |
158 <!-- the calibration div --> | |
159 <div id="calibration"><p>10 cm</p></div> | |
147 | 160 |
148 <div id="buttons"> | 161 <div id="buttons"> |
149 <div class="button"> | 162 <div class="button"> |
150 <a | 163 <a |
151 class="icon" | 164 class="icon" |
245 <img | 258 <img |
246 class="png" | 259 class="png" |
247 id="fwd" | 260 id="fwd" |
248 title="goto next image" | 261 title="goto next image" |
249 src="fwd.png" | 262 src="fwd.png" |
263 > | |
264 </a> | |
265 </div> | |
266 | |
267 <div class="button"> | |
268 <a | |
269 class="icon" | |
270 href="javascript:gotoPageWin()" | |
271 > | |
272 | |
273 <img | |
274 class="png" | |
275 id="page" | |
276 title="specify image" | |
277 src="page.png" | |
250 > | 278 > |
251 </a> | 279 </a> |
252 </div> | 280 </div> |
253 | 281 |
254 <div class="button"> | 282 <div class="button"> |
452 </div> | 480 </div> |
453 | 481 |
454 <div class="button"> | 482 <div class="button"> |
455 <a | 483 <a |
456 class="icon" | 484 class="icon" |
457 href="javascript:gotoPageWin()" | 485 href="javascript:calibrate('x')" |
458 > | 486 > |
459 | 487 |
460 <img | 488 <img |
461 class="png" | 489 class="png" |
462 id="page" | 490 id="calibration-x" |
463 title="specify image" | 491 title="calibrate screen x-ratio" |
464 src="page.png" | 492 src="calibration-x.png" |
465 > | 493 > |
466 </a> | 494 </a> |
467 </div> | 495 </div> |
468 | 496 |
497 <div class="button"> | |
498 <a | |
499 class="icon" | |
500 href="javascript:calibrate('y')" | |
501 > | |
502 | |
503 <img | |
504 class="png" | |
505 id="calibration-y" | |
506 title="calibrate screen y-ratio" | |
507 src="calibration-y.png" | |
508 > | |
509 </a> | |
510 </div> | |
511 | |
469 <div class="button"> | 512 <div class="button"> |
470 <a | 513 <a |
471 class="icon" | 514 class="icon" |
472 href="javascript:pixelByPixel()" | 515 href="javascript:pixelByPixel()" |
473 > | 516 > |