diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-10-26 23:08:52 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-10-26 23:08:52 +0200 |
commit | 71c74427907a8ce3372127c38d7568bc813c0f3e (patch) | |
tree | 8e3cb2b6fd5bfd827bf5ebae54ec7661487ed7dc /core/js/login | |
parent | 1d82bb55dbf9a8f12603570a7203ce80b818f443 (diff) | |
download | nextcloud-server-71c74427907a8ce3372127c38d7568bc813c0f3e.tar.gz nextcloud-server-71c74427907a8ce3372127c38d7568bc813c0f3e.zip |
The loading animation is back
Refactor grant.js to Vanilla JS
Remove id="submit" because of side effects: https://stackoverflow.com/questions/22982741/form-submit-jquery-does-not-work
Fix arrow for login flow v1
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'core/js/login')
-rw-r--r-- | core/js/login/grant.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/js/login/grant.js b/core/js/login/grant.js index c3c3371b17e..c8913f937bb 100644 --- a/core/js/login/grant.js +++ b/core/js/login/grant.js @@ -1,9 +1,10 @@ -jQuery(document).ready(function() { - $('#submit').click(function (e) { - $('#submit + .submit-icon') - .removeClass('icon-confirm-white') - .addClass(OCA.Theming && OCA.Theming.inverted - ? 'icon-loading-small' - : 'icon-loading-small-dark'); +document.querySelector('form').addEventListener('submit', function(e) { + const wrapper = document.getElementById('submit-wrapper') + if (wrapper === null) { + return + } + wrapper.getElementsByClassName('icon-confirm-white').forEach(function(el) { + el.classList.remove('icon-confirm-white') + el.classList.add(OCA.Theming && OCA.Theming.inverted ? 'icon-loading-small' : 'icon-loading-small-dark') }) -})
\ No newline at end of file +}) |