Mercurial > hg > digilib-old
changeset 616:55e06ebb879f jquery
setup the 'about' window
author | hertzhaft |
---|---|
date | Sun, 16 Jan 2011 19:52:06 +0100 |
parents | ec131e9699a6 |
children | cd846b5c8be8 |
files | client/digitallibrary/jquery/jquery-test-full.html client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 2 files changed, 44 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery-test-full.html Sun Jan 16 19:21:16 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-full.html Sun Jan 16 19:52:06 2011 +0100 @@ -34,6 +34,20 @@ z-index: 1; } + div.about { + position: absolute; + width: 200px; + top: 100px; + left: 350px; + height: 200px; + padding: 0px 2px; + font-family: Verdana, Arial, Helvetica, sans-serif; + border: 2px solid lightcyan; + background-color: lightgrey; + text-align: center; + z-index: 1000; + } + </style> <script type="text/javascript" src="jquery-1.4.4.js"></script>
--- a/client/digitallibrary/jquery/jquery.digilib.js Sun Jan 16 19:21:16 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Sun Jan 16 19:52:06 2011 +0100 @@ -136,6 +136,12 @@ }; var defaults = { + // version of this script + 'version' : 'jquery.digilib.js 1.0', + // logo url + 'logoUrl' : '../img/digilib-logo-text1.png', + // repository url + 'reposUrl' : 'http://digilib.berlios.de', // base URL to Scaler servlet 'scalerBaseUrl' : 'http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler', // list of Scaler parameters @@ -153,9 +159,14 @@ 'buttonsStandard' : ["reference","zoomin","zoomout","zoomarea","zoomfull","pagewidth","back","fwd","page","bird","SEP","help","reset","options"], 'buttonsSpecial' : ["mark","delmark","hmir","vmir","rot","brgt","cont","rgb","quality","size","calibrationx","scale","SEP","options"], 'buttonsCustom' : [], + // is birdView shown? + 'isBirdDivVisible' : false, // dimensions of bird's eye window 'birdMaxX' : 200, - 'birdMaxY' : 200 + 'birdMaxY' : 200, + // is the "about" window shown? + 'isAboutDivVisible' : false + }; // parameters from the query string @@ -195,6 +206,7 @@ setupScalerDiv($elem, elemSettings); setupButtons($elem, elemSettings, 'buttonsStandard'); setupBirdviewDiv($elem, elemSettings); + setupAboutDiv($elem, elemSettings); }); }, @@ -371,6 +383,23 @@ $birdImg.attr('src', birdUrl); }; + // creates HTML structure for the bird's eye view in elem + var setupAboutDiv = function ($elem, settings) { + var $aboutDiv = $('<div class="about"/>'); + var $header = $('<p>Digilib Graphic Viewer</p>'); + var $link = $('<a/>'); + var $logo = $('<img class="logo" title="digilib"/>'); + var $content = $('<p/>'); + $elem.append($aboutDiv); + $aboutDiv.append($header); + $aboutDiv.append($link); + $aboutDiv.append($content); + $link.append($logo); + $logo.attr('src', settings.logoUrl); + $link.attr('href', settings.reposUrl); + $content.text('Version: ' + settings.version); + }; + // returns function for load event of scaler img var scalerImgLoadedFn = function(settings) { return function() {