Do not set indeterminate state for file shares

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-10-31 11:23:23 +01:00
parent 3a6b525a34
commit 2c990ade77
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 9 additions and 1 deletions

View File

@ -314,7 +314,9 @@
var $edit = _this.$('#canEdit-' + _this.cid + '-' + sharee.shareId);
if($edit.length === 1) {
$edit.prop('checked', sharee.editPermissionState === 'checked');
$edit.prop('indeterminate', sharee.editPermissionState === 'indeterminate');
if (sharee.isFolder) {
$edit.prop('indeterminate', sharee.editPermissionState === 'indeterminate');
}
}
});
this.$('.popovermenu').on('afterHide', function() {

View File

@ -616,6 +616,12 @@
var hcp = this.hasCreatePermission(shareIndex);
var hup = this.hasUpdatePermission(shareIndex);
var hdp = this.hasDeletePermission(shareIndex);
if (this.isFile()) {
if (hcp || hup || hdp) {
return 'checked';
}
return '';
}
if (!hcp && !hup && !hdp) {
return '';
}