comparison client/digitallibrary/jquery/jquery.digilib.js @ 890:613c2089bc7a jquery

use setstate in redisplay instead of pushstate as long as we don't deal with popstate (i.e. history-back).
author robcast
date Thu, 07 Apr 2011 10:22:26 +0200
parents 65ad22044e13
children 01b875d668b1
comparison
equal deleted inserted replaced
889:65ad22044e13 890:613c2089bc7a
929 var url = getDigilibUrl(data); 929 var url = getDigilibUrl(data);
930 var history = window.history; 930 var history = window.history;
931 if (typeof history.pushState === 'function') { 931 if (typeof history.pushState === 'function') {
932 console.debug("faking reload to "+url); 932 console.debug("faking reload to "+url);
933 // change url without reloading (stateObj, title, url) 933 // change url without reloading (stateObj, title, url)
934 // TODO: we really need to put the state in stateObj and listen to pop-events 934 // TODO: we really need to push the state in stateObj and listen to pop-events
935 // TODO: use replace-state(?) 935 history.replaceState({}, '', url);
936 history.pushState({}, '', url);
937 // change img src 936 // change img src
938 var imgurl = getScalerUrl(data); 937 var imgurl = getScalerUrl(data);
939 data.$img.attr('src', imgurl); 938 data.$img.attr('src', imgurl);
940 highlightButtons(data); 939 highlightButtons(data);
941 // send event 940 // send event