changeset 624:7d13b7e5140e jquery

small retouches
author hertzhaft
date Mon, 17 Jan 2011 18:23:52 +0100
parents 7ba95f12d172
children f2ab7d4eedc2
files client/digitallibrary/jquery/jquery.digilib.js
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js	Mon Jan 17 16:25:58 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.js	Mon Jan 17 18:23:52 2011 +0100
@@ -264,10 +264,8 @@
                 var $elem = $(this); // the clicked button
                 var settings = $elem.data('digilib').settings;
                 var oldpn = settings.pn;
-                // set with relative=true uses the sign
-                setNumValue(settings, "pn", pageNr);
-                // now check the outcome
-                var pn = settings.pn;
+                var pn = setNumValue(settings, "pn", pageNr);
+                if (pn == null) return false; // nothing happened
                 if (pn < 1) {
                     alert("no such page (page number too low)");
                     settings.pn = oldpn;
@@ -284,6 +282,7 @@
                 var $root = settings.digilibRoot;
                 var $img = $root.find('img.pic');
                 display($img, settings);
+                return false;
             }
     };