js: Convert static/js/feedback_widget.js to ES6 module.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-02-10 07:47:06 -08:00
committed by Tim Abbott
parent a175826a5a
commit a17ce6aeee
7 changed files with 13 additions and 14 deletions

View File

@@ -1,6 +1,4 @@
"use strict";
const render_feedback_container = require("../templates/feedback_container.hbs");
import render_feedback_container from "../templates/feedback_container.hbs";
/*
@@ -104,15 +102,15 @@ function set_up_handlers() {
});
}
exports.is_open = function () {
export function is_open() {
return meta.opened;
};
}
exports.dismiss = function () {
export function dismiss() {
animate.fadeOut();
};
}
exports.show = function (opts) {
export function show(opts) {
if (!opts.populate) {
blueslip.error("programmer needs to supply populate callback.");
return;
@@ -135,6 +133,4 @@ exports.show = function (opts) {
opts.populate(meta.$container.find(".feedback_content"));
animate.fadeIn();
};
window.feedback_widget = exports;
}