summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-11 12:15:01 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-11 12:15:01 +0100
commit4f860b7e0a5284eee90fdd93d6ec733a1559a1eb (patch)
tree98db87f407e6d3610c73f3cf4723b430f754285a /settings/js
parentf831d93f3f8aec6ef456f2675559cb5309a8fdb4 (diff)
parentcf0d163a32204442a6345bad8853f7eaaa033a61 (diff)
downloadnextcloud-server-4f860b7e0a5284eee90fdd93d6ec733a1559a1eb.tar.gz
nextcloud-server-4f860b7e0a5284eee90fdd93d6ec733a1559a1eb.zip
Merge pull request #20978 from owncloud/fix-dont-show-unsaved-values-in-usermgmt
reset mailadress/displayname on blur
Diffstat (limited to 'settings/js')
-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 2f8a964bafb..09056144558 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -698,6 +698,8 @@ $(document).ready(function () {
}
}
);
+ var displayName = $input.val();
+ $tr.data('displayname', displayName);
$input.blur();
} else {
$input.blur();
@@ -705,8 +707,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();
});
@@ -725,6 +726,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',
@@ -744,7 +746,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);