]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not set indeterminate state for file shares
authorJulius Härtl <jus@bitgrid.net>
Wed, 31 Oct 2018 10:23:23 +0000 (11:23 +0100)
committerJulius Härtl <jus@bitgrid.net>
Wed, 31 Oct 2018 10:23:23 +0000 (11:23 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
core/js/sharedialogshareelistview.js
core/js/shareitemmodel.js

index 93373a54435b251873aeb2fc112036d047dcb7a4..94abf55a3589815894308bcc21c4241c20626223 100644 (file)
                                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() {
index 3f92a8591e5fce6b049a50fb95ccd43b226b8be9..84715ec87c1999d840cc7a8914b9f51c1a94795c 100644 (file)
                        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 '';
                        }