X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/11ffa88b49ac21b7000746a5a75ec5528461a0ae..a6919c029590f1b93e156264b063f2a9bbcff8dc:/src/editor/modules/rng/documentSummary.js diff --git a/src/editor/modules/rng/documentSummary.js b/src/editor/modules/rng/documentSummary.js index 211037d..8e6927d 100644 --- a/src/editor/modules/rng/documentSummary.js +++ b/src/editor/modules/rng/documentSummary.js @@ -8,16 +8,19 @@ var $ = require('libs/jquery'), var view = { - dom: $('
'), - init: function(config) { + dom: $(''), + 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) {