[demo][xs]: graph view available for cases where data loaded from remote.

This commit is contained in:
Rufus Pollock 2012-03-14 18:44:06 +00:00
parent 2bf0f9681f
commit 10ce04da43

View File

@ -29,9 +29,26 @@ $(function() {
var $el = $('<div />');
$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