mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Use modal.open_overlay() in lightbox.js.
This commit is contained in:
@@ -101,7 +101,18 @@ exports.open = function (image) {
|
||||
}
|
||||
}
|
||||
|
||||
$("#lightbox_overlay").addClass("show");
|
||||
function lightbox_close_modal() {
|
||||
$(".player-container iframe").remove();
|
||||
lightbox.is_open = false;
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
modals.open_overlay({
|
||||
name: 'lightbox',
|
||||
overlay: $("#lightbox_overlay"),
|
||||
on_close: lightbox_close_modal,
|
||||
});
|
||||
|
||||
popovers.hide_all();
|
||||
lightbox.is_open = true;
|
||||
};
|
||||
@@ -184,14 +195,6 @@ $(function () {
|
||||
}
|
||||
});
|
||||
|
||||
function lightbox_close_modal() {
|
||||
$(".player-container iframe").remove();
|
||||
lightbox.is_open = false;
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
modals.set_close_handler("lightbox", lightbox_close_modal);
|
||||
|
||||
});
|
||||
|
||||
return exports;
|
||||
|
||||
Reference in New Issue
Block a user