Mercurial > hg > digilib-old
changeset 928:8d04821f9302
added busy cursor ('progress') while loading.
author | robcast |
---|---|
date | Tue, 20 Dec 2011 00:23:37 +0100 |
parents | 95d8184995ab |
children | e881ab1c2f47 |
files | webapp/src/main/webapp/jquery/jquery.digilib.js |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.js Mon Dec 19 23:42:31 2011 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Tue Dec 20 00:23:37 2011 +0100 @@ -961,6 +961,8 @@ // change img src var imgurl = getScalerUrl(data); data.$img.attr('src', imgurl); + // show busy cursor + $('body').css('cursor', 'progress'); if (data.scalerFlags.clip != null || data.scalerFlags.osize != null) { // we need image info, do we have it? if (data.imgInfo == null) { @@ -983,6 +985,8 @@ // embedded mode -- just change img src var url = getScalerUrl(data); data.$img.attr('src', url); + // show busy cursor + $('body').css('cursor', 'progress'); if (data.scalerFlags.clip != null || data.scalerFlags.osize != null) { // we need image info, do we have it? if (data.imgInfo == null) { @@ -1091,6 +1095,8 @@ $img.load(scalerImgLoadedHandler(data)); $img.error(function () {console.error("error loading scaler image");}); $img.attr('src', scalerUrl); + // set busy cursor + $('body').css('cursor','progress'); }; // creates HTML structure for a single button @@ -1449,6 +1455,8 @@ 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); // adjust scaler div size