[Pkg-owncloud-commits] [owncloud] 22/63: reset mailadress/displayname on blur

David Prévot taffit at moszumanska.debian.org
Tue Dec 22 16:50:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8.0
in repository owncloud.

commit 2282ed373ab0dbc4c9940966a2fdd7c4249e62d7
Author: michag86 <micha_g at arcor.de>
Date:   Mon Dec 7 09:48:54 2015 +0100

    reset mailadress/displayname on blur
---
 settings/js/users/users.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 7034972..bb1e4db 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -703,6 +703,8 @@ $(document).ready(function () {
 								}
 							}
 						);
+						var displayName = $input.val();
+						$tr.data('displayname', displayName);
 						$input.blur();
 					} else {
 						$input.blur();
@@ -710,8 +712,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();
 			});
@@ -730,6 +731,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',
@@ -749,7 +751,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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list