Mercurial > hg > digilib-old
comparison client/digitallibrary/greyskin/diginew.jsp @ 443:089adc9e2a5f
placement of size menu
author | hertzhaft |
---|---|
date | Fri, 13 Jan 2006 12:03:25 +0100 |
parents | 85aef29cc1da |
children | 6154dfc67615 |
comparison
equal
deleted
inserted
replaced
442:3d37d8eae372 | 443:089adc9e2a5f |
---|---|
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 jspVersion = "diginew.jsp 1.011"; | 49 var jspVersion = "diginew.jsp 1.013"; |
50 var cookie = new Cookie(); | 50 var cookie = new Cookie(); |
51 // alert(strObject(cookie)); | 51 // alert(strObject(cookie)); |
52 | 52 |
53 var isOptionDivVisible = cookie.getbool("isOptionDivVisible"); | 53 var isOptionDivVisible = cookie.getbool("isOptionDivVisible"); |
54 var isBirdDivVisible = cookie.getbool("isBirdDivVisible"); | 54 var isBirdDivVisible = cookie.getbool("isBirdDivVisible"); |
55 var isAboutDivVisible = false; | 55 var isAboutDivVisible = false; |
56 var isSizeMenuVisible = false; | |
57 var isOriginalSize = false; | |
58 var isPixelByPixel = false; | |
56 var dlTarget = window.name; | 59 var dlTarget = window.name; |
57 var baseUrl = '<%= dlRequest.getAsString("base.url") %>'; | 60 var baseUrl = '<%= dlRequest.getAsString("base.url") %>'; |
58 var toolbarEnabledURL = window.location.href; | 61 var toolbarEnabledURL = window.location.href; |
59 var timeOut; | 62 var timeOut; |
60 | 63 |
73 function toggleAboutDiv() { | 76 function toggleAboutDiv() { |
74 isAboutDivVisible = !isAboutDivVisible; | 77 isAboutDivVisible = !isAboutDivVisible; |
75 showAboutDiv(isAboutDivVisible); | 78 showAboutDiv(isAboutDivVisible); |
76 } | 79 } |
77 | 80 |
81 function toggleSizeMenu() { | |
82 isSizeMenuVisible = !isSizeMenuVisible; | |
83 showSizeMenu(isSizeMenuVisible); | |
84 } | |
85 | |
86 function toggleOriginalSize(on) { | |
87 isOriginalSize = (arguments.length == 1) | |
88 ? on | |
89 : !isOriginalSize; | |
90 togglePixelByPixel(false); | |
91 originalSize(isOriginalSize); | |
92 } | |
93 | |
94 function togglePixelByPixel(on) { | |
95 isPixelByPixel = (arguments.length == 1) | |
96 ? on | |
97 : !isPixelByPixel; | |
98 toggleOriginalSize(false); | |
99 pixelByPixel(isPixelByPixel); | |
100 } | |
101 | |
102 function setOnImage(id, src, value) { | |
78 // replace img src and display "on" status | 103 // replace img src and display "on" status |
79 function setOnImage(id, src) { | |
80 var elem = getElement(id); | 104 var elem = getElement(id); |
81 elem.src = src; | 105 elem.src = src; |
82 elem.title += ": on"; | 106 if (value) |
107 elem.title += ": " + value; | |
108 else | |
109 elem.title += ": on"; | |
83 } | 110 } |
84 | 111 |
85 // change icons if image functions are on | 112 // change icons if image functions are on |
86 function reflectImageStatus() { | 113 function reflectImageStatus() { |
87 if (hasFlag("hmir")) setOnImage("hmir", "mirror-horizontal-on.png"); | 114 if (hasFlag("hmir")) setOnImage("hmir", "mirror-horizontal-on.png"); |
88 if (hasFlag("vmir")) setOnImage("vmir", "mirror-vertical-on.png"); | 115 if (hasFlag("vmir")) setOnImage("vmir", "mirror-vertical-on.png"); |
89 if (hasParameter("brgt")) setOnImage("brgt", "brightness-on.png"); | 116 if (hasParameter("brgt")) |
90 if (hasParameter("cont")) setOnImage("cont", "contrast-on.png"); | 117 setOnImage("brgt", "brightness-on.png", getParameter("brgt")); |
91 if (hasParameter("rot")) setOnImage("rot", "rotate-on.png"); | 118 if (hasParameter("cont")) |
92 if (hasParameter("rgb")) setOnImage("rgb", "rgb-on.png"); | 119 setOnImage("cont", "contrast-on.png", getParameter("cont")); |
120 if (hasParameter("rot")) | |
121 setOnImage("rot", "rotate-on.png", getParameter("rot")); | |
122 if (hasParameter("rgb")) | |
123 setOnImage("rgb", "rgb-on.png", getParameter("rgb")); | |
93 } | 124 } |
94 | 125 |
95 // initialize image; called by body.onload | 126 // initialize image; called by body.onload |
96 function onBodyLoad() { | 127 function onBodyLoad() { |
97 document.id = 'digilib'; | 128 document.id = 'digilib'; |
163 </div> | 194 </div> |
164 </div> | 195 </div> |
165 | 196 |
166 <!-- the size menu --> | 197 <!-- the size menu --> |
167 <div id="sizes"> | 198 <div id="sizes"> |
168 <p><a href="javascript:resize(1)">1</a></p> | 199 <p><a href="javascript:resize(1)">1 x</a></p> |
169 <p><a href="javascript:resize(1.41)">1.41</a></p> | 200 <p><a href="javascript:resize(1.41)">1.41 x</a></p> |
170 <p><a href="javascript:resize(2)">2</a></p> | 201 <p><a href="javascript:resize(2)">2 x</a></p> |
171 <p><a href="javascript:resize(3)">3</a></p> | 202 <p><a href="javascript:resize(3)">3 x</a></p> |
172 </div> | 203 </div> |
173 | 204 |
174 <!-- the buttons --> | 205 <!-- the buttons --> |
175 <div id="buttons"> | 206 <div id="buttons"> |
176 <div class="separator"> | 207 <div class="separator"> |
267 </div> | 298 </div> |
268 | 299 |
269 <div class="button"> | 300 <div class="button"> |
270 <a | 301 <a |
271 class="icon" | 302 class="icon" |
272 href="javascript:sizeMenu()" | 303 href="javascript:toggleSizeMenu()" |
273 > | 304 > |
274 | 305 |
275 <img | 306 <img |
276 class="png" | 307 class="png" |
277 id="size" | 308 id="size" |