[#19,routing][m]: introduce Backbone routing and use it for navigation between grid and graph views.

Some substantial other related changes:

* Switched DataExplorer view to have element it attaches to passed in rather than being created internally (this was important for FlotGraph to set up correctly).
  * Also refactored DataExplorer setup somewhat (e.g. got rid of draw function which wasn't needed -- merging necessary parts with initialize)
* Substantial refactoring of FlotGraph so that we correctly work around flot's delicateness regarding rendering (element must not be hidden etc -- see comments in code)
  * Also generally cleaner code
This commit is contained in:
Rufus Pollock
2012-01-10 00:07:21 +00:00
parent 973e59fbdd
commit f176979f5b
2 changed files with 93 additions and 59 deletions

View File

@@ -4,9 +4,9 @@ $(function() {
window.$container = $('.data-explorer-here');
var dataset = demoDataset();
window.dataExplorer = new recline.View.DataExplorer({
model: dataset
el: window.$container
, model: dataset
});
window.$container.append(window.dataExplorer.el);
setupLoadFromWebstore(function(dataset) {
window.dataExplorer.remove();
window.dataExplorer = null;