summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authormichag86 <micha_g@arcor.de>2015-12-07 09:48:54 +0100
committermichag86 <micha_g@arcor.de>2015-12-07 09:48:54 +0100
commitcf0d163a32204442a6345bad8853f7eaaa033a61 (patch)
tree90a5d95d80481ca1b48f94f46a58e0df6f527521 /settings
parent884946276e13e7949cb2a5a46fd29d342ff386d4 (diff)
downloadnextcloud-server-cf0d163a32204442a6345bad8853f7eaaa033a61.tar.gz
nextcloud-server-cf0d163a32204442a6345bad8853f7eaaa033a61.zip
reset mailadress/displayname on blur
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/users.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index aeecac7b243..68dca440516 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -694,6 +694,8 @@ $(document).ready(function () {
}
}
);
+ var displayName = $input.val();
+ $tr.data('displayname', displayName);
$input.blur();
} else {
$input.blur();
@@ -701,8 +703,7 @@ $(document).ready(function () {
}
})
.blur(function () {
- var displayName = $input.val();
- $tr.data('displayname', displayName);
+ var displayName = $tr.data('displayname');
$input.replaceWith('<span>' + escapeHTML(displayName) + '</span>');
$td.find('img').show();
});
@@ -721,6 +722,7 @@ $(document).ready(function () {
.keypress(function (event) {
if (event.keyCode === 13) {
if ($(this).val().length > 0) {
+ $tr.data('mailAddress', $input.val());
$input.blur();
$.ajax({
type: 'PUT',
@@ -740,7 +742,7 @@ $(document).ready(function () {
}
})
.blur(function () {
- var mailAddress = $input.val();
+ var mailAddress = $tr.data('mailAddress');
var $span = $('<span>').text(mailAddress);
$tr.data('mailAddress', mailAddress);
$input.replaceWith($span);