]> source.dussan.org Git - nextcloud-server.git/commitdiff
Hide newFile menu if quota is set to 0B 15856/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:38:46 +0000 (12:38 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/filelist.js
apps/files/js/files.js

index 306417230f1b6533e39554d1cc1aa4719745b4d9..3f4c14f95d0f3c398b2dc10f6ba0744cafab838c 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 d044d365ed659a791a44746eb6f309fc63e01ef6..d2fcdf7839a5c78be72b6beae331b332697d5e0e 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;