Mercurial > xmpp-account-manager
diff util.js @ 15:3eed9fe0bd7c
End spinners with either a green ✔ or a red ✘.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 22 Dec 2018 18:38:27 +0100 |
parents | 5e97e1808a35 |
children | 07543f7f5e89 |
line wrap: on
line diff
--- a/util.js +++ b/util.js @@ -41,3 +41,25 @@ function configurePEPField(node, key, va .up() .up(); } + +function displaySpinner(spinner) { + spinner.src = 'spinner.svg'; + spinner.hidden = false; +} + +function spinnerOk(spinner) { + spinner.src = 'ok.svg'; + spinner.hidden = false; + setTimeout(function () { + spinner.hidden = true; + }, 1000); +} + +function spinnerError(spinner) { + spinner.src = 'error.svg'; + spinner.hidden = false; +} + +function hideSpinner(spinner) { + spinner.hidden = true; +}