[model,refactor][m]: (refs #6, refs #10) get rid of DocumentSet merging its functionality into Dataset.
* In addition fully remove remaining references in models (in getRows and getLength functions) to form of backend (this should have been in previous commit).
This commit is contained in:
@@ -14,12 +14,15 @@ recline.DataTable = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
var that = this;
|
||||
this.model.fetch().then(function() {
|
||||
that.render()
|
||||
that.model.getRows().then(function(rows) {
|
||||
that._currentRows = rows;
|
||||
that.render()
|
||||
});
|
||||
})
|
||||
},
|
||||
toTemplateJSON: function() {
|
||||
var modelData = this.model.toJSON()
|
||||
modelData.rows = _.map(modelData.rows, function(row) {
|
||||
modelData.rows = _.map(this._currentRows, function(row) {
|
||||
var cellData = _.map(modelData.headers, function(header) {
|
||||
return {header: header, value: row[header]}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user