changeset 874:46444fe43b15 jquery

oops, should have tested first
author hertzhaft
date Sun, 13 Mar 2011 21:57:50 +0100
parents 29f214f59654
children 8ddc379e83af
files client/digitallibrary/jquery/jquery.digilib.regions.js
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.regions.js	Sun Mar 13 21:50:29 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.regions.js	Sun Mar 13 21:57:50 2011 +0100
@@ -254,7 +254,7 @@
     // show region info in a window
     var regionInfo = function (data) {
         var $html = data.$htmlDiv;
-        $html.append(regionInfoHeader(data))
+        $html.append(regionInfoHeader(data));
         $html.append(regionInfoHTML(data));
         $html.append(regionInfoSVG(data));
         $html.append(regionInfoDigilib(data));
@@ -265,7 +265,7 @@
     var addRegionDiv = function (data, index, attributes) {
         var nr = index + 1; // we count regions from 1
         // create a digilib URL for this detail
-        var url = attributes.href || getRegionUrl(data, index);
+        var url = attributes ? attributes.href : getRegionUrl(data, index);
         var $regionDiv = $('<div class="region overlay" style="display:none"/>');
         $regionDiv.attr("id", ID_PREFIX + nr);
         data.$elem.append($regionDiv);
@@ -318,9 +318,9 @@
             regions.push(rect);
             // save the attributes
             var attributes = {};
-            if ($a.attr('id')) { attributes.id = $a.attr('id') };
-            if ($a.attr('href')) { attributes.href = $a.attr('href') };
-            if ($a.attr('title')) { attributes.title = $a.attr('title') };
+            if ($a.attr('id')) { attributes.id = $a.attr('id'); }
+            if ($a.attr('href')) { attributes.href = $a.attr('href'); }
+            if ($a.attr('title')) { attributes.title = $a.attr('title'); }
             // create the div
             var $regionDiv = createRegionDiv(regions, index, attributes);
             var $contents = $a.contents().clone();