mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Use modal.open_overlay() in drafts.js.
This commit is contained in:
@@ -362,6 +362,14 @@ exports.toggle = function () {
|
||||
|
||||
exports.launch = function () {
|
||||
exports.setup_page(function () {
|
||||
modals.open_overlay({
|
||||
name: 'drafts',
|
||||
overlay: $('#draft_overlay'),
|
||||
on_close: function () {
|
||||
hashchange.exit_modal();
|
||||
},
|
||||
});
|
||||
|
||||
$("#draft_overlay").addClass("show");
|
||||
var draft_list = drafts.draft_model.get();
|
||||
var draft_id_list = Object.getOwnPropertyNames(draft_list);
|
||||
@@ -377,11 +385,6 @@ exports.launch = function () {
|
||||
|
||||
$(function () {
|
||||
|
||||
function drafts_close_modal() {
|
||||
hashchange.exit_modal();
|
||||
}
|
||||
modals.set_close_handler("drafts", drafts_close_modal);
|
||||
|
||||
window.addEventListener("beforeunload", function () {
|
||||
exports.update_draft();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user