# HG changeset patch # User hertzhaft # Date 1298423201 -3600 # Node ID 8af71d9d830bfad06bdbca30fc1b70d4baab97e8 # Parent 637e8b60176397080b17c1b2d67e8c3c37467199 fixed automatic region links and region content diff -r 637e8b601763 -r 8af71d9d830b client/digitallibrary/jquery/jquery-test-full.html --- a/client/digitallibrary/jquery/jquery-test-full.html Wed Feb 23 01:49:22 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-full.html Wed Feb 23 02:06:41 2011 +0100 @@ -70,7 +70,8 @@ var opts = { interactionMode : 'fullscreen', scalerBaseUrl : 'http://digilib.biblhertz.it/digilib04/servlet/Scaler', - showRegionNumbers : true, + showRegionNumbers : false, + autoRegionLinks : false, includeRegionContent : true }; var $div = $('div.digilib'); @@ -84,10 +85,10 @@
-
+ - diff -r 637e8b601763 -r 8af71d9d830b client/digitallibrary/jquery/jquery.digilib.css --- a/client/digitallibrary/jquery/jquery.digilib.css Wed Feb 23 01:49:22 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.css Wed Feb 23 02:06:41 2011 +0100 @@ -66,8 +66,9 @@ opacity: 0.5; } -div.regionnumber { +div.regionnumber a { color: white; + text-decoration: none; font-size: 11px; font-weight: bold; height: 15px; @@ -77,6 +78,14 @@ div.regioncontent { display: none; + padding: 3px; +} + +div.regioncontent a { + color: white; + text-decoration: none; + font-size: 11px; + font-weight: bold; } div.regioninfo { diff -r 637e8b601763 -r 8af71d9d830b client/digitallibrary/jquery/jquery.digilib.regions.js --- a/client/digitallibrary/jquery/jquery.digilib.regions.js Wed Feb 23 01:49:22 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.regions.js Wed Feb 23 02:06:41 2011 +0100 @@ -56,7 +56,9 @@ 'showRegionInfo' : false, // should digilib look for region content in the page? 'includeRegionContent' : false, - // class name for content divs + // turn any region into a clickable link to its detail view + 'autoRegionLinks' : false, + // class name for content divs (must additionally be marked with class "keep") 'regionContentSelector' : 'div.regioncontent', // buttonset of this plugin 'regionSet' : ['regions', 'addregion', 'delregion', 'regioninfo', 'lessoptions'], @@ -82,8 +84,7 @@ var $overlay = $('
'); $body.append($overlay); bodyRect.adjustDiv($overlay); - // we count regions from 1 - var $regionDiv = addRegionDiv(data, data.regions.length + 1); + var $regionDiv = addRegionDiv(data, data.regions.length); // mousedown handler: start sizing var regionStart = function (evt) { @@ -181,15 +182,26 @@ }; // add a region to data.$elem - var addRegionDiv = function (data, nr) { + var addRegionDiv = function (data, index) { + var nr = index + 1; // we count regions from 1 + // create a digilib URL for this detail + var regionUrl = getRegionUrl(data, index); var $regionDiv = $('