Mercurial > hg > digilib-old
comparison client/digitallibrary/jquery/jquery.digilib.js @ 616:55e06ebb879f jquery
setup the 'about' window
author | hertzhaft |
---|---|
date | Sun, 16 Jan 2011 19:52:06 +0100 |
parents | ec131e9699a6 |
children | cd846b5c8be8 |
comparison
equal
deleted
inserted
replaced
615:ec131e9699a6 | 616:55e06ebb879f |
---|---|
134 img : "sep.png" | 134 img : "sep.png" |
135 } | 135 } |
136 }; | 136 }; |
137 | 137 |
138 var defaults = { | 138 var defaults = { |
139 // version of this script | |
140 'version' : 'jquery.digilib.js 1.0', | |
141 // logo url | |
142 'logoUrl' : '../img/digilib-logo-text1.png', | |
143 // repository url | |
144 'reposUrl' : 'http://digilib.berlios.de', | |
139 // base URL to Scaler servlet | 145 // base URL to Scaler servlet |
140 'scalerBaseUrl' : 'http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler', | 146 'scalerBaseUrl' : 'http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler', |
141 // list of Scaler parameters | 147 // list of Scaler parameters |
142 'scalerParamNames' : ['fn','pn','dw','dh','ww','wh','wx','wy','ws','mo', | 148 'scalerParamNames' : ['fn','pn','dw','dh','ww','wh','wx','wy','ws','mo', |
143 'rot','cont','brgt','rgbm','rgba','ddpi','ddpix','ddpiy'], | 149 'rot','cont','brgt','rgbm','rgba','ddpi','ddpix','ddpiy'], |
151 'buttonsImagePath' : '../greyskin/', | 157 'buttonsImagePath' : '../greyskin/', |
152 // button groups | 158 // button groups |
153 'buttonsStandard' : ["reference","zoomin","zoomout","zoomarea","zoomfull","pagewidth","back","fwd","page","bird","SEP","help","reset","options"], | 159 'buttonsStandard' : ["reference","zoomin","zoomout","zoomarea","zoomfull","pagewidth","back","fwd","page","bird","SEP","help","reset","options"], |
154 'buttonsSpecial' : ["mark","delmark","hmir","vmir","rot","brgt","cont","rgb","quality","size","calibrationx","scale","SEP","options"], | 160 'buttonsSpecial' : ["mark","delmark","hmir","vmir","rot","brgt","cont","rgb","quality","size","calibrationx","scale","SEP","options"], |
155 'buttonsCustom' : [], | 161 'buttonsCustom' : [], |
162 // is birdView shown? | |
163 'isBirdDivVisible' : false, | |
156 // dimensions of bird's eye window | 164 // dimensions of bird's eye window |
157 'birdMaxX' : 200, | 165 'birdMaxX' : 200, |
158 'birdMaxY' : 200 | 166 'birdMaxY' : 200, |
167 // is the "about" window shown? | |
168 'isAboutDivVisible' : false | |
169 | |
159 }; | 170 }; |
160 | 171 |
161 // parameters from the query string | 172 // parameters from the query string |
162 var queryParams = {}; | 173 var queryParams = {}; |
163 | 174 |
193 } | 204 } |
194 // create HTML structure | 205 // create HTML structure |
195 setupScalerDiv($elem, elemSettings); | 206 setupScalerDiv($elem, elemSettings); |
196 setupButtons($elem, elemSettings, 'buttonsStandard'); | 207 setupButtons($elem, elemSettings, 'buttonsStandard'); |
197 setupBirdviewDiv($elem, elemSettings); | 208 setupBirdviewDiv($elem, elemSettings); |
209 setupAboutDiv($elem, elemSettings); | |
198 }); | 210 }); |
199 }, | 211 }, |
200 | 212 |
201 // clean up digilib | 213 // clean up digilib |
202 destroy : function() { | 214 destroy : function() { |
369 $birdviewDiv.append($birdzoomDiv); | 381 $birdviewDiv.append($birdzoomDiv); |
370 $birdviewDiv.append($birdImg); | 382 $birdviewDiv.append($birdImg); |
371 $birdImg.attr('src', birdUrl); | 383 $birdImg.attr('src', birdUrl); |
372 }; | 384 }; |
373 | 385 |
386 // creates HTML structure for the bird's eye view in elem | |
387 var setupAboutDiv = function ($elem, settings) { | |
388 var $aboutDiv = $('<div class="about"/>'); | |
389 var $header = $('<p>Digilib Graphic Viewer</p>'); | |
390 var $link = $('<a/>'); | |
391 var $logo = $('<img class="logo" title="digilib"/>'); | |
392 var $content = $('<p/>'); | |
393 $elem.append($aboutDiv); | |
394 $aboutDiv.append($header); | |
395 $aboutDiv.append($link); | |
396 $aboutDiv.append($content); | |
397 $link.append($logo); | |
398 $logo.attr('src', settings.logoUrl); | |
399 $link.attr('href', settings.reposUrl); | |
400 $content.text('Version: ' + settings.version); | |
401 }; | |
402 | |
374 // returns function for load event of scaler img | 403 // returns function for load event of scaler img |
375 var scalerImgLoadedFn = function(settings) { | 404 var scalerImgLoadedFn = function(settings) { |
376 return function() { | 405 return function() { |
377 console.debug("img loaded! settings=", settings); | 406 console.debug("img loaded! settings=", settings); |
378 }; | 407 }; |