[fix] can't back out with back button

This commit is contained in:
Maxime Beauchemin 2016-01-28 17:41:10 -08:00
parent 5156d9f2dd
commit 95aa6e00fa
3 changed files with 15 additions and 11 deletions

View File

@ -7,8 +7,6 @@ List of TODO items for Panoramix
* **Dashboard URL filters:** `{dash_url}#fltin__fieldname__value1,value2` * **Dashboard URL filters:** `{dash_url}#fltin__fieldname__value1,value2`
* **Default slice:** choose a default slice for the dataset instead of default endpoint * **Default slice:** choose a default slice for the dataset instead of default endpoint
* **refresh freq**: specifying the refresh frequency of a dashboard and specific slices within it, some randomization would be nice * **refresh freq**: specifying the refresh frequency of a dashboard and specific slices within it, some randomization would be nice
* **Color hash in JS:** it'd be nice to use the same hash function for color attribution of series
on the js side as on the python side (`panoramix.utils.color`)
* **Widget sets / chart grids:** a way to have all charts support making a series of charts and putting them in a grid. * **Widget sets / chart grids:** a way to have all charts support making a series of charts and putting them in a grid.
the same way that you can groupby for series, you could chart by. The form fieldset would be common and use the same way that you can groupby for series, you could chart by. The form fieldset would be common and use
a single field to "grid by", a limit number of chart as an N * N grid size. a single field to "grid by", a limit number of chart as an N * N grid size.

View File

@ -254,11 +254,14 @@ var px = (function() {
i++; i++;
}); });
} }
function druidify(){ function renderSlice(){
prepForm(); prepForm();
slice.render();
}
function druidify(){
$('div.alert').remove(); $('div.alert').remove();
history.pushState({}, document.title, slice.querystring()); history.pushState({}, document.title, slice.querystring());
slice.render(); renderSlice();
} }
function initExploreView() { function initExploreView() {
@ -519,6 +522,9 @@ var px = (function() {
initDashboardView: initDashboardView, initDashboardView: initDashboardView,
formatDate: formatDate, formatDate: formatDate,
timeFormatFactory: timeFormatFactory, timeFormatFactory: timeFormatFactory,
color: color(), colorBnb: colorBnb,
bnbColors: bnbColors,
color: colorBnb(),
renderSlice: renderSlice,
} }
})(); })();

View File

@ -221,12 +221,12 @@
var data = $('.slice').data('slice'); var data = $('.slice').data('slice');
var slice = px.Slice(data); var slice = px.Slice(data);
$('.slice').data('slice', slice); $('.slice').data('slice', slice);
px.druidify(); px.renderSlice();
$(':checkbox')
.addClass('pull-right')
.attr("data-onstyle", "default")
.bootstrapToggle({size: 'mini'});
$('div.toggle').addClass('pull-right');
}); });
$(':checkbox')
.addClass('pull-right')
.attr("data-onstyle", "default")
.bootstrapToggle({size: 'mini'});
$('div.toggle').addClass('pull-right');
</script> </script>
{% endblock %} {% endblock %}