]> source.dussan.org Git - nextcloud-server.git/commitdiff
Hide newFile menu if quota is set to 0B 15855/head
authorJulius Härtl <jus@bitgrid.net>
Tue, 28 May 2019 08:27:01 +0000 (10:27 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Mon, 3 Jun 2019 12:27:19 +0000 (12:27 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/filelist.js
apps/files/js/files.js

index 9ce208abc3ab08b11fe8f9384afeb68b8f37a746..83ac39e18ac00a7a4127ef9d6a2a783d9e3b1e88 100644 (file)
                        this.breadcrumb.setDirectoryInfo(this.dirInfo);
 
                        if (this.dirInfo.permissions) {
-                               this.setDirectoryPermissions(this.dirInfo.permissions);
+                               this._updateDirectoryPermissions();
                        }
 
                        result.sort(this._sortComparator);
                        img.src = previewURL;
                },
 
-               /**
-                * @deprecated
-                */
-               setDirectoryPermissions: function(permissions) {
-                       var isCreatable = (permissions & OC.PERMISSION_CREATE) !== 0;
+               _updateDirectoryPermissions: function() {
+                       var isCreatable = (this.dirInfo.permissions & OC.PERMISSION_CREATE) !== 0 && this.$el.find('#free_space').val() !== '0';
                        this.$el.find('#permissions').val(permissions);
                        this.$el.find('.creatable').toggleClass('hidden', !isCreatable);
                        this.$el.find('.notCreatable').toggleClass('hidden', isCreatable);
index d739131e9c6123dd308a8d62c02004f0a62c2377..8ead2b576e88bca3137b356dbc68bc188dd2be66 100644 (file)
@@ -72,6 +72,7 @@
                                $('#owner').val(response.data.owner);
                                $('#ownerDisplayName').val(response.data.ownerDisplayName);
                                Files.displayStorageWarnings();
+                               OCA.Files.App.fileList._updateDirectoryPermissions();
                        }
                        if (response[0] === undefined) {
                                return;