mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
modals: Use selectors for open_modal/close_modal.
When reading the calling code, it's helpful to know
that we're really just passing in a selector. The
calls to open_modal/close_modal are nicer now to
reconcile with surrounding code, and you don't have
to guess whether the parameter is some kind of
"key" value--it really just refers directly to a DOM
element.
There is nothing user-visible about this change, but
the blueslip info messages now include the hash:
open modal: open #change_email_modal
This commit is contained in:
@@ -51,7 +51,7 @@ exports.launch = function (conf) {
|
||||
// Close any existing modals--on settings screens you can
|
||||
// have multiple buttons that need confirmation.
|
||||
if (overlays.is_modal_open()) {
|
||||
overlays.close_modal('confirm_dialog_modal');
|
||||
overlays.close_modal('#confirm_dialog_modal');
|
||||
}
|
||||
|
||||
confirm_dialog.find('.confirm_dialog_heading').html(conf.html_heading);
|
||||
@@ -63,7 +63,7 @@ exports.launch = function (conf) {
|
||||
|
||||
// Set up handlers.
|
||||
yes_button.on('click', function () {
|
||||
overlays.close_modal('confirm_dialog_modal');
|
||||
overlays.close_modal('#confirm_dialog_modal');
|
||||
conf.on_click();
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@ exports.launch = function (conf) {
|
||||
});
|
||||
|
||||
// Open the modal
|
||||
overlays.open_modal('confirm_dialog_modal');
|
||||
overlays.open_modal('#confirm_dialog_modal');
|
||||
};
|
||||
|
||||
window.confirm_dialog = exports;
|
||||
|
||||
Reference in New Issue
Block a user