Commit 387a3576 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'mw-replace-fa-icons-custom-notifications' into 'master'

Replace fa-check icon in custom notifications

See merge request gitlab-org/gitlab!47288
parents 9d6f2a17 dbe83fc6
...@@ -22,12 +22,8 @@ export default class NotificationsForm { ...@@ -22,12 +22,8 @@ export default class NotificationsForm {
// eslint-disable-next-line class-methods-use-this // eslint-disable-next-line class-methods-use-this
showCheckboxLoadingSpinner($parent) { showCheckboxLoadingSpinner($parent) {
$parent $parent.find('.is-loading').removeClass('gl-display-none');
.addClass('is-loading') $parent.find('.is-done').addClass('gl-display-none');
.find('.custom-notification-event-loading')
.removeClass('fa-check')
.addClass('spinner align-middle')
.removeClass('is-done');
} }
saveEvent($checkbox, $parent) { saveEvent($checkbox, $parent) {
...@@ -39,14 +35,11 @@ export default class NotificationsForm { ...@@ -39,14 +35,11 @@ export default class NotificationsForm {
.then(({ data }) => { .then(({ data }) => {
$checkbox.enable(); $checkbox.enable();
if (data.saved) { if (data.saved) {
$parent $parent.find('.is-loading').addClass('gl-display-none');
.find('.custom-notification-event-loading') $parent.find('.is-done').removeClass('gl-display-none');
.toggleClass('spinner fa-check is-done align-middle');
setTimeout(() => { setTimeout(() => {
$parent $parent.find('.is-done').addClass('gl-display-none');
.removeClass('is-loading')
.find('.custom-notification-event-loading')
.toggleClass('spinner fa-check is-done align-middle');
}, 2000); }, 2000);
} }
}) })
......
...@@ -993,23 +993,6 @@ pre.light-well { ...@@ -993,23 +993,6 @@ pre.light-well {
} }
} }
.custom-notifications-form {
.is-loading {
.custom-notification-event-loading {
display: inline-block;
}
}
}
.custom-notification-event-loading {
display: none;
margin-left: 5px;
&.is-done {
color: $green-600;
}
}
.project-refs-form .dropdown-menu, .project-refs-form .dropdown-menu,
.dropdown-menu-projects { .dropdown-menu-projects {
width: 300px; width: 300px;
......
...@@ -30,4 +30,5 @@ ...@@ -30,4 +30,5 @@
%label.form-check-label{ for: field_id } %label.form-check-label{ for: field_id }
%strong %strong
= notification_event_name(event) = notification_event_name(event)
.fa.custom-notification-event-loading.spinner %span.spinner.is-loading.gl-vertical-align-middle.gl-display-none
= sprite_icon('check', css_class: 'is-done gl-display-none gl-vertical-align-middle gl-text-green-600')
---
title: Replace fa-check icon in custom notifications
merge_request: 47288
author:
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment