[model][m]: (fixes #6) create a BackendMemory (local data in memory) and refactor code to use this rather than current hard-coding-of-data approach.

This commit is contained in:
rgrp
2011-11-05 19:48:09 +00:00
parent bd52bb2c58
commit 21d9a1c2dc
4 changed files with 94 additions and 36 deletions

View File

@@ -13,10 +13,8 @@ recline.DataTable = Backbone.View.extend({
initialize: function() {
var that = this;
this.model.fetch({
success: function(collection, resp) {
that.render()
}
this.model.fetch().then(function() {
that.render()
})
},
toTemplateJSON: function() {
@@ -37,4 +35,4 @@ recline.DataTable = Backbone.View.extend({
$(this.el).html(htmls);
return this;
}
});
});