Mercurial > hg > digilib
comparison client/digitallibrary/jquery/jquery.digilib.js @ 881:b95510ec127b 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 | 918caa243a5c |
children | baf4b376fcf7 |
comparison
equal
deleted
inserted
replaced
880:918caa243a5c | 881:b95510ec127b |
---|---|
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 |