[Pkg-owncloud-commits] [owncloud] 43/165: Revert "make jshint happy"

David Prévot taffit at moszumanska.debian.org
Thu Apr 23 04:06:22 UTC 2015


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

taffit pushed a commit to branch stable8
in repository owncloud.

commit ae681f0061f534b48b45cf9a41f6110c0ff20b1d
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Fri Apr 17 18:02:08 2015 +0200

    Revert "make jshint happy"
    
    This reverts commit a255866a937d906dbbe0ed46aa7394326b30e4f5.
---
 apps/encryption/js/settings-admin.js    | 19 ++++++++-----------
 apps/encryption/js/settings-personal.js | 18 +++++++++---------
 2 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/apps/encryption/js/settings-admin.js b/apps/encryption/js/settings-admin.js
index bb539f6..36765ad 100644
--- a/apps/encryption/js/settings-admin.js
+++ b/apps/encryption/js/settings-admin.js
@@ -12,20 +12,17 @@ $(document).ready(function(){
 	$( 'input:radio[name="adminEnableRecovery"]' ).change(
 		function() {
 			var recoveryStatus = $( this ).val();
-			var oldStatus = (1+parseInt(recoveryStatus, 10)) % 2;
+			var oldStatus = (1+parseInt(recoveryStatus)) % 2;
 			var recoveryPassword = $( '#encryptionRecoveryPassword' ).val();
 			var confirmPassword = $( '#repeatEncryptionRecoveryPassword' ).val();
 			OC.msg.startSaving('#encryptionSetRecoveryKey .msg');
 			$.post(
-				OC.generateUrl('/apps/encryption/ajax/adminRecovery'),
-				{ adminEnableRecovery: recoveryStatus,
-					recoveryPassword: recoveryPassword,
-					confirmPassword: confirmPassword },
-				function( result ) {
+				OC.generateUrl('/apps/encryption/ajax/adminRecovery')
+				, { adminEnableRecovery: recoveryStatus, recoveryPassword: recoveryPassword, confirmPassword: confirmPassword }
+				,  function( result ) {
 					OC.msg.finishedSaving('#encryptionSetRecoveryKey .msg', result);
 					if (result.status === "error") {
-						$('input:radio[name="adminEnableRecovery"][value="'+oldStatus.toString()+'"]')
-							.attr("checked", "true");
+						$('input:radio[name="adminEnableRecovery"][value="'+oldStatus.toString()+'"]').attr("checked", "true");
 					} else {
 						if (recoveryStatus === "0") {
 							$('p[name="changeRecoveryPasswordBlock"]').addClass("hidden");
@@ -47,9 +44,9 @@ $(document).ready(function(){
 		var confirmNewPassword = $('#repeatedNewEncryptionRecoveryPassword').val();
 		OC.msg.startSaving('#encryptionChangeRecoveryKey .msg');
 		$.post(
-				OC.generateUrl('/apps/encryption/ajax/changeRecoveryPassword'),
-			{ oldPassword: oldRecoveryPassword, newPassword: newRecoveryPassword, confirmPassword: confirmNewPassword },
-			function( data ) {
+				OC.generateUrl('/apps/encryption/ajax/changeRecoveryPassword')
+			, { oldPassword: oldRecoveryPassword, newPassword: newRecoveryPassword, confirmPassword: confirmNewPassword }
+			,  function( data ) {
 					OC.msg.finishedSaving('#encryptionChangeRecoveryKey .msg', data);
 				}
 		);
diff --git a/apps/encryption/js/settings-personal.js b/apps/encryption/js/settings-personal.js
index 21a7e66..dcfbba4 100644
--- a/apps/encryption/js/settings-personal.js
+++ b/apps/encryption/js/settings-personal.js
@@ -4,14 +4,14 @@
  * See the COPYING-README file.
  */
 
-function updatePrivateKeyPassword() {
+function updatePrivateKeyPasswd() {
 	var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val();
 	var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val();
 	OC.msg.startSaving('#encryption .msg');
 	$.post(
-	OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword'),
-		{ oldPassword: oldPrivateKeyPassword, newPassword: newPrivateKeyPassword },
-		function( data ) {
+	OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword')
+		, { oldPassword: oldPrivateKeyPassword, newPassword: newPrivateKeyPassword }
+		,  function( data ) {
 			if (data.status === "error") {
 				OC.msg.finishedSaving('#encryption .msg', data);
 			} else {
@@ -29,9 +29,9 @@ $(document).ready(function(){
 			var recoveryStatus = $( this ).val();
 			OC.msg.startAction('#userEnableRecovery .msg', 'Updating recovery keys. This can take some time...');
 			$.post(
-					OC.generateUrl('/apps/encryption/ajax/userSetRecovery'),
-				{ userEnableRecovery: recoveryStatus },
-				function( data ) {
+					OC.generateUrl('/apps/encryption/ajax/userSetRecovery')
+				, { userEnableRecovery: recoveryStatus }
+				,  function( data ) {
 					OC.msg.finishedAction('#userEnableRecovery .msg', data);
 				}
 			);
@@ -48,7 +48,7 @@ $(document).ready(function(){
 		if (newPrivateKeyPassword !== '' && oldPrivateKeyPassword !== '' ) {
 			$('button:button[name="submitChangePrivateKeyPassword"]').removeAttr("disabled");
 			if(event.which === 13) {
-				updatePrivateKeyPassword();
+				updatePrivateKeyPasswd();
 			}
 		} else {
 			$('button:button[name="submitChangePrivateKeyPassword"]').attr("disabled", "true");
@@ -56,7 +56,7 @@ $(document).ready(function(){
 	});
 
 	$('button:button[name="submitChangePrivateKeyPassword"]').click(function() {
-		updatePrivateKeyPassword();
+		updatePrivateKeyPasswd();
 	});
 
 });

-- 
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