aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/appinfo/app.php7
-rw-r--r--lib/files/filesystem.php5
-rw-r--r--settings/js/personal.js34
3 files changed, 29 insertions, 17 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index 6535a9b7baa..703b1c7cb6c 100644
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -12,3 +12,10 @@ OCP\App::addNavigationEntry( array( "id" => "files_index",
"name" => $l->t("Files") ));
OC_Search::registerProvider('OC_Search_Provider_File');
+
+// cache hooks must be connected before all other apps.
+// since 'files' is always loaded first the hooks need to be connected here
+\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook');
+\OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook');
+\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook');
+\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook'); \ No newline at end of file
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index c8e62956f19..c0e9d215fb5 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -665,9 +665,4 @@ class Filesystem {
}
}
-\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook');
-\OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook');
-\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook');
-\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook');
-
\OC_Util::setupFS();
diff --git a/settings/js/personal.js b/settings/js/personal.js
index d0a471e56b5..7c879bcafe9 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -4,6 +4,22 @@
* See the COPYING-README file.
*/
+/**
+ * Post the email address change to the server.
+ */
+function changeEmailAddress(){
+ emailInfo = $('#email');
+ if (emailInfo.val() === emailInfo.defaultValue){
+ return;
+ }
+ emailInfo.defaultValue = emailInfo.val();
+ OC.msg.startSaving('#lostpassword .msg');
+ var post = $( "#lostpassword" ).serialize();
+ $.post( 'ajax/lostpassword.php', post, function(data){
+ OC.msg.finishedSaving('#lostpassword .msg', data);
+ });
+}
+
$(document).ready(function(){
$("#passwordbutton").click( function(){
if ($('#pass1').val() != '' && $('#pass2').val() != '') {
@@ -62,18 +78,12 @@ $(document).ready(function(){
});
- $('#lostpassword #email').blur(function(event){
- if ($(this).val() == this.defaultValue){
- return;
- }
- event.preventDefault();
- this.defaultValue = $(this).val();
- OC.msg.startSaving('#lostpassword .msg');
- var post = $( "#lostpassword" ).serialize();
- $.post( 'ajax/lostpassword.php', post, function(data){
- OC.msg.finishedSaving('#lostpassword .msg', data);
- });
- });
+ $('#email').keyup(function(){
+ if(typeof timeout !== 'undefined'){
+ clearTimeout(timeout);
+ }
+ timeout = setTimeout('changeEmailAddress()',1000);
+ });
$("#languageinput").chosen();