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

index d546186aff9f116d42f55b8ff122085766e52435..160ad8e463f9f45a72da764cc41ca7aaa3fbb3b2 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 abc85864fae066a9ebcd3da9df0d4a3ee329af07..b46aeb26eee66948d1dc0756d957ef301d280c2d 100644 (file)
@@ -75,6 +75,7 @@
                                $('#owner').val(response.data.owner);
                                $('#ownerDisplayName').val(response.data.ownerDisplayName);
                                Files.displayStorageWarnings();
+                               OCA.Files.App.fileList._updateDirectoryPermissions();
                        }
                        if (response[0] === undefined) {
                                return;