mirror of https://github.com/zulip/zulip.git
js: Convert static/js/message_edit_history.js to ES6 module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
03f61c1eb2
commit
fc57f087b7
|
@ -193,7 +193,6 @@
|
|||
"location": false,
|
||||
"markdown": false,
|
||||
"message_edit": false,
|
||||
"message_edit_history": false,
|
||||
"message_events": false,
|
||||
"message_fetch": false,
|
||||
"message_flags": false,
|
||||
|
|
|
@ -72,7 +72,6 @@ import "../stream_events";
|
|||
import "../stream_edit";
|
||||
import "../subs";
|
||||
import "../message_edit";
|
||||
import "../message_edit_history";
|
||||
import "../condense";
|
||||
import "../resize";
|
||||
import "../list_widget";
|
||||
|
|
|
@ -8,6 +8,7 @@ const WinChan = require("winchan");
|
|||
const render_buddy_list_tooltip = require("../templates/buddy_list_tooltip.hbs");
|
||||
const render_buddy_list_tooltip_content = require("../templates/buddy_list_tooltip_content.hbs");
|
||||
|
||||
const message_edit_history = require("./message_edit_history");
|
||||
const settings_panel_menu = require("./settings_panel_menu");
|
||||
const util = require("./util");
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ declare let local_message: any;
|
|||
declare let localstorage: any;
|
||||
declare let markdown: any;
|
||||
declare let message_edit: any;
|
||||
declare let message_edit_history: any;
|
||||
declare let message_events: any;
|
||||
declare let message_fetch: any;
|
||||
declare let message_flags: any;
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
"use strict";
|
||||
import render_message_edit_history from "../templates/message_edit_history.hbs";
|
||||
|
||||
import * as people from "./people";
|
||||
|
||||
const {format, isSameDay} = require("date-fns");
|
||||
|
||||
const render_message_edit_history = require("../templates/message_edit_history.hbs");
|
||||
|
||||
const people = require("./people");
|
||||
|
||||
exports.fetch_and_render_message_history = function (message) {
|
||||
export function fetch_and_render_message_history(message) {
|
||||
channel.get({
|
||||
url: "/json/messages/" + message.id + "/history",
|
||||
data: {message_id: JSON.stringify(message.id)},
|
||||
|
@ -67,12 +65,10 @@ exports.fetch_and_render_message_history = function (message) {
|
|||
);
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
exports.show_history = function (message) {
|
||||
export function show_history(message) {
|
||||
$("#message-history").html("");
|
||||
$("#message-edit-history").modal("show");
|
||||
exports.fetch_and_render_message_history(message);
|
||||
};
|
||||
|
||||
window.message_edit_history = exports;
|
||||
fetch_and_render_message_history(message);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const huddle_data = require("./huddle_data");
|
||||
const message_edit_history = require("./message_edit_history");
|
||||
const util = require("./util");
|
||||
|
||||
function maybe_add_narrowed_messages(messages, msg_list) {
|
||||
|
|
|
@ -17,6 +17,7 @@ const render_user_info_popover_title = require("../templates/user_info_popover_t
|
|||
const render_user_profile_modal = require("../templates/user_profile_modal.hbs");
|
||||
|
||||
const feature_flags = require("./feature_flags");
|
||||
const message_edit_history = require("./message_edit_history");
|
||||
const people = require("./people");
|
||||
const settings_config = require("./settings_config");
|
||||
const settings_data = require("./settings_data");
|
||||
|
|
Loading…
Reference in New Issue