[refactor][s]: rename view-flot-graph to view-graph and FlotGraph to Graph.

This commit is contained in:
Rufus Pollock 2012-04-15 16:03:08 +01:00
parent 16e3797b4c
commit 4ede229b7b
9 changed files with 12 additions and 12 deletions

View File

@ -45,7 +45,7 @@
<script type="text/javascript" src="../src/backend/localcsv.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-flot-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="../src/view-transform-dialog.js"></script>

View File

@ -58,7 +58,7 @@ function standardViews(dataset) {
{
id: 'graph',
label: 'Graph',
view: new recline.View.FlotGraph({
view: new recline.View.Graph({
model: dataset
})
},

View File

@ -252,7 +252,7 @@ also easily write your own). Each view holds a pointer to a Dataset:</p>
<li>DataExplorer: the parent view which manages the overall app and sets up
sub views.</li>
<li>DataGrid: the data grid view.</li>
<li>FlotGraph: a simple graphing view using <a
<li>Graph: a simple graphing view using <a
href="http://code.google.com/p/flot/">Flot</a>.</li>
<li>Map: a map view using <a href="http://leaflet.cloudmade.com/">Leaflet</a>.</li>
</ul>
@ -271,7 +271,7 @@ are useful:</p>
<li><a href="docs/model.html">Models</a></li>
<li><a href="docs/view.html">DataExplorer View (plus common view code)</a></li>
<li><a href="docs/view-grid.html">DataGrid View</a></li>
<li><a href="docs/view-flot-graph.html">Graph View (based on Flot)</a></li>
<li><a href="docs/view-graph.html">Graph View (based on Flot)</a></li>
<li><a href="docs/view-map.html">Map View (based on Leaflet)</a></li>
</ul>

2
make
View File

@ -13,7 +13,7 @@ def docs():
print("** Building docs")
docco_executable = os.environ.get('DOCCO_EXECUTABLE','docco')
cmd = '%s src/model.js src/view.js src/view-grid.js src/view-flot-graph.js src/view-map.js' % (docco_executable)
cmd = '%s src/model.js src/view.js src/view-grid.js src/view-graph.js src/view-map.js' % (docco_executable)
os.system(cmd)
if os.path.exists('/tmp/recline-docs'):
shutil.rmtree('/tmp/recline-docs')

View File

@ -20,7 +20,7 @@ this.recline.View = this.recline.View || {};
//
// NB: should *not* provide an el argument to the view but must let the view
// generate the element itself (you can then append view.el to the DOM.
my.FlotGraph = Backbone.View.extend({
my.Graph = Backbone.View.extend({
tagName: "div",
className: "data-graph-container",

View File

@ -34,7 +34,7 @@ this.recline.View = this.recline.View || {};
//
// **el**: (required) DOM element to bind to. NB: the element already
// being in the DOM is important for rendering of some subviews (e.g.
// FlotGraph).
// Graph).
//
// **views**: (optional) the dataset views (Grid, Graph etc) for
// DataExplorer to show. This is an array of view hashes. If not provided
@ -52,7 +52,7 @@ this.recline.View = this.recline.View || {};
// {
// id: 'graph',
// label: 'Graph',
// view: new recline.View.FlotGraph({
// view: new recline.View.Graph({
// model: dataset
// })
// }

View File

@ -32,7 +32,7 @@
<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-transform-dialog.js"></script>
<script type="text/javascript" src="../src/view-flot-graph.js"></script>
<script type="text/javascript" src="../src/view-graph.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.test.js"></script>

View File

@ -1,8 +1,8 @@
module("View - FlotGraph");
module("View - Graph");
test('basics', function () {
var dataset = Fixture.getDataset();
var view = new recline.View.FlotGraph({
var view = new recline.View.Graph({
model: dataset
});
$('.fixtures').append(view.el);

View File

@ -13,7 +13,7 @@ test('menu - hideColumn', function () {
assertPresent('.column-header[data-field="x"]');
var hideColumn = view.el.find('.column-header[data-field="x"] a[data-action="hideColumn"]');
hideColumn.trigger('click');
assertNotPresent('.column-header[data-field="x"]');
assertNotPresent('.column-header[data-field="x"]', view.el);
// also test a bit of state
deepEqual(view.state.toJSON(), {hiddenFields: ['x']});