[#113,doc][s]: fix up docs to work again after latest refactorings.

This commit is contained in:
Rufus Pollock
2012-05-27 23:49:38 +01:00
parent 9838e69b2d
commit f05d5c2906
4 changed files with 10 additions and 6 deletions

View File

@@ -2,7 +2,8 @@
var dataset = new recline.Model.Dataset({ var dataset = new recline.Model.Dataset({
url: 'https://docs.google.com/spreadsheet/ccc?key=0Aon3JiuouxLUdGZPaUZsMjBxeGhfOWRlWm85MmV0UUE#gid=0' url: 'https://docs.google.com/spreadsheet/ccc?key=0Aon3JiuouxLUdGZPaUZsMjBxeGhfOWRlWm85MmV0UUE#gid=0'
}, },
backend='gdoc' // backend name or instance
'gdocs'
); );
// Optional - display the results in a grid // Optional - display the results in a grid

View File

@@ -2,6 +2,7 @@
<!--[if lte IE 8]> <!--[if lte IE 8]>
<link rel="stylesheet" href="vendor/leaflet/0.3.1/leaflet.ie.css" /> <link rel="stylesheet" href="vendor/leaflet/0.3.1/leaflet.ie.css" />
<![endif]--> <![endif]-->
<link rel="stylesheet" href="vendor/slickgrid/2.0.1/slick.grid.css">
<!-- Recline CSS components --> <!-- Recline CSS components -->
<link rel="stylesheet" href="css/data-explorer.css"> <link rel="stylesheet" href="css/data-explorer.css">
@@ -14,7 +15,7 @@
<script type="text/javascript" src="vendor/jquery/1.7.1/jquery.js"></script> <script type="text/javascript" src="vendor/jquery/1.7.1/jquery.js"></script>
<script type="text/javascript" src="vendor/underscore/1.1.6/underscore.js"></script> <script type="text/javascript" src="vendor/underscore/1.1.6/underscore.js"></script>
<script type="text/javascript" src="vendor/backbone/0.5.1/backbone.js"></script> <script type="text/javascript" src="vendor/backbone/0.5.1/backbone.js"></script>
<script type="text/javascript" src="vendor/jquery.mustache.js"></script> <script type="text/javascript" src="vendor/mustache/0.5.0-dev/mustache.js"></script>
<script type="text/javascript" src="vendor/bootstrap/2.0.2/bootstrap.js"></script> <script type="text/javascript" src="vendor/bootstrap/2.0.2/bootstrap.js"></script>
<script type="text/javascript" src="vendor/jquery.flot/0.7/jquery.flot.js"></script> <script type="text/javascript" src="vendor/jquery.flot/0.7/jquery.flot.js"></script>
<script type="text/javascript" src="vendor/leaflet/0.3.1/leaflet.js"></script> <script type="text/javascript" src="vendor/leaflet/0.3.1/leaflet.js"></script>

View File

@@ -56,8 +56,8 @@ How do you know the backend identifier for a given Backend? It's just the name o
* [memory: Memory Backend (local data)](docs/backend/memory.html) * [memory: Memory Backend (local data)](docs/backend/memory.html)
* [elasticsearch: ElasticSearch Backend](docs/backend/elasticsearch.html) * [elasticsearch: ElasticSearch Backend](docs/backend/elasticsearch.html)
* [dataproxy: DataProxy Backend (CSV and XLS on the Web)](docs/backend/dataproxy.html) * [dataproxy: DataProxy Backend (CSV and XLS on the Web)](docs/backend/dataproxy.html)
* [gdoc: Google Docs (Spreadsheet) Backend](docs/backend/gdocs.html) * [gdocs: Google Docs (Spreadsheet) Backend](docs/backend/gdocs.html)
* [csv: Local CSV file backend](docs/backend/localcsv.html) * [csv: Local CSV file backend](docs/backend/csv.html)
Backend not on this list that you would like to see? It's very easy to write a new backend -- see below for more details. Backend not on this list that you would like to see? It's very easy to write a new backend -- see below for more details.

View File

@@ -60,7 +60,7 @@ no reason you cannot have objects as values allowing you to nest data.
We can now create a recline Dataset object (and memory backend) from this raw data: We can now create a recline Dataset object (and memory backend) from this raw data:
{% highlight javascript %} {% highlight javascript %}
var dataset = recline.Backend.createDataset(data); var dataset = recline.Backend.Memory.createDataset(data);
{% endhighlight %} {% endhighlight %}
Note that behind the scenes Recline will create a Memory backend for this dataset as in Recline every dataset object must have a backend from which it can push and pull data. In the case of in-memory data this is a little artificial since all the data is available locally but this makes more sense for situations where one is connecting to a remote data source (and one which may contain a lot of data). Note that behind the scenes Recline will create a Memory backend for this dataset as in Recline every dataset object must have a backend from which it can push and pull data. In the case of in-memory data this is a little artificial since all the data is available locally but this makes more sense for situations where one is connecting to a remote data source (and one which may contain a lot of data).
@@ -85,7 +85,7 @@ And hey presto:
<script type="text/javascript"> <script type="text/javascript">
{% include data.js %} {% include data.js %}
var dataset = recline.Backend.createDataset(data); var dataset = recline.Backend.Memory.createDataset(data);
var $el = $('#mygrid'); var $el = $('#mygrid');
var grid = new recline.View.Grid({ var grid = new recline.View.Grid({
model: dataset, model: dataset,
@@ -220,6 +220,7 @@ var map = new recline.View.Map({
model: dataset model: dataset
}); });
$el.append(map.el); $el.append(map.el);
map.redraw();
{% endhighlight %} {% endhighlight %}
<div id="mymap">&nbsp;</div> <div id="mymap">&nbsp;</div>
@@ -230,5 +231,6 @@ var map = new recline.View.Map({
model: dataset model: dataset
}); });
$el.append(map.el); $el.append(map.el);
map.redraw();
</script> </script>