refactor(ujs): remove ujs spinner

This commit is contained in:
Paul Chavard 2022-09-29 12:28:42 +02:00 committed by simon lehericey
parent a5d78fea1a
commit 582ba7a16e
2 changed files with 0 additions and 14 deletions

View file

@ -15,7 +15,6 @@ import { registerControllers } from '../shared/stimulus-loader';
import '../new_design/form-validation'; import '../new_design/form-validation';
import '../new_design/procedure-context'; import '../new_design/procedure-context';
import '../new_design/procedure-form'; import '../new_design/procedure-form';
import '../new_design/spinner';
import '../new_design/support'; import '../new_design/support';
import { import {

View file

@ -1,13 +0,0 @@
import { show, hide, delegate } from '@utils';
function showSpinner() {
[...document.querySelectorAll('.spinner')].forEach(show);
}
function hideSpinner() {
[...document.querySelectorAll('.spinner')].forEach(hide);
}
delegate('ajax:complete', '[data-spinner]', hideSpinner);
delegate('ajax:stopped', '[data-spinner]', hideSpinner);
delegate('ajax:send', '[data-spinner]', showSpinner);