mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +00:00
Use modal.open_overlay() in settings/admin.
This commit is contained in:
@@ -83,7 +83,7 @@ exports.launch_page = function (tab) {
|
||||
$(".sidebar .ind-tab[data-tab-key='organization']").click();
|
||||
}
|
||||
|
||||
$("#settings_overlay_container").addClass("show");
|
||||
modals.open_settings();
|
||||
$active_tab.click();
|
||||
};
|
||||
|
||||
|
||||
@@ -40,6 +40,16 @@ exports.close_modal = function (name) {
|
||||
}
|
||||
};
|
||||
|
||||
exports.open_settings = function () {
|
||||
modals.open_overlay({
|
||||
name: 'settings',
|
||||
overlay: $("#settings_overlay_container"),
|
||||
on_close: function () {
|
||||
hashchange.exit_modal();
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
$(function () {
|
||||
$("body").on("click", ".overlay, .overlay .exit", function (e) {
|
||||
var $target = $(e.target);
|
||||
|
||||
@@ -41,11 +41,6 @@ $("body").ready(function () {
|
||||
});
|
||||
|
||||
$("body").on("click", "[data-sidebar-form-close]", close_sidebar);
|
||||
|
||||
function settings_close_modal() {
|
||||
hashchange.exit_modal();
|
||||
}
|
||||
modals.set_close_handler("settings", settings_close_modal);
|
||||
});
|
||||
|
||||
|
||||
@@ -92,7 +87,8 @@ exports.launch_page = function (tab) {
|
||||
$(".sidebar .ind-tab[data-tab-key='settings']").click();
|
||||
}
|
||||
|
||||
$("#settings_overlay_container").addClass("show");
|
||||
modals.open_settings();
|
||||
|
||||
$active_tab.click();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user