From e7bed925191dde972d0eedf5147e93a649f5f884 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 25 Mar 2016 22:02:50 -0700 Subject: [PATCH] [hotfix] can't back out of history after entering explore --- dashed/assets/javascripts/explore.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dashed/assets/javascripts/explore.js b/dashed/assets/javascripts/explore.js index 2fc9154d16..343f530999 100644 --- a/dashed/assets/javascripts/explore.js +++ b/dashed/assets/javascripts/explore.js @@ -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); } @@ -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')