From d6fb2afa8580b7d12b1f0cfc2bb8fb29e01a087f Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 25 Nov 2013 23:49:05 +0100 Subject: [PATCH 01/11] show a message at the log-in screen if inital encryption take place --- .../ajax/getMigrationStatus.php | 28 ++++++++++++++++++ apps/files_encryption/appinfo/app.php | 3 +- apps/files_encryption/js/detect-migration.js | 29 +++++++++++++++++++ apps/files_encryption/lib/util.php | 16 ++++++---- core/templates/login.php | 4 ++- 5 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 apps/files_encryption/ajax/getMigrationStatus.php create mode 100644 apps/files_encryption/js/detect-migration.js diff --git a/apps/files_encryption/ajax/getMigrationStatus.php b/apps/files_encryption/ajax/getMigrationStatus.php new file mode 100644 index 00000000000..e6d2f3dea6c --- /dev/null +++ b/apps/files_encryption/ajax/getMigrationStatus.php @@ -0,0 +1,28 @@ + + * This file is licensed under the Affero General Public License version 3 or later. + * See the COPYING-README file. + * + * @brief check migration status + */ +use OCA\Encryption\Util; + +\OCP\JSON::checkAppEnabled('files_encryption'); + +$user = isset($_GET['user']) ? $_GET['user'] : ''; +$password = isset($_GET['password']) ? $_GET['password'] : ''; + +$migrationCompleted = true; + +if ($user !== '' && $password !== '') { + if (\OCP\User::checkPassword($user, $password)) { + error_log("password ok"); + $util = new Util(new \OC_FilesystemView('/'), $user); + if ($util->getMigrationStatus($user) !== Util::MIGRATION_COMPLETED) { + $migrationCompleted = false; + } + } +} + +\OCP\JSON::success(array('data' => array('migrationCompleted' => $migrationCompleted))); diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index c930ac9eca8..fd9aa429b01 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -10,6 +10,8 @@ OC::$CLASSPATH['OCA\Encryption\Session'] = 'files_encryption/lib/session.php'; OC::$CLASSPATH['OCA\Encryption\Capabilities'] = 'files_encryption/lib/capabilities.php'; OC::$CLASSPATH['OCA\Encryption\Helper'] = 'files_encryption/lib/helper.php'; +\OCP\Util::addscript('files_encryption', 'detect-migration'); + if (!OC_Config::getValue('maintenance', false)) { OC_FileProxy::register(new OCA\Encryption\Proxy()); @@ -52,4 +54,3 @@ if (!OC_Config::getValue('maintenance', false)) { // Register settings scripts OCP\App::registerAdmin('files_encryption', 'settings-admin'); OCP\App::registerPersonal('files_encryption', 'settings-personal'); - diff --git a/apps/files_encryption/js/detect-migration.js b/apps/files_encryption/js/detect-migration.js new file mode 100644 index 00000000000..eadcd237078 --- /dev/null +++ b/apps/files_encryption/js/detect-migration.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2013 + * Bjoern Schiessle + * This file is licensed under the Affero General Public License version 3 or later. + * See the COPYING-README file. + */ + + +$(document).ready(function(){ + $('form[name="login"]').on('submit', function(ev) { + var user = $('#user').val(); + var password = $('#password').val(); + $.ajax({ + type: 'GET', + url: OC.linkTo('files_encryption', 'ajax/getMigrationStatus.php'), + dataType: 'json', + data: {user: user, password: password}, + async: false, + success: function(response) { + if (response.data.migrationCompleted === false) { + var message = t('files_encryption', 'Initial encryption started... This can take some time. Please wait.'); + $('p[name="message"]').html(' ' + message); + $('p[name="message"]').removeClass('hidden').addClass('info'); + } + } + }); + }); + +}); diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index b208a808bac..78d0ff88c8e 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -1253,16 +1253,22 @@ class Util { /** * @brief check if files are already migrated to the encryption system + * @param string $uid user Id * @return migration status, false = in case of no record * @note If records are not being returned, check for a hidden space * at the start of the uid in db */ - public function getMigrationStatus() { + public function getMigrationStatus($uid = null) { + + if($uid && \OCP\User::userExists($uid)) { + $userId = $uid; + } else { + $userId = $this->uid; + } $sql = 'SELECT `migration_status` FROM `*PREFIX*encryption` WHERE `uid` = ?'; - $args = array($this->userId); - + $args = array($userId); $query = \OCP\DB::prepare($sql); $result = $query->execute($args); @@ -1282,11 +1288,11 @@ class Util { // If no record is found if (empty($migrationStatus)) { - \OCP\Util::writeLog('Encryption library', "Could not get migration status for " . $this->userId . ", no record found", \OCP\Util::ERROR); + \OCP\Util::writeLog('Encryption library', "Could not get migration status for " . $userId . ", no record found", \OCP\Util::ERROR); // insert missing entry in DB with status open $sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`,`migration_status`) VALUES (?,?,?,?)'; $args = array( - $this->userId, + $userId, 'server-side', 0, self::MIGRATION_OPEN diff --git a/core/templates/login.php b/core/templates/login.php index aca42c84387..214fda3b61e 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -1,5 +1,5 @@ -
+
'); @@ -18,6 +18,8 @@ t('Please contact your administrator.')); ?> +

From 8974107b4e61e2da44015fbac2d14cd291edfe47 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 25 Nov 2013 23:57:08 +0100 Subject: [PATCH 02/11] remove debug output --- apps/files_encryption/ajax/getMigrationStatus.php | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/files_encryption/ajax/getMigrationStatus.php b/apps/files_encryption/ajax/getMigrationStatus.php index e6d2f3dea6c..f912a238caa 100644 --- a/apps/files_encryption/ajax/getMigrationStatus.php +++ b/apps/files_encryption/ajax/getMigrationStatus.php @@ -17,7 +17,6 @@ $migrationCompleted = true; if ($user !== '' && $password !== '') { if (\OCP\User::checkPassword($user, $password)) { - error_log("password ok"); $util = new Util(new \OC_FilesystemView('/'), $user); if ($util->getMigrationStatus($user) !== Util::MIGRATION_COMPLETED) { $migrationCompleted = false; From 35a6ad255d6b45e68c18ebcdb36ff0f99311d888 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 26 Nov 2013 11:38:45 +0100 Subject: [PATCH 03/11] fix typo in var name --- apps/files_encryption/lib/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 78d0ff88c8e..62f2f8b9022 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -1263,7 +1263,7 @@ class Util { if($uid && \OCP\User::userExists($uid)) { $userId = $uid; } else { - $userId = $this->uid; + $userId = $this->userId; } $sql = 'SELECT `migration_status` FROM `*PREFIX*encryption` WHERE `uid` = ?'; From 0617e06f69bdfbfb71733b5c4dcc1532b0823a51 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 26 Nov 2013 11:38:49 +0100 Subject: [PATCH 04/11] use POST instead of GET --- apps/files_encryption/ajax/getMigrationStatus.php | 4 ++-- apps/files_encryption/js/detect-migration.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_encryption/ajax/getMigrationStatus.php b/apps/files_encryption/ajax/getMigrationStatus.php index f912a238caa..a28ebfac7f7 100644 --- a/apps/files_encryption/ajax/getMigrationStatus.php +++ b/apps/files_encryption/ajax/getMigrationStatus.php @@ -10,8 +10,8 @@ use OCA\Encryption\Util; \OCP\JSON::checkAppEnabled('files_encryption'); -$user = isset($_GET['user']) ? $_GET['user'] : ''; -$password = isset($_GET['password']) ? $_GET['password'] : ''; +$user = isset($_POST['user']) ? $_POST['user'] : ''; +$password = isset($_POST['password']) ? $_POST['password'] : ''; $migrationCompleted = true; diff --git a/apps/files_encryption/js/detect-migration.js b/apps/files_encryption/js/detect-migration.js index eadcd237078..2ee105cbfaf 100644 --- a/apps/files_encryption/js/detect-migration.js +++ b/apps/files_encryption/js/detect-migration.js @@ -11,7 +11,7 @@ $(document).ready(function(){ var user = $('#user').val(); var password = $('#password').val(); $.ajax({ - type: 'GET', + type: 'POST', url: OC.linkTo('files_encryption', 'ajax/getMigrationStatus.php'), dataType: 'json', data: {user: user, password: password}, From c7e1fe50c23771995bebf218c18deaf12ba628ca Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 26 Nov 2013 17:14:16 +0100 Subject: [PATCH 05/11] added a small version of the dark loading gif, looks nicer on the blue background --- apps/files_encryption/js/detect-migration.js | 2 +- core/img/loading-dark-small.gif | Bin 0 -> 1324 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 core/img/loading-dark-small.gif diff --git a/apps/files_encryption/js/detect-migration.js b/apps/files_encryption/js/detect-migration.js index 2ee105cbfaf..2cf6a61d145 100644 --- a/apps/files_encryption/js/detect-migration.js +++ b/apps/files_encryption/js/detect-migration.js @@ -19,7 +19,7 @@ $(document).ready(function(){ success: function(response) { if (response.data.migrationCompleted === false) { var message = t('files_encryption', 'Initial encryption started... This can take some time. Please wait.'); - $('p[name="message"]').html(' ' + message); + $('p[name="message"]').html(' ' + message); $('p[name="message"]').removeClass('hidden').addClass('info'); } } diff --git a/core/img/loading-dark-small.gif b/core/img/loading-dark-small.gif new file mode 100644 index 0000000000000000000000000000000000000000..87fe79b8bb4b129da776e570965f92bb5af968a4 GIT binary patch literal 1324 zcmZ?wbhEHb6krfwc+AKE1poj4x3I9Ns;ctv@JLBXIdS5|iWMu=)YPP;q@0|b9z1yP z>(?)!8VFGQ&+X?L671|4;A*62zzi}#@t>4)QEFmIYKlU6W=V!ZVpd{BPJUvFUS?ie zK7-;<7EUe(eg++oRUk_lSo}Vm{OPqYg74%Em6=-_?k;XvxY0&+V#2YnI=8>8uvAH~ zO?t{Dq2=<2k^RK1i2^!aH4;ZAOscM(5qR=s`(zG>2bygUoF_V~-+nB;$?nJ`4s2Eg z0j=O#7$LTETFT564gc__hlx|T59M5OusdeZ$XRH6#6U&zZjO;aOP{-}eA>6DX~`pv14@n!D=j@aZ>$g6 znbc#De9ZFmOjXAsH6~n^v@D2FvTQS%>7wHQT_$0Lz|#p5Z=CIpxZURW(CJnYSj?ku zy0SHGAy4wo2*%0YZu*u7Lz5*Ggen%^2%GKl#(i<3@v#|(n}vR!o1CkG(-MJ25%hGtH09)miToQ+3VTSjsR$&u$xB4BiJj8vV-sCp5%Z*LD^JqYL<1Y8CWg(C z1`eFB^u!joWrQfYsa~3?dE~naPD_FoMJRc8=t!2A@-wz|T~|FCR;c%I8ov?Gqz!52 zekT`tYout%1*t45^!OMkFz-x~pspax490644yZ1&l4?H4;wI_m)un7W!PqGZcW{9% z;W&Tis%;nhH2>)W;YV{d=Y&00UJCHjv#-Tdt(c82HFAB!GihXV2~nX@iLSg7n^XJ=DH5F2x(`+?gI<=UN%A0upd z+EkJ+TorTR&ih%&k$z4nAG;-iz|=*^CooI=jS?CPgxC%@2*!BLZu(ppVY8yyu}E>5 z9h*nb!QWFwj_mA|6lTPhy!?r=rOz>i#kwW7;L&6rF@-rP8!Zw9reA7fsFmUAcRa;n zBywoIkwmU?@QFu0EZFP-+DrLSOq~PV1I=1xAZScoeQ4 zNr2fQk~D8(!3AT%SyLQ!R0U_On{2KMPF;*>#R@dI_&hnz3q3CFf7HnRxrDPY^wK8V zGlrFKD|NUhm2#a~#8A~(=g@qq;Eh1j@lO85GZG^vA8hb&jPbEM;$sjs*Ma4}Ca+Pg M+>=MVB8&{y0F^G_I{*Lx literal 0 HcmV?d00001 From 060e0ad0cd668529f13a97b866a371e505e8fa3e Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 27 Nov 2013 15:35:32 +0100 Subject: [PATCH 06/11] with the latest changes in master $this-userID is always the correct ID, so we no longer need the extra parameter --- .../ajax/getMigrationStatus.php | 2 +- apps/files_encryption/lib/util.php | 42 +++++++++---------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/apps/files_encryption/ajax/getMigrationStatus.php b/apps/files_encryption/ajax/getMigrationStatus.php index a28ebfac7f7..4da035a97d4 100644 --- a/apps/files_encryption/ajax/getMigrationStatus.php +++ b/apps/files_encryption/ajax/getMigrationStatus.php @@ -18,7 +18,7 @@ $migrationCompleted = true; if ($user !== '' && $password !== '') { if (\OCP\User::checkPassword($user, $password)) { $util = new Util(new \OC_FilesystemView('/'), $user); - if ($util->getMigrationStatus($user) !== Util::MIGRATION_COMPLETED) { + if ($util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) { $migrationCompleted = false; } } diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 62f2f8b9022..7e46a5016a3 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -1253,22 +1253,15 @@ class Util { /** * @brief check if files are already migrated to the encryption system - * @param string $uid user Id * @return migration status, false = in case of no record * @note If records are not being returned, check for a hidden space * at the start of the uid in db */ - public function getMigrationStatus($uid = null) { - - if($uid && \OCP\User::userExists($uid)) { - $userId = $uid; - } else { - $userId = $this->userId; - } + public function getMigrationStatus() { $sql = 'SELECT `migration_status` FROM `*PREFIX*encryption` WHERE `uid` = ?'; - $args = array($userId); + $args = array($this->userId); $query = \OCP\DB::prepare($sql); $result = $query->execute($args); @@ -1288,21 +1281,24 @@ class Util { // If no record is found if (empty($migrationStatus)) { - \OCP\Util::writeLog('Encryption library', "Could not get migration status for " . $userId . ", no record found", \OCP\Util::ERROR); - // insert missing entry in DB with status open - $sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`,`migration_status`) VALUES (?,?,?,?)'; - $args = array( - $userId, - 'server-side', - 0, - self::MIGRATION_OPEN - ); - $query = \OCP\DB::prepare($sql); - $query->execute($args); + \OCP\Util::writeLog('Encryption library', "Could not get migration status for " . $this->userId . ", no record found", \OCP\Util::ERROR); + // insert missing entry in DB with status open if the user exists + if (\OCP\User::userExists($this->userId)) { + $sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`,`migration_status`) VALUES (?,?,?,?)'; + $args = array( + $this->userId, + 'server-side', + 0, + self::MIGRATION_OPEN + ); + $query = \OCP\DB::prepare($sql); + $query->execute($args); - return self::MIGRATION_OPEN; - // If a record is found - } else { + return self::MIGRATION_OPEN; + } else { + return false; + } + } else { // If a record is found return (int)$migrationStatus[0]; } From 1536c7ea586be3f94bfc149fbb2c0c94ea1dbddc Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 27 Nov 2013 17:01:21 +0100 Subject: [PATCH 07/11] switch from "name" attribute to "id" --- apps/files_encryption/js/detect-migration.js | 4 ++-- core/templates/login.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_encryption/js/detect-migration.js b/apps/files_encryption/js/detect-migration.js index 2cf6a61d145..e726515abc2 100644 --- a/apps/files_encryption/js/detect-migration.js +++ b/apps/files_encryption/js/detect-migration.js @@ -19,8 +19,8 @@ $(document).ready(function(){ success: function(response) { if (response.data.migrationCompleted === false) { var message = t('files_encryption', 'Initial encryption started... This can take some time. Please wait.'); - $('p[name="message"]').html(' ' + message); - $('p[name="message"]').removeClass('hidden').addClass('info'); + $('p[id="message"]').html(' ' + message); + $('p[id="message"]').removeClass('hidden').addClass('info'); } } }); diff --git a/core/templates/login.php b/core/templates/login.php index 214fda3b61e..c270963439c 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -18,7 +18,7 @@ t('Please contact your administrator.')); ?> -

Date: Wed, 27 Nov 2013 21:58:38 +0100 Subject: [PATCH 08/11] switch to large spinner --- apps/files_encryption/js/detect-migration.js | 4 ++-- core/css/styles.css | 5 +++++ core/img/loading-dark-small.gif | Bin 1324 -> 0 bytes 3 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 core/img/loading-dark-small.gif diff --git a/apps/files_encryption/js/detect-migration.js b/apps/files_encryption/js/detect-migration.js index e726515abc2..dea723ff25f 100644 --- a/apps/files_encryption/js/detect-migration.js +++ b/apps/files_encryption/js/detect-migration.js @@ -7,7 +7,7 @@ $(document).ready(function(){ - $('form[name="login"]').on('submit', function(ev) { + $('form[name="login"]').on('submit', function() { var user = $('#user').val(); var password = $('#password').val(); $.ajax({ @@ -19,7 +19,7 @@ $(document).ready(function(){ success: function(response) { if (response.data.migrationCompleted === false) { var message = t('files_encryption', 'Initial encryption started... This can take some time. Please wait.'); - $('p[id="message"]').html(' ' + message); + $('p[id="message"]').html(' ' + message); $('p[id="message"]').removeClass('hidden').addClass('info'); } } diff --git a/core/css/styles.css b/core/css/styles.css index 5c0aa1fedc2..5b8b39f9811 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -283,6 +283,11 @@ input[type="submit"].enabled { opacity: .6; } +#body-login p#message img { + vertical-align: middle; + padding: 5px; +} + #body-login div.buttons { text-align:center; } #body-login p.info { width: 22em; diff --git a/core/img/loading-dark-small.gif b/core/img/loading-dark-small.gif deleted file mode 100644 index 87fe79b8bb4b129da776e570965f92bb5af968a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1324 zcmZ?wbhEHb6krfwc+AKE1poj4x3I9Ns;ctv@JLBXIdS5|iWMu=)YPP;q@0|b9z1yP z>(?)!8VFGQ&+X?L671|4;A*62zzi}#@t>4)QEFmIYKlU6W=V!ZVpd{BPJUvFUS?ie zK7-;<7EUe(eg++oRUk_lSo}Vm{OPqYg74%Em6=-_?k;XvxY0&+V#2YnI=8>8uvAH~ zO?t{Dq2=<2k^RK1i2^!aH4;ZAOscM(5qR=s`(zG>2bygUoF_V~-+nB;$?nJ`4s2Eg z0j=O#7$LTETFT564gc__hlx|T59M5OusdeZ$XRH6#6U&zZjO;aOP{-}eA>6DX~`pv14@n!D=j@aZ>$g6 znbc#De9ZFmOjXAsH6~n^v@D2FvTQS%>7wHQT_$0Lz|#p5Z=CIpxZURW(CJnYSj?ku zy0SHGAy4wo2*%0YZu*u7Lz5*Ggen%^2%GKl#(i<3@v#|(n}vR!o1CkG(-MJ25%hGtH09)miToQ+3VTSjsR$&u$xB4BiJj8vV-sCp5%Z*LD^JqYL<1Y8CWg(C z1`eFB^u!joWrQfYsa~3?dE~naPD_FoMJRc8=t!2A@-wz|T~|FCR;c%I8ov?Gqz!52 zekT`tYout%1*t45^!OMkFz-x~pspax490644yZ1&l4?H4;wI_m)un7W!PqGZcW{9% z;W&Tis%;nhH2>)W;YV{d=Y&00UJCHjv#-Tdt(c82HFAB!GihXV2~nX@iLSg7n^XJ=DH5F2x(`+?gI<=UN%A0upd z+EkJ+TorTR&ih%&k$z4nAG;-iz|=*^CooI=jS?CPgxC%@2*!BLZu(ppVY8yyu}E>5 z9h*nb!QWFwj_mA|6lTPhy!?r=rOz>i#kwW7;L&6rF@-rP8!Zw9reA7fsFmUAcRa;n zBywoIkwmU?@QFu0EZFP-+DrLSOq~PV1I=1xAZScoeQ4 zNr2fQk~D8(!3AT%SyLQ!R0U_On{2KMPF;*>#R@dI_&hnz3q3CFf7HnRxrDPY^wK8V zGlrFKD|NUhm2#a~#8A~(=g@qq;Eh1j@lO85GZG^vA8hb&jPbEM;$sjs*Ma4}Ca+Pg M+>=MVB8&{y0F^G_I{*Lx From 0219b8b3b95ba3b346107531721bea61a0c242da Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 27 Nov 2013 22:36:47 +0100 Subject: [PATCH 09/11] add spinner to the template so that it can be loaded in time --- apps/files_encryption/js/detect-migration.js | 2 +- core/templates/login.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/files_encryption/js/detect-migration.js b/apps/files_encryption/js/detect-migration.js index dea723ff25f..e70159933c4 100644 --- a/apps/files_encryption/js/detect-migration.js +++ b/apps/files_encryption/js/detect-migration.js @@ -19,7 +19,7 @@ $(document).ready(function(){ success: function(response) { if (response.data.migrationCompleted === false) { var message = t('files_encryption', 'Initial encryption started... This can take some time. Please wait.'); - $('p[id="message"]').html(' ' + message); + $('span[id="messageText"]').text(message); $('p[id="message"]').removeClass('hidden').addClass('info'); } } diff --git a/core/templates/login.php b/core/templates/login.php index c270963439c..0c040dbdb18 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -19,6 +19,8 @@

Date: Wed, 27 Nov 2013 22:42:03 +0100 Subject: [PATCH 10/11] some small js fixes --- apps/files_encryption/js/detect-migration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_encryption/js/detect-migration.js b/apps/files_encryption/js/detect-migration.js index e70159933c4..ed548edcfa5 100644 --- a/apps/files_encryption/js/detect-migration.js +++ b/apps/files_encryption/js/detect-migration.js @@ -19,8 +19,8 @@ $(document).ready(function(){ success: function(response) { if (response.data.migrationCompleted === false) { var message = t('files_encryption', 'Initial encryption started... This can take some time. Please wait.'); - $('span[id="messageText"]').text(message); - $('p[id="message"]').removeClass('hidden').addClass('info'); + $('#messageText').text(message); + $('#message').removeClass('hidden').addClass('info'); } } }); From 55d7cf8ffd1170f2397fecefaeef5749bb182f32 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 27 Nov 2013 23:07:19 +0100 Subject: [PATCH 11/11] improve encryption message --- apps/files_encryption/js/detect-migration.js | 2 +- core/css/styles.css | 4 ++++ core/templates/login.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/files_encryption/js/detect-migration.js b/apps/files_encryption/js/detect-migration.js index ed548edcfa5..301e77f24f7 100644 --- a/apps/files_encryption/js/detect-migration.js +++ b/apps/files_encryption/js/detect-migration.js @@ -20,7 +20,7 @@ $(document).ready(function(){ if (response.data.migrationCompleted === false) { var message = t('files_encryption', 'Initial encryption started... This can take some time. Please wait.'); $('#messageText').text(message); - $('#message').removeClass('hidden').addClass('info'); + $('#message').removeClass('hidden').addClass('update'); } } }); diff --git a/core/css/styles.css b/core/css/styles.css index 5b8b39f9811..859f11ff0a8 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -486,6 +486,10 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } color: #ccc; } +#body-login .update img.float-spinner { + float: left; +} + #body-user .warning, #body-settings .warning { margin-top: 8px; padding: 5px; diff --git a/core/templates/login.php b/core/templates/login.php index 0c040dbdb18..b81128a3269 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -19,7 +19,7 @@