Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
modals: Remove `data-dismiss` usage and update cancel actions.
Maneesh Shuklad2a9b5dda52b
diff --git a/web/src/stream_settings_ui.ts b/web/src/stream_settings_ui.tsindex 6fd0a068b5e..3ca7f27bf6d 100644--- a/web/src/stream_settings_ui.ts+++ b/web/src/stream_settings_ui.ts@@ -1051,15 +1051,19 @@ export function initialize(): void {open_create_stream();});- $("#channels_overlay_container").on("click", "#stream_creation_form [data-dismiss]", (e) => {- e.preventDefault();- // we want to make sure that the click is not just a simulated- // click; this fixes an issue where hitting "Enter" would- // trigger this code path due to bootstrap magic.- if (e.clientY !== 0) {- stream_edit.open_edit_panel_empty();- }- });+ $("#channels_overlay_container").on(+ "click",+ "#stream_creation_form .create_stream_cancel",+ (e) => {+ e.preventDefault();+ // we want to make sure that the click is not just a simulated+ // click; this fixes an issue where hitting "Enter" would+ // trigger this code path due to bootstrap magic.+ if (e.clientY !== 0) {+ stream_edit.open_edit_panel_empty();+ }+ },+ );$("#channels_overlay_container").on("click", ".email-address", function (this: HTMLElement) {selectText(this);diff --git a/web/src/user_group_edit.ts b/web/src/user_group_edit.tsindex cd6aa4df053..6da9ce3206e 100644--- a/web/src/user_group_edit.ts+++ b/web/src/user_group_edit.ts@@ -1947,15 +1947,19 @@ export function initialize(): void {open_create_user_group();});- $("#groups_overlay_container").on("click", "#user_group_creation_form [data-dismiss]", (e) => {- e.preventDefault();- // we want to make sure that the click is not just a simulated- // click; this fixes an issue where hitting "Enter" would- // trigger this code path due to bootstrap magic.- if (e.clientY !== 0) {- open_right_panel_empty();- }- });+ $("#groups_overlay_container").on(+ "click",+ "#user_group_creation_form .create_user_group_cancel",+ (e) => {+ e.preventDefault();+ // we want to make sure that the click is not just a simulated+ // click; this fixes an issue where hitting "Enter" would+ // trigger this code path due to bootstrap magic.+ if (e.clientY !== 0) {+ open_right_panel_empty();+ }+ },+ );$("#groups_overlay_container").on("click", ".group-row", show_right_section);diff --git a/web/styles/settings.css b/web/styles/settings.cssindex cf5a1d960d1..4d02c652287 100644--- a/web/styles/settings.css+++ b/web/styles/settings.css@@ -268,12 +268,6 @@ h3,display: inline !important;}- /* Messy implementation of buttons with text and a pencil icon in them- having spacing before the pencil icon. */- button[data-dismiss="modal"] i.fa-pencil {- margin-left: 3px;- }-.hidden-email {font-style: italic;}diff --git a/web/templates/stream_settings/stream_creation_form.hbs b/web/templates/stream_settings/stream_creation_form.hbsindex ef58b42a444..3cf3b4d0552 100644--- a/web/templates/stream_settings/stream_creation_form.hbs+++ b/web/templates/stream_settings/stream_creation_form.hbs@@ -50,7 +50,7 @@<button id="stream_creation_go_to_configure_channel_settings" class="button small sea-green rounded hide">{{t "Back to settings" }}</button></div><div class="settings-sticky-footer-right">- <button class="create_stream_cancel button small white rounded" data-dismiss="modal">{{t "Cancel" }}</button>+ <button class="create_stream_cancel button small white rounded">{{t "Cancel" }}</button><button class="finalize_create_stream button small sea-green rounded hide" type="submit">{{t "Create" }}</button><button id="stream_creation_go_to_subscribers" class="button small sea-green rounded">{{t "Continue to add subscribers" }}</button></div>diff --git a/web/templates/user_group_settings/user_group_creation_form.hbs b/web/templates/user_group_settings/user_group_creation_form.hbsindex ba6caa68ac9..9f748afd35e 100644--- a/web/templates/user_group_settings/user_group_creation_form.hbs+++ b/web/templates/user_group_settings/user_group_creation_form.hbs@@ -49,7 +49,7 @@<button id="user_group_go_to_configure_settings" class="button small sea-green rounded hide">{{t "Back to settings" }}</button></div><div class="settings-sticky-footer-right">- <button class="create_user_group_cancel button small white rounded" data-dismiss="modal">{{t "Cancel" }}</button>+ <button class="create_user_group_cancel button small white rounded">{{t "Cancel" }}</button><button class="finalize_create_user_group button small sea-green rounded hide" type="submit">{{t "Create" }}</button><button id="user_group_go_to_members" class="button small sea-green rounded">{{t "Continue to add members" }}</button></div>