[Pkg-owncloud-commits] [owncloud] 42/165: Revert "use a simple function - OC.Encryption is already defined - fixes #15707"

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 0ca6398aa34e0a3698f3aed0305f0e9299578bbc
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Fri Apr 17 18:02:00 2015 +0200

    Revert "use a simple function - OC.Encryption is already defined - fixes #15707"
    
    This reverts commit c1a60a23498abe6502d207b8c803255e31515577.
---
 apps/encryption/js/encryption.js | 36 +++++++++++++++++++++++-------------
 1 file changed, 23 insertions(+), 13 deletions(-)

diff --git a/apps/encryption/js/encryption.js b/apps/encryption/js/encryption.js
index 94203d9..c02b4d7 100644
--- a/apps/encryption/js/encryption.js
+++ b/apps/encryption/js/encryption.js
@@ -5,27 +5,37 @@
  * See the COPYING-README file.
  */
 
+/**
+ * @namespace
+ * @memberOf OC
+ */
+OC.Encryption= {
+	MIGRATION_OPEN: 0,
+	MIGRATION_COMPLETED: 1,
+	MIGRATION_IN_PROGRESS: -1,
 
-function displayEncryptionWarning () {
 
-	if (!OC.Notification.isHidden()) {
-		return;
-	}
+	displayEncryptionWarning: function () {
 
-	$.get(
-		OC.generateUrl('/apps/encryption/ajax/getStatus'),
-		function( result ) {
-			if (result.status === "success") {
-				OC.Notification.show(result.data.message);
-			}
+		if (!OC.Notification.isHidden()) {
+			return;
 		}
-	);
-}
+
+		$.get(
+			OC.generateUrl('/apps/encryption/ajax/getStatus')
+			,  function( result ) {
+				if (result.status === "success") {
+					OC.Notification.show(result.data.message);
+				}
+			}
+		);
+	}
+};
 
 $(document).ready(function() {
 	// wait for other apps/extensions to register their event handlers and file actions
 	// in the "ready" clause
 	_.defer(function() {
-		displayEncryptionWarning();
+		OC.Encryption.displayEncryptionWarning();
 	});
 });

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