From 10ce04da43e46876baeec2d89d18c504b0c057d9 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Wed, 14 Mar 2012 18:44:06 +0000 Subject: [PATCH] [demo][xs]: graph view available for cases where data loaded from remote. --- demo/js/app.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/demo/js/app.js b/demo/js/app.js index d0bdc03a..36460752 100755 --- a/demo/js/app.js +++ b/demo/js/app.js @@ -29,9 +29,26 @@ $(function() { var $el = $('
'); $el.appendTo($('.data-explorer-here')); window.dataExplorer = null; + var views = [ + { + id: 'grid', + label: 'Grid', + view: new recline.View.DataGrid({ + model: dataset + }) + }, + { + id: 'graph', + label: 'Graph', + view: new recline.View.FlotGraph({ + model: dataset + }) + } + ]; window.dataExplorer = new recline.View.DataExplorer({ el: $el , model: dataset + , views: views }); // HACK (a bit). Issue is that Backbone will not trigger the route // if you are already at that location so we have to make sure we genuinely switch