Skip to content

Commit

Permalink
[fix] can't back out with back button
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jan 29, 2016
1 parent 5156d9f commit 95aa6e0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 0 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ List of TODO items for Panoramix
* **Dashboard URL filters:** `{dash_url}#fltin__fieldname__value1,value2`
* **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
* **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.
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.
Expand Down
12 changes: 9 additions & 3 deletions panoramix/static/panoramix.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,14 @@ var px = (function() {
i++;
});
}
function druidify(){
function renderSlice(){
prepForm();
slice.render();
}
function druidify(){
$('div.alert').remove();
history.pushState({}, document.title, slice.querystring());
slice.render();
renderSlice();
}

function initExploreView() {
Expand Down Expand Up @@ -519,6 +522,9 @@ var px = (function() {
initDashboardView: initDashboardView,
formatDate: formatDate,
timeFormatFactory: timeFormatFactory,
color: color(),
colorBnb: colorBnb,
bnbColors: bnbColors,
color: colorBnb(),
renderSlice: renderSlice,
}
})();
12 changes: 6 additions & 6 deletions panoramix/templates/panoramix/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ <h4 class="modal-title">Datasource Description</h4>
var data = $('.slice').data('slice');
var slice = px.Slice(data);
$('.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>
{% endblock %}

0 comments on commit 95aa6e0

Please sign in to comment.