aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js')
-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;