[whitespace][xs]: whitespace.
This commit is contained in:
41
src/model.js
41
src/model.js
@@ -3,13 +3,14 @@ this.recline = this.recline || {};
|
|||||||
this.recline.Model = this.recline.Model || {};
|
this.recline.Model = this.recline.Model || {};
|
||||||
|
|
||||||
(function($, my) {
|
(function($, my) {
|
||||||
// ## A Dataset model
|
|
||||||
//
|
// ## A Dataset model
|
||||||
// Other than standard list of Backbone methods it has two important attributes:
|
//
|
||||||
//
|
// Other than standard list of Backbone methods it has two important attributes:
|
||||||
// * currentDocuments: a DocumentList containing the Documents we have currently loaded for viewing (you update currentDocuments by calling getRows)
|
//
|
||||||
// * docCount: total number of documents in this dataset (obtained on a fetch for this Dataset)
|
// * currentDocuments: a DocumentList containing the Documents we have currently loaded for viewing (you update currentDocuments by calling getRows)
|
||||||
my.Dataset = Backbone.Model.extend({
|
// * docCount: total number of documents in this dataset (obtained on a fetch for this Dataset)
|
||||||
|
my.Dataset = Backbone.Model.extend({
|
||||||
__type__: 'Dataset',
|
__type__: 'Dataset',
|
||||||
initialize: function(model, backend) {
|
initialize: function(model, backend) {
|
||||||
this.backend = backend;
|
this.backend = backend;
|
||||||
@@ -63,25 +64,25 @@ this.recline.Model = this.recline.Model || {};
|
|||||||
data.docCount = this.docCount;
|
data.docCount = this.docCount;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// ## A Document (aka Row)
|
// ## A Document (aka Row)
|
||||||
//
|
//
|
||||||
// A single entry or row in the dataset
|
// A single entry or row in the dataset
|
||||||
my.Document = Backbone.Model.extend({
|
my.Document = Backbone.Model.extend({
|
||||||
__type__: 'Document'
|
__type__: 'Document'
|
||||||
});
|
});
|
||||||
|
|
||||||
// ## A Backbone collection of Documents
|
// ## A Backbone collection of Documents
|
||||||
my.DocumentList = Backbone.Collection.extend({
|
my.DocumentList = Backbone.Collection.extend({
|
||||||
__type__: 'DocumentList',
|
__type__: 'DocumentList',
|
||||||
model: my.Document
|
model: my.Document
|
||||||
});
|
});
|
||||||
|
|
||||||
// ## Backend registry
|
// ## Backend registry
|
||||||
//
|
//
|
||||||
// Backends will register themselves by id into this registry
|
// Backends will register themselves by id into this registry
|
||||||
my.backends = {};
|
my.backends = {};
|
||||||
|
|
||||||
}(jQuery, this.recline.Model));
|
}(jQuery, this.recline.Model));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user