diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-01-04 08:32:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 08:32:36 +0100 |
commit | 493c255f7f774783b78a58d930a2d1f446274d51 (patch) | |
tree | 656eb94931f2971ae4ec0e71293f5901b2dcb5b3 | |
parent | 19280adc0d360e546d49e07bb4866e6e756fcbdb (diff) | |
parent | 88dd8e46f92dd015cb551e14202368bde56ba44d (diff) | |
download | nextcloud-server-493c255f7f774783b78a58d930a2d1f446274d51.tar.gz nextcloud-server-493c255f7f774783b78a58d930a2d1f446274d51.zip |
Merge pull request #7686 from nextcloud/fix-quota-update-3
Fixed quota update on upload and on delete
-rw-r--r-- | apps/files/js/filelist.js | 3 | ||||
-rw-r--r-- | apps/files/js/files.js | 17 |
2 files changed, 5 insertions, 15 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 5e17f128a7d..7a4ea492752 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1803,7 +1803,7 @@ }, updateStorageQuotas: function() { - OCA.Files.Files.updateStorageQuotas(this.getCurrentDirectory()); + OCA.Files.Files.updateStorageQuotas(); }, /** @@ -2636,6 +2636,7 @@ self.updateSelectionSummary(); // FIXME: don't repeat this, do it once all files are done self.updateStorageStatistics(); + self.updateStorageQuotas(); } _.each(files, function(file) { diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 5e34f664a6c..094fb81d78b 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -29,23 +29,12 @@ state.dir = null; state.call = null; Files.updateMaxUploadFilesize(response); - Files.updateQuota(response); }); }, // update quota - updateStorageQuotas: function(currentDir) { - var state = Files.updateStorageStatistics; - if (state.dir){ - if (state.dir === currentDir) { - return; - } - // cancel previous call, as it was for another dir - state.call.abort(); - } - state.dir = currentDir; - state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php') + '?dir=' + encodeURIComponent(currentDir),function(response) { - state.dir = null; - state.call = null; + updateStorageQuotas: function() { + var state = Files.updateStorageQuotas; + state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) { Files.updateQuota(response); }); }, |