Use history for saving search state.
This commit is contained in:
parent
f1ce4990d4
commit
30d3bcd11c
@ -35,7 +35,6 @@
|
||||
|
||||
function onReady(geo) {
|
||||
_ctx = {
|
||||
log: [],
|
||||
geo: geo,
|
||||
query: {}
|
||||
};
|
||||
@ -102,7 +101,7 @@
|
||||
}
|
||||
|
||||
function saveSnapshot(results) {
|
||||
_ctx.log.push(results);
|
||||
window.history.pushState(results);
|
||||
}
|
||||
|
||||
function outputSnapshot(results, omitValues) {
|
||||
@ -138,6 +137,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
window.onpopstate = function(state) {
|
||||
if (state.state) {
|
||||
outputSnapshot(state.state, false);
|
||||
}
|
||||
};
|
||||
|
||||
$(document).on({
|
||||
ajaxStart: function() {
|
||||
$('#spinner').show();
|
||||
|
Loading…
Reference in New Issue
Block a user