[#88,view][s]: DataExplorer boots Grid, Graph and Map view by default instead of just Grid.
* This makes DataExplorer.restore substantially more useful.
This commit is contained in:
24
src/view.js
24
src/view.js
@@ -105,7 +105,8 @@ this.recline.View = this.recline.View || {};
|
|||||||
//
|
//
|
||||||
// **views**: (optional) the dataset views (Grid, Graph etc) for
|
// **views**: (optional) the dataset views (Grid, Graph etc) for
|
||||||
// DataExplorer to show. This is an array of view hashes. If not provided
|
// DataExplorer to show. This is an array of view hashes. If not provided
|
||||||
// just initialize a Grid with id 'grid'. Example:
|
// initialize with (recline.View.)Grid, Graph, and Map views (with obvious id
|
||||||
|
// and labels!).
|
||||||
//
|
//
|
||||||
// <pre>
|
// <pre>
|
||||||
// var views = [
|
// var views = [
|
||||||
@@ -142,8 +143,9 @@ this.recline.View = this.recline.View || {};
|
|||||||
// </pre>
|
// </pre>
|
||||||
//
|
//
|
||||||
// Note that at present we do *not* serialize information about the actual set
|
// Note that at present we do *not* serialize information about the actual set
|
||||||
// of views in use -- e.g. those specified by the views argument. Instead we
|
// of views in use -- e.g. those specified by the views argument -- but instead
|
||||||
// expect the client to have initialized the DataExplorer with the relevant views.
|
// expect either that the default views are fine or that the client to have
|
||||||
|
// initialized the DataExplorer with the relevant views themselves.
|
||||||
my.DataExplorer = Backbone.View.extend({
|
my.DataExplorer = Backbone.View.extend({
|
||||||
template: ' \
|
template: ' \
|
||||||
<div class="recline-data-explorer"> \
|
<div class="recline-data-explorer"> \
|
||||||
@@ -189,8 +191,20 @@ my.DataExplorer = Backbone.View.extend({
|
|||||||
id: 'grid',
|
id: 'grid',
|
||||||
label: 'Grid',
|
label: 'Grid',
|
||||||
view: new my.Grid({
|
view: new my.Grid({
|
||||||
model: this.model
|
model: this.model
|
||||||
})
|
})
|
||||||
|
}, {
|
||||||
|
id: 'graph',
|
||||||
|
label: 'Graph',
|
||||||
|
view: new my.Graph({
|
||||||
|
model: this.model
|
||||||
|
})
|
||||||
|
}, {
|
||||||
|
id: 'map',
|
||||||
|
label: 'Map',
|
||||||
|
view: new my.Map({
|
||||||
|
model: this.model
|
||||||
|
})
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
this.state = new recline.Model.ObjectState();
|
this.state = new recline.Model.ObjectState();
|
||||||
|
|||||||
@@ -4,12 +4,15 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Qunit Tests</title>
|
<title>Qunit Tests</title>
|
||||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen" />
|
||||||
|
<!-- need this stylesheet because flot will complain if canvas does not have a height -->
|
||||||
|
<link rel="stylesheet" href="../css/graph.css" type="text/css" media="screen" />
|
||||||
|
|
||||||
<script type="text/javascript" src="../vendor/jquery-1.7.1.js"></script>
|
<script type="text/javascript" src="../vendor/jquery-1.7.1.js"></script>
|
||||||
<script type="text/javascript" src="../vendor/underscore-1.1.6.js"></script>
|
<script type="text/javascript" src="../vendor/underscore-1.1.6.js"></script>
|
||||||
<script type="text/javascript" src="../vendor/backbone-0.5.1.js"></script>
|
<script type="text/javascript" src="../vendor/backbone-0.5.1.js"></script>
|
||||||
<script type="text/javascript" src="../vendor/jquery-ui-1.8.14.custom.min.js"></script>
|
<script type="text/javascript" src="../vendor/jquery-ui-1.8.14.custom.min.js"></script>
|
||||||
<script type="text/javascript" src="../vendor/jquery.flot-0.7.js"></script>
|
<script type="text/javascript" src="../vendor/jquery.flot-0.7.js"></script>
|
||||||
|
<script type="text/javascript" src="../vendor/leaflet/0.3.1/leaflet.js"></script>
|
||||||
<script type="text/javascript" src="../vendor/jquery.mustache.js"></script>
|
<script type="text/javascript" src="../vendor/jquery.mustache.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||||
@@ -29,10 +32,13 @@
|
|||||||
<script type="text/javascript" src="backend.test.js"></script>
|
<script type="text/javascript" src="backend.test.js"></script>
|
||||||
<script type="text/javascript" src="backend.elasticsearch.test.js"></script>
|
<script type="text/javascript" src="backend.elasticsearch.test.js"></script>
|
||||||
<script type="text/javascript" src="backend.localcsv.test.js"></script>
|
<script type="text/javascript" src="backend.localcsv.test.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="../src/view.js"></script>
|
<script type="text/javascript" src="../src/view.js"></script>
|
||||||
<script type="text/javascript" src="../src/view-grid.js"></script>
|
<script type="text/javascript" src="../src/view-grid.js"></script>
|
||||||
<script type="text/javascript" src="../src/view-transform-dialog.js"></script>
|
<script type="text/javascript" src="../src/view-transform-dialog.js"></script>
|
||||||
<script type="text/javascript" src="../src/view-graph.js"></script>
|
<script type="text/javascript" src="../src/view-graph.js"></script>
|
||||||
|
<script type="text/javascript" src="../src/view-map.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="view-grid.test.js"></script>
|
<script type="text/javascript" src="view-grid.test.js"></script>
|
||||||
<script type="text/javascript" src="view-graph.test.js"></script>
|
<script type="text/javascript" src="view-graph.test.js"></script>
|
||||||
<script type="text/javascript" src="view.test.js"></script>
|
<script type="text/javascript" src="view.test.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user