54e3099c56
- Controller lifetime is bound to route lifetime - View lifetime is bound to controller lifetime - Control lifetime is bound to view lifetime - Enhanced event dispatching - Enhanced responsiveness in some places - Views communicate user input to controllers via new event system
23 lines
569 B
JavaScript
23 lines
569 B
JavaScript
'use strict';
|
|
|
|
const views = require('../util/views.js');
|
|
|
|
class PostEditSidebarControl {
|
|
constructor(hostNode, post, postContentControl) {
|
|
this._hostNode = hostNode;
|
|
this._post = post;
|
|
this._postContentControl = postContentControl;
|
|
this._template = views.getTemplate('post-edit-sidebar');
|
|
|
|
this.install();
|
|
}
|
|
|
|
install() {
|
|
const sourceNode = this._template({
|
|
post: this._post,
|
|
});
|
|
views.replaceContent(this._hostNode, sourceNode);
|
|
}
|
|
};
|
|
|
|
module.exports = PostEditSidebarControl;
|