[docs,build][m]: build latest version of the docs doing some tidying of the docs along the way.
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
//
|
||||
// Backends are connectors to backend data sources and stores
|
||||
//
|
||||
// Backends are implemented as Backbone models but this is just a
|
||||
// convenience (they do not save or load themselves from any remote
|
||||
// source)
|
||||
// This is just the base module containing various convenience methods.
|
||||
this.recline = this.recline || {};
|
||||
this.recline.Backend = this.recline.Backend || {};
|
||||
|
||||
|
||||
@@ -4,10 +4,21 @@ this.recline.Backend = this.recline.Backend || {};
|
||||
(function($, my) {
|
||||
// ## ElasticSearch Backend
|
||||
//
|
||||
// Connecting to [ElasticSearch](http://www.elasticsearch.org/)
|
||||
// Connecting to [ElasticSearch](http://www.elasticsearch.org/).
|
||||
//
|
||||
// To use this backend ensure your Dataset has a elasticsearch_url,
|
||||
// webstore_url or url attribute (used in that order)
|
||||
// To use this backend ensure your Dataset has one of the following
|
||||
// attributes (first one found is used):
|
||||
//
|
||||
// <pre>
|
||||
// elasticsearch_url
|
||||
// webstore_url
|
||||
// url
|
||||
// </pre>
|
||||
//
|
||||
// This should point to the ES type url. E.G. for ES running on
|
||||
// localhost:9200 with index twitter and type tweet it would be
|
||||
//
|
||||
// <pre>http://localhost:9200/twitter/tweet</pre>
|
||||
my.ElasticSearch = Backbone.Model.extend({
|
||||
_getESUrl: function(dataset) {
|
||||
var out = dataset.get('elasticsearch_url');
|
||||
|
||||
@@ -4,15 +4,12 @@ this.recline.Backend = this.recline.Backend || {};
|
||||
(function($, my) {
|
||||
// ## Memory Backend - uses in-memory data
|
||||
//
|
||||
// This is very artificial and is really only designed for testing
|
||||
// purposes.
|
||||
//
|
||||
// To use it you should provide in your constructor data:
|
||||
//
|
||||
// * metadata (including fields array)
|
||||
// * documents: list of hashes, each hash being one doc. A doc *must* have an id attribute which is unique.
|
||||
//
|
||||
// Example:
|
||||
// Example:
|
||||
//
|
||||
// <pre>
|
||||
// // Backend setup
|
||||
@@ -29,7 +26,7 @@ this.recline.Backend = this.recline.Backend || {};
|
||||
// ]
|
||||
// });
|
||||
// // later ...
|
||||
// var dataset = Dataset({id: 'my-id'});
|
||||
// var dataset = Dataset({id: 'my-id'}, 'memory');
|
||||
// dataset.fetch();
|
||||
// etc ...
|
||||
// </pre>
|
||||
|
||||
@@ -220,7 +220,8 @@ my.DataGrid = Backbone.View.extend({
|
||||
// ## DataGridRow View for rendering an individual document.
|
||||
//
|
||||
// Since we want this to update in place it is up to creator to provider the element to attach to.
|
||||
// In addition you must pass in a fields in the constructor options. This should be list of fields for the DataGrid.
|
||||
//
|
||||
// In addition you *must* pass in a FieldList in the constructor options. This should be list of fields for the DataGrid.
|
||||
//
|
||||
// Additional options can be passed in a second hash argument. Options:
|
||||
//
|
||||
@@ -229,6 +230,19 @@ my.DataGrid = Backbone.View.extend({
|
||||
// corresponding field object and document is the document object. Note
|
||||
// that implementing functions can ignore arguments (e.g.
|
||||
// function(value) would be a valid cellRenderer function).
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// <pre>
|
||||
// var row = new DataGridRow({
|
||||
// model: dataset-document,
|
||||
// el: dom-element,
|
||||
// fields: mydatasets.fields // a FieldList object
|
||||
// }, {
|
||||
// cellRenderer: my-cell-renderer-function
|
||||
// }
|
||||
// );
|
||||
// </pre>
|
||||
my.DataGridRow = Backbone.View.extend({
|
||||
initialize: function(initData, options) {
|
||||
_.bindAll(this, 'render');
|
||||
@@ -280,9 +294,8 @@ my.DataGridRow = Backbone.View.extend({
|
||||
return this;
|
||||
},
|
||||
|
||||
// Cell Editor
|
||||
// ===========
|
||||
|
||||
// ===================
|
||||
// Cell Editor methods
|
||||
onEditClick: function(e) {
|
||||
var editing = this.el.find('.data-table-cell-editor-editor');
|
||||
if (editing.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user