Skip to content

Commit

Permalink
[hotfix] can't back out of history after entering explore
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Mar 26, 2016
1 parent 10a1edd commit e7bed92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dashed/assets/javascripts/explore.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ function prepForm() {
});
}

function druidify(force) {
function druidify(force, pushState) {
if (force === undefined) {
force = false;
}
if (pushState !== false) {
history.pushState({}, document.title, slice.querystring());
}
$('.query-and-save button').attr('disabled', 'disabled');
$('.btn-group.results span,a').attr('disabled', 'disabled');
$('div.alert').remove();
$('#is_cached').hide();
history.pushState({}, document.title, slice.querystring());
prepForm();
slice.render(force);
}
Expand Down Expand Up @@ -323,7 +325,7 @@ $(document).ready(function () {
$('.slice').data('slice', slice);

// call vis render method, which issues ajax
druidify(false);
druidify(false, false);

// make checkbox inputs display as toggles
$(':checkbox')
Expand Down

0 comments on commit e7bed92

Please sign in to comment.