Commit 50fc2be2 authored by gijs's avatar gijs

Propagate tag change to treeview

parent 7103a980
......@@ -1229,6 +1229,7 @@ window.W = window.W || {};
m.set('tag', data['tag']);
}
});
model.collection.trigger('change:tag');
}
this.trigger('change');
......@@ -1504,6 +1505,10 @@ window.W = window.W || {};
template: '#node-tree-template',
childViewContainer: 'ol',
initialize: function () {
this.listenTo(this.collection, 'change:tag', this.updateTag);
},
childView: function (model) {
if (model instanceof W.LinkModel) {
return W.TreeNodeLink;
......@@ -1529,6 +1534,9 @@ window.W = window.W || {};
}
},
updateTag: function () {
this.el.dataset.tag = this.collection.first().get('tag');
},
templateContext: function () {
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment