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 {
// eslint-disable-next-line class-methods-use-this
showCheckboxLoadingSpinner($parent) {
$parent
.addClass('is-loading')
.find('.custom-notification-event-loading')
.removeClass('fa-check')
.addClass('spinner align-middle')
.removeClass('is-done');
$parent.find('.is-loading').removeClass('gl-display-none');
$parent.find('.is-done').addClass('gl-display-none');
}
saveEvent($checkbox, $parent) {
......@@ -39,14 +35,11 @@ export default class NotificationsForm {
.then(({ data }) => {
$checkbox.enable();
if (data.saved) {
$parent
.find('.custom-notification-event-loading')
.toggleClass('spinner fa-check is-done align-middle');
$parent.find('.is-loading').addClass('gl-display-none');
$parent.find('.is-done').removeClass('gl-display-none');
setTimeout(() => {
$parent
.removeClass('is-loading')
.find('.custom-notification-event-loading')
.toggleClass('spinner fa-check is-done align-middle');
$parent.find('.is-done').addClass('gl-display-none');
}, 2000);
}
})
......
......@@ -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,
.dropdown-menu-projects {
width: 300px;
......
......@@ -30,4 +30,5 @@
%label.form-check-label{ for: field_id }
%strong
= 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