mirror of https://github.com/zulip/zulip.git
confirm_dialog: Make it usable outside settings.
* Currently, the confirm_dialog is used only in the settings pane, which already has the `new-style` class in the main `settings_overlay.hbs` file. So, the confirm modal is rendered correctly there. But to make it available for use outside of the settings pane, we add the `new-style` class to the confirm container itself, without which, the buttons look ugly. * The other change here is the click handler for removing the modal element. Previously, when the modal was closed (with any of the "yes"/"no"/"cross" buttons), there was a small time interval of around a second during which the modal had disappeared, but the background content was still in the faded-out state. This change fixes this glitch. This glitch was probably not noticable earlier, because the settings pane itself causes the background to be slightly faded out.
This commit is contained in:
parent
1cc6f6158e
commit
eb7b699ac9
|
@ -72,7 +72,7 @@ export function launch(conf) {
|
|||
conf.on_click();
|
||||
});
|
||||
|
||||
confirm_dialog.on("hide", () => {
|
||||
confirm_dialog.on("hidden.bs.modal", () => {
|
||||
confirm_dialog.remove();
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="modal modal-bg hide fade" id="confirm_dialog_modal" tabindex="-1" role="dialog" aria-labelledby="confirm_dialog_modal" aria-hidden="true">
|
||||
<div class="modal modal-bg new-style hide fade" id="confirm_dialog_modal" tabindex="-1" role="dialog" aria-labelledby="confirm_dialog_modal" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{t 'Close' }}"><span aria-hidden="true">×</span></button>
|
||||
<h3 class="confirm_dialog_heading"></h3>
|
||||
|
|
Loading…
Reference in New Issue