Merge pull request #15767 from nextcloud/bugfix/0b-quota-create

Hide newFile menu if quota is set to 0B
This commit is contained in:
Morris Jobke 2019-05-28 14:27:01 +02:00 committed by GitHub
commit 64fb083dd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -2036,7 +2036,7 @@
this.breadcrumb.setDirectoryInfo(this.dirInfo);
if (this.dirInfo.permissions) {
this.setDirectoryPermissions(this.dirInfo.permissions);
this._updateDirectoryPermissions();
}
result.sort(this._sortComparator);
@ -2187,11 +2187,8 @@
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);

View 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;