diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-19 00:31:49 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-19 00:31:49 +0100 |
commit | 1dd70ac506982d230d18059ba3626ef2a92664fd (patch) | |
tree | d6945a4da5a419bad45016e919d9fcb7132ce4da /apps/files | |
parent | cdd07b33392897b1b6c7f5707b83874ba06ec363 (diff) | |
download | nextcloud-server-1dd70ac506982d230d18059ba3626ef2a92664fd.tar.gz nextcloud-server-1dd70ac506982d230d18059ba3626ef2a92664fd.zip |
update used space percent after each ajax call and display the notification
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/files.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index f4d572b6954..843c6e3fc4a 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -32,14 +32,18 @@ Files={ } if(response.data !== undefined && response.data.uploadMaxFilesize !== undefined) { $('#max_upload').val(response.data.uploadMaxFilesize); - $('#data-upload-form a').attr('original-title', response.data.maxHumanFilesize); + $('#upload.button').attr('original-title', response.data.maxHumanFilesize); + $('#usedSpacePercent').val(response.data.usedSpacePercent); + Files.displayStorageWarnings(); } if(response[0] == undefined) { return; } if(response[0].uploadMaxFilesize !== undefined) { $('#max_upload').val(response[0].uploadMaxFilesize); - $('#data-upload-form a').attr('original-title', response[0].maxHumanFilesize); + $('#upload.button').attr('original-title', response[0].maxHumanFilesize); + $('#usedSpacePercent').val(response[0].usedSpacePercent); + Files.displayStorageWarnings(); } }, @@ -65,6 +69,10 @@ Files={ return true; }, displayStorageWarnings: function() { + if (!OC.Notification.isHidden()) { + return; + } + var usedSpacePercent = $('#usedSpacePercent').val(); if (usedSpacePercent > 98) { OC.Notification.show(t('files', 'Your storage is full, files can not be updated or synced anymore!')); |