diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-02-07 10:58:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 10:58:20 +0100 |
commit | fc18116715e62f777074111a8d7a3a52601c2cef (patch) | |
tree | a2b25bf3396c8e5aa667423a2095e1662fdb58ab /core | |
parent | 2be1a6a04e024c93cda059fafa2b1fa405c86f44 (diff) | |
parent | dd919668cb2b85ec7a35782b0e5a2b64eed14e30 (diff) | |
download | nextcloud-server-fc18116715e62f777074111a8d7a3a52601c2cef.tar.gz nextcloud-server-fc18116715e62f777074111a8d7a3a52601c2cef.zip |
Merge pull request #18897 from nextcloud/bugfix/noid/no-more-jquery
No more jQuery
Diffstat (limited to 'core')
-rw-r--r-- | core/js/publicshareauth.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/core/js/publicshareauth.js b/core/js/publicshareauth.js index 7f3f0d0a7d4..af061954506 100644 --- a/core/js/publicshareauth.js +++ b/core/js/publicshareauth.js @@ -1,9 +1,11 @@ -$(document).ready(function(){ - $('#password').on('keyup input change', function() { - if ($('#password').val().length > 0) { - $('#password-submit').prop('disabled', false); - } else { - $('#password-submit').prop('disabled', true); - } - }); +document.addEventListener('DOMContentLoaded', function() { + var passwordInput = document.getElementById('password'); + var passwordButton = document.getElementById('password-submit'); + var eventListener = function() { + passwordButton.disabled = passwordInput.value.length === 0; + }; + + passwordInput.addEventListener('click', eventListener); + passwordInput.addEventListener('keyup', eventListener); + passwordInput.addEventListener('change', eventListener); }); |