|
|
|
@ -616,12 +616,14 @@ $(document).ready(function () { |
|
|
|
|
.keypress(function (event) { |
|
|
|
|
if (event.keyCode === 13) { |
|
|
|
|
if ($(this).val().length > 0) { |
|
|
|
|
$tr.find('.avatardiv').imageplaceholder(uid, displayName); |
|
|
|
|
if ($tr.find('div.avatardiv').length) { |
|
|
|
|
$tr.find('.avatardiv').imageplaceholder(uid, displayName); |
|
|
|
|
} |
|
|
|
|
$.post( |
|
|
|
|
OC.filePath('settings', 'ajax', 'changedisplayname.php'), |
|
|
|
|
{username: uid, displayName: $(this).val()}, |
|
|
|
|
function (result) { |
|
|
|
|
if (result && result.status==='success'){ |
|
|
|
|
if (result && result.status==='success' && $tr.find('div.avatardiv').length){ |
|
|
|
|
$tr.find('.avatardiv').avatar(result.data.username, 32); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|