[Pkg-owncloud-commits] [owncloud] 15/145: disable button and input field during decryption

David Prévot taffit at moszumanska.debian.org
Wed Feb 26 16:27:38 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit 4c305ef459a1d64bed95b36ce2369b28a292681e
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Fri Jan 24 12:05:14 2014 +0100

    disable button and input field during decryption
---
 settings/js/personal.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/settings/js/personal.js b/settings/js/personal.js
index 6502e38..a5678c0 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -188,6 +188,8 @@ $(document).ready(function(){
 
 	$('button:button[name="submitDecryptAll"]').click(function() {
 		var privateKeyPassword = $('#decryptAll input:password[id="privateKeyPassword"]').val();
+		$('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true);
+		$('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true);
 		OC.Encryption.decryptAll(privateKeyPassword);
 	});
 
@@ -196,6 +198,8 @@ $(document).ready(function(){
 		if (privateKeyPassword !== '' ) {
 			$('#decryptAll button:button[name="submitDecryptAll"]').removeAttr("disabled");
 			if(event.which === 13) {
+				$('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true);
+				$('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true);
 				OC.Encryption.decryptAll(privateKeyPassword);
 			}
 		} else {
@@ -251,6 +255,7 @@ OC.Encryption = {
 		$.post('ajax/decryptall.php', {password:password}, function(data) {
 			if (data.status === "error") {
 				OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data);
+				$('#decryptAll input:password[name="privateKeyPassword"]').removeAttr("disabled");
 			} else {
 				OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data);
 			}

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