mirror of https://github.com/zulip/zulip.git
js: Convert static/js/confirm_dialog.js to ES6 module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
542a77f5d5
commit
db6e3a41d3
|
@ -131,7 +131,6 @@
|
|||
"compose_actions": false,
|
||||
"compose_ui": false,
|
||||
"composebox_typeahead": false,
|
||||
"confirm_dialog": false,
|
||||
"csrf_token": false,
|
||||
"current_msg_list": true,
|
||||
"dropdown_list_widget": false,
|
||||
|
|
|
@ -10,7 +10,9 @@ const {set_global, zrequire} = require("../zjsunit/namespace");
|
|||
const {run_test} = require("../zjsunit/test");
|
||||
const $ = require("../zjsunit/zjquery");
|
||||
|
||||
const confirm_dialog = set_global("confirm_dialog", {});
|
||||
const confirm_dialog = {__esModule: true};
|
||||
|
||||
rewiremock("../../static/js/confirm_dialog").with(confirm_dialog);
|
||||
|
||||
const noop = () => {};
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ import "../message_events";
|
|||
import "../server_events";
|
||||
import "../zulip";
|
||||
import "../templates";
|
||||
import "../confirm_dialog";
|
||||
import "../dropdown_list_widget";
|
||||
import "../settings_account";
|
||||
import "../settings_display";
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
"use strict";
|
||||
import render_confirm_dialog from "../templates/confirm_dialog.hbs";
|
||||
|
||||
const render_confirm_dialog = require("../templates/confirm_dialog.hbs");
|
||||
|
||||
const overlays = require("./overlays");
|
||||
import * as overlays from "./overlays";
|
||||
|
||||
/*
|
||||
Look for confirm_dialog in settings_user_groups
|
||||
|
@ -29,7 +27,7 @@ const overlays = require("./overlays");
|
|||
|
||||
*/
|
||||
|
||||
exports.launch = function (conf) {
|
||||
export function launch(conf) {
|
||||
const html = render_confirm_dialog();
|
||||
const confirm_dialog = $(html);
|
||||
|
||||
|
@ -77,6 +75,4 @@ exports.launch = function (conf) {
|
|||
|
||||
// Open the modal
|
||||
overlays.open_modal("#confirm_dialog_modal");
|
||||
};
|
||||
|
||||
window.confirm_dialog = exports;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ declare let bot_data: any;
|
|||
declare let compose_actions: any;
|
||||
declare let composebox_typeahead: any;
|
||||
declare let compose_ui: any;
|
||||
declare let confirm_dialog: any;
|
||||
declare let csrf_token: any;
|
||||
declare let current_msg_list: any;
|
||||
declare let emoji: any;
|
||||
|
|
|
@ -6,6 +6,7 @@ const render_admin_user_group_list = require("../templates/admin_user_group_list
|
|||
const render_confirm_delete_user = require("../templates/confirm_delete_user.hbs");
|
||||
|
||||
const channel = require("./channel");
|
||||
const confirm_dialog = require("./confirm_dialog");
|
||||
const people = require("./people");
|
||||
const pill_typeahead = require("./pill_typeahead");
|
||||
const ui_report = require("./ui_report");
|
||||
|
|
Loading…
Reference in New Issue