Mercurial > hg > digilib-old
changeset 848:77248c6d2a5f jquery
fix missing buttons
author | hertzhaft |
---|---|
date | Sun, 06 Mar 2011 13:16:27 +0100 |
parents | c662bf335881 |
children | a0ae2d86bcf4 |
files | client/digitallibrary/jquery/img/embedded.svg client/digitallibrary/jquery/img/embedded/16/addregion.png client/digitallibrary/jquery/img/embedded/16/addregions.png client/digitallibrary/jquery/img/embedded/16/delregion.png client/digitallibrary/jquery/img/embedded/16/delregions.png client/digitallibrary/jquery/img/embedded/32/addregion.png client/digitallibrary/jquery/img/embedded/32/addregions.png client/digitallibrary/jquery/img/embedded/32/delregion.png client/digitallibrary/jquery/img/embedded/32/delregions.png client/digitallibrary/jquery/jquery-test-embedded.html client/digitallibrary/jquery/jquery.digilib.css client/digitallibrary/jquery/jquery.digilib.regions.js |
diffstat | 12 files changed, 23 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/img/embedded.svg Sun Mar 06 12:58:09 2011 +0100 +++ b/client/digitallibrary/jquery/img/embedded.svg Sun Mar 06 13:16:27 2011 +0100 @@ -51,7 +51,7 @@ inkscape:cx="15.816836" inkscape:cy="15.897753" inkscape:document-units="px" - inkscape:current-layer="layer1" + inkscape:current-layer="layer27" showgrid="true" inkscape:window-width="1024" inkscape:window-height="719" @@ -988,7 +988,7 @@ <g inkscape:groupmode="layer" id="layer27" - inkscape:label="addregions" + inkscape:label="addregion" style="display:none" sodipodi:insensitive="true"> <path @@ -1004,7 +1004,7 @@ </g> <g style="display:none" - inkscape:label="delregions" + inkscape:label="delregion" id="g202" inkscape:groupmode="layer" sodipodi:insensitive="true">
--- a/client/digitallibrary/jquery/jquery-test-embedded.html Sun Mar 06 12:58:09 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-embedded.html Sun Mar 06 13:16:27 2011 +0100 @@ -68,7 +68,7 @@ scalerBaseUrl : 'http://digilib.biblhertz.it/digilib04/servlet/Scaler', showRegionNumbers : true, autoRegionLinks : false, - includeRegionContent : true + includeRegionContent : false }; var $div = $('div.digilib'); $div.digilib(opts);
--- a/client/digitallibrary/jquery/jquery.digilib.css Sun Mar 06 12:58:09 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.css Sun Mar 06 13:16:27 2011 +0100 @@ -135,16 +135,16 @@ top: 0px; padding: 1px; background-color: grey; - opacity: 0.4; + opacity: 0.5; z-index: 100; } div.digilib.dl_embedded div.button:hover { - background-color: darkred; + background-color: black; } div.digilib.dl_embedded div.button-on { - background-color: black; + background-color: darkgreen; } div.digilib.dl_embedded div.birdview {
--- a/client/digitallibrary/jquery/jquery.digilib.regions.js Sun Mar 06 12:58:09 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.regions.js Sun Mar 06 13:16:27 2011 +0100 @@ -377,10 +377,11 @@ // event handler, sets buttons and shows regions var handleUpdate = function (evt) { data = this; - fn.highlightButtons(data, 'regions' , data.settings.isRegionVisible); - fn.highlightButtons(data, 'regionhtml' , data.settings.showRegionHTML); + var settings = data.settings; + fn.highlightButtons(data, 'regions' , settings.isRegionVisible); + fn.highlightButtons(data, 'regionhtml' , settings.showRegionHTML); showRegionDivs(data); - console.debug("regions: handleUpdate", data.settings.rg); + console.debug("regions: handleUpdate", settings.rg); }; // event handler, redisplays regions (e.g. in a new position) @@ -420,27 +421,29 @@ var $html = $('<div class="keep regionHTML"/>'); $elem.append($html); data.$htmlDiv = $html; + // install event handler + var $data = $(data); + $data.bind('setup', handleSetup); + $data.bind('update', handleUpdate); + $data.bind('redisplay', handleRedisplay); + $data.bind('dragZoom', handleDragZoom); + var settings = data.settings; + var hasRegionContent = settings.includeRegionContent; // no URL-defined regions, no buttons when regions are predefined in HTML - var hasRegionContent = data.settings.includeRegionContent; if (!hasRegionContent) { + var mode = settings.interactionMode; // add "rg" to digilibParamNames - data.settings.digilibParamNames.push('rg'); + settings.digilibParamNames.push('rg'); // additional buttons - var buttonSettings = data.settings.buttonSettings.fullscreen; + var buttonSettings = settings.buttonSettings[mode]; // configure buttons through digilib "regionSet" option - var buttonSet = data.settings.regionSet || regionSet; + var buttonSet = settings.regionSet || regionSet; // set regionSet to [] or '' for no buttons (when showing regions only) if (buttonSet.length && buttonSet.length > 0) { buttonSettings['regionSet'] = buttonSet; buttonSettings.buttonSets.push('regionSet'); } } - // install event handler - var $data = $(data); - $data.bind('setup', handleSetup); - $data.bind('update', handleUpdate); - $data.bind('redisplay', handleRedisplay); - $data.bind('dragZoom', handleDragZoom); }; // plugin object with name and install/init methods