refactor: Use explicit path when referencing handlebars templates.

This commit is contained in:
Thomas Ip
2019-06-29 12:20:19 +08:00
committed by Tim Abbott
parent 8c199fd44c
commit f6aaf43029
28 changed files with 120 additions and 125 deletions

View File

@@ -285,7 +285,7 @@ exports.activate = function (opts) {
}
function build_widget() {
var html = templates.render('poll-widget');
var html = templates.render('widgets/poll-widget');
elem.html(html);
elem.find('input.poll-question').on('keyup', function (e) {
@@ -346,7 +346,7 @@ exports.activate = function (opts) {
function render_results() {
var widget_data = poll_data.get_widget_data();
var html = templates.render('poll-widget-results', widget_data);
var html = templates.render('widgets/poll-widget-results', widget_data);
elem.find('ul.poll-widget').html(html);
elem.find("button.poll-vote").off('click').on('click', function (e) {