mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add spinner and observer for loading screen
This commit is contained in:
parent
8e4e6c4f70
commit
1cc17a4af4
@ -13,6 +13,21 @@
|
|||||||
document.getElementById('payment-method-form').submit()
|
document.getElementById('payment-method-form').submit()
|
||||||
}, 2000);
|
}, 2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const target = document.getElementById('container');
|
||||||
|
|
||||||
|
const observer = new MutationObserver((mutationsList) => {
|
||||||
|
for (const mutation of mutationsList) {
|
||||||
|
if (mutation.type === 'childList' || mutation.type === 'subtree') {
|
||||||
|
setTimeout(() => {
|
||||||
|
document.getElementById('spinner').classList.add('hidden');
|
||||||
|
document.getElementById('container').classList.remove('hidden');
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
observer.observe(target, { childList: true, subtree: true })
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
Loading…
x
Reference in New Issue
Block a user