[#25,view,refactor][s]: get views working with new field setup (fixes #25).

* One nastiness along the way (30m delay!) that is worth noting: flot graph was a problem because it turned out that a) (re-)render triggered by dataset attributes change and fields only got set *after* core dataset attributes and so info was rendering.
* model.test.js: basic test for Dataset.toTemplateJSON
This commit is contained in:
Rufus Pollock
2012-02-18 09:05:01 +00:00
parent 25c0177097
commit 4074f380d8
5 changed files with 24 additions and 16 deletions

View File

@@ -61,6 +61,7 @@ my.Dataset = Backbone.Model.extend({
toTemplateJSON: function() {
var data = this.toJSON();
data.docCount = this.docCount;
data.fields = this.fields.toJSON();
return data;
}
});