changeset 934:065dd6895ce7

improved busy cursor
author robcast
date Wed, 21 Dec 2011 17:01:13 +0100
parents f1e576b80145
children 776347921bec
files webapp/src/main/webapp/jquery/jquery.digilib.js
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.js	Wed Dec 21 11:52:13 2011 +0100
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.js	Wed Dec 21 17:01:13 2011 +0100
@@ -965,6 +965,7 @@
                 	history.replaceState({}, '', url);
                 	// show busy cursor
                 	$('body').css('cursor', 'progress');
+                	data.$scaler.css('cursor', 'progress');
                 	// change img src
                 	var imgurl = getScalerUrl(data);
                 	data.$img.attr('src', imgurl);
@@ -990,6 +991,7 @@
             // embedded mode -- just change img src
         	// show busy cursor
         	$('body').css('cursor', 'progress');
+        	data.$scaler.css('cursor', 'progress');
             var url = getScalerUrl(data);
             data.$img.attr('src', url);
         	if (data.scalerFlags.clip != null || data.scalerFlags.osize != null) {
@@ -1102,6 +1104,7 @@
         $img.attr('src', scalerUrl);
         // set busy cursor
         $('body').css('cursor','progress');
+    	data.$scaler.css('cursor', 'progress');
     };
 
     // creates HTML structure for a single button
@@ -1460,11 +1463,12 @@
         return function () {
             var $img = $(this);
             console.debug("scaler img loaded=",$img);
-        	// reset busy cursor
-        	$('body').css('cursor', 'inherit');
             var $scaler = data.$scaler;
             var imgRect = geom.rectangle($img);
             data.imgRect = imgRect;
+        	// reset busy cursor
+        	$('body').css('cursor', 'auto');
+        	$scaler.css('cursor', 'auto');
             // adjust scaler div size
             imgRect.adjustDiv($scaler);
             // show image in case it was hidden (for example in zoomDrag)