var view = {
- dom: $('<div class="documentSummary"></div>'),
- init: function(config) {
+ dom: $('<ul></ul>'),
+ init: function(config, doc) {
this.config = config;
+ this.doc = doc;
this.template = _.template(template);
+
+ this.doc.on('propertyChanged', this.render, this);
},
- render: function(properties) {
+ render: function() {
this.dom.html(this.template({
title: this.config.title,
properties: this.config.properties,
- propertyValues: properties
+ propertyValues: this.doc.properties
}));
},
setDraftField: function(value) {