summaryrefslogtreecommitdiffstats
path: root/settings/js/users
diff options
context:
space:
mode:
authormichag86 <micha_g@arcor.de>2014-10-07 10:44:36 +0200
committermichag86 <micha_g@arcor.de>2014-10-07 10:44:36 +0200
commitf4a2ddbe31e7cb54dca7dcb487c827391d238e3a (patch)
tree5e8fe2b02b705c7fed2e4d2da098cd5da5e43f91 /settings/js/users
parent2849c75646234725b2edf3f9485ddd8294174878 (diff)
downloadnextcloud-server-f4a2ddbe31e7cb54dca7dcb487c827391d238e3a.tar.gz
nextcloud-server-f4a2ddbe31e7cb54dca7dcb487c827391d238e3a.zip
variable for found avatar div
Diffstat (limited to 'settings/js/users')
-rw-r--r--settings/js/users/users.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index f7948192500..ed9999760a9 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -616,15 +616,16 @@ $(document).ready(function () {
.keypress(function (event) {
if (event.keyCode === 13) {
if ($(this).val().length > 0) {
- if ($tr.find('div.avatardiv').length) {
- $tr.find('.avatardiv').imageplaceholder(uid, displayName);
+ $div = $tr.find('div.avatardiv')
+ if ($div.length) {
+ $div.imageplaceholder(uid, displayName);
}
$.post(
OC.filePath('settings', 'ajax', 'changedisplayname.php'),
{username: uid, displayName: $(this).val()},
function (result) {
- if (result && result.status==='success' && $tr.find('div.avatardiv').length){
- $tr.find('.avatardiv').avatar(result.data.username, 32);
+ if (result && result.status==='success' && $div.length){
+ $div.avatar(result.data.username, 32);
}
}
);