summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-05-28 10:27:01 +0200
committerJulius Härtl <jus@bitgrid.net>2019-05-28 10:27:01 +0200
commit1cf16fa7aa68f0a96c1e7f5401d851f822a907a4 (patch)
treecc113354d7300c05f51987ebb93c7aa206e1d0ae /apps/files
parent8b6d8ed4231e0bedf25ee5d088b128e746584d08 (diff)
downloadnextcloud-server-1cf16fa7aa68f0a96c1e7f5401d851f822a907a4.tar.gz
nextcloud-server-1cf16fa7aa68f0a96c1e7f5401d851f822a907a4.zip
Hide newFile menu if quota is set to 0B
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/js/filelist.js9
-rw-r--r--apps/files/js/files.js1
2 files changed, 4 insertions, 6 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index d546186aff9..160ad8e463f 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -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);
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index abc85864fae..b46aeb26eee 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -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;