changeset 689:f5f2b262be07 jquery

reference button plus action
author hertzhaft
date Wed, 26 Jan 2011 23:11:50 +0100
parents 0235a8e63818
children fe2bb8f926be
files client/digitallibrary/jquery/jquery.digilib.js
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js	Wed Jan 26 22:34:26 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.js	Wed Jan 26 23:11:50 2011 +0100
@@ -34,7 +34,7 @@
 (function($) {
     var buttons = {
         reference : {
-            onclick : "javascript:getRefWin()",
+            onclick : "reference",
             tooltip : "get a reference URL",
             img : "reference.png"
             },
@@ -461,6 +461,17 @@
                 $.extend(settings, params);
                 };
             redisplay(data);
+        },
+
+        reference : function (data) {
+            var settings = data.settings;
+            var url;
+            if (settings.interactionMode === 'fullscreen') {
+                url = getDigilibUrl(data);
+            } else {
+                url = getScalerUrl(data);
+                };
+            window.prompt("URL reference to the current view", url);
         }
     };