mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
js: Convert static/js/feedback_widget.js to ES6 module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
a175826a5a
commit
a17ce6aeee
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user