]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "use a simple function - OC.Encryption is already defined - fixes #15707"
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 17 Apr 2015 16:02:00 +0000 (18:02 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 17 Apr 2015 16:02:00 +0000 (18:02 +0200)
This reverts commit c1a60a23498abe6502d207b8c803255e31515577.

apps/encryption/js/encryption.js

index 94203d93f7f58f4a5c119869d459fa7e99dc028b..c02b4d74ae8fde7132db6ef5f98feb936f6b479d 100644 (file)
@@ -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();
        });
 });