diff options
author | Joas Schilling <coding@schilljs.com> | 2020-01-14 18:59:18 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-02-06 20:41:42 +0100 |
commit | dd919668cb2b85ec7a35782b0e5a2b64eed14e30 (patch) | |
tree | 20af122829df39b9b43b112ee01b904463f39652 /core/js/publicshareauth.js | |
parent | d2d7e37b7bf00ea7929da02459e4abb8640d064a (diff) | |
download | nextcloud-server-dd919668cb2b85ec7a35782b0e5a2b64eed14e30.tar.gz nextcloud-server-dd919668cb2b85ec7a35782b0e5a2b64eed14e30.zip |
No more jQuery
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/js/publicshareauth.js')
-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); }); |