Merge pull request #10833 from nextcloud/fix_8623

Re-enable upload button after updating Avatar fixes #8623
This commit is contained in:
Morris Jobke 2018-09-27 17:27:12 +02:00 committed by GitHub
commit c367f95afa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -67,6 +67,7 @@ function updateAvatar (hidedefault) {
$('#removeavatar').removeClass('hidden').addClass('inlineblock');
}
}, user.displayName);
$('#uploadavatar').prop('disabled', false);
}
function showAvatarCropper () {
@ -308,7 +309,7 @@ $(document).ready(function () {
function (path) {
$('#displayavatar img').hide();
$('#displayavatar .avatardiv').addClass('icon-loading');
$('#uploadavatar').prop('disabled', true)
$('#uploadavatar').prop('disabled', true);
$.ajax({
type: "POST",
url: OC.generateUrl('/avatar/'),
@ -348,7 +349,7 @@ $(document).ready(function () {
$('#abortcropperbutton').click(function () {
$('#displayavatar .avatardiv').removeClass('icon-loading');
$('#displayavatar img').show();
$('#uploadavatar').prop('disabled', false)
$('#uploadavatar').prop('disabled', false);
cleanCropper();
});