szurubooru/client/js/views/empty_view.js
rr- 5053598a13 client/views: extract empty view
...so that UsersController doesn't mess with DOM.
2016-04-09 22:39:13 +02:00

18 lines
416 B
JavaScript

'use strict';
const views = require('../util/views.js');
class EmptyView {
constructor() {
this.template = views.htmlToDom('<div class="messages"></div>');
}
render(ctx) {
const target = document.getElementById('content-holder');
const source = this.template;
views.listenToMessages(target);
views.showView(target, source);
}
}
module.exports = EmptyView;