2016-06-06 20:57:22 +02:00
|
|
|
'use strict';
|
|
|
|
|
2016-06-17 20:25:44 +02:00
|
|
|
const events = require('../events.js');
|
2016-06-06 20:57:22 +02:00
|
|
|
const views = require('../util/views.js');
|
|
|
|
|
2016-06-17 20:25:44 +02:00
|
|
|
const template = views.getTemplate('post-edit-sidebar');
|
|
|
|
|
|
|
|
class PostEditSidebarControl extends events.EventTarget {
|
2016-06-06 20:57:22 +02:00
|
|
|
constructor(hostNode, post, postContentControl) {
|
2016-06-17 20:25:44 +02:00
|
|
|
super();
|
2016-06-06 20:57:22 +02:00
|
|
|
this._hostNode = hostNode;
|
|
|
|
this._post = post;
|
|
|
|
this._postContentControl = postContentControl;
|
|
|
|
|
2016-06-17 20:25:44 +02:00
|
|
|
views.replaceContent(this._hostNode, template({
|
2016-06-06 20:57:22 +02:00
|
|
|
post: this._post,
|
2016-06-17 20:25:44 +02:00
|
|
|
}));
|
2016-06-06 20:57:22 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = PostEditSidebarControl;
|