Browse Source
No more jQuery
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/18897/head
Joas Schilling
6 years ago
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with
10 additions and
8 deletions
-
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); |
|
|
|
}); |