diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-11-22 18:09:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 18:09:26 +0100 |
commit | 0b21a9ac6f85d46097bee08a1a25a10ba50a94da (patch) | |
tree | ba6171eafbb73020434d2397031b78a45974da8d /apps/files/js | |
parent | a56a1a655b23e51b2082d2cc2a6455cd9cb70814 (diff) | |
parent | 0253a0b2d0f48320c75257e6c3b5474878c5dccd (diff) | |
download | nextcloud-server-0b21a9ac6f85d46097bee08a1a25a10ba50a94da.tar.gz nextcloud-server-0b21a9ac6f85d46097bee08a1a25a10ba50a94da.zip |
Merge pull request #35299 from nextmcloud/nmcpr/1416-prevents-selection-of-encrypted-folders
Prevents the selection of encrypted folders when clicking on the "Select all" checkbox
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/filelist.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 7caed29baa3..96273b325cb 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -976,6 +976,8 @@ // Select only visible checkboxes to filter out unmatched file in search this.$fileList.find('td.selection > .selectCheckBox:visible').prop('checked', checked) .closest('tr').toggleClass('selected', checked); + // For prevents the selection of encrypted folders when clicking on the "Select all" checkbox + this.$fileList.find('tr[data-e2eencrypted="true"]').find('td.selection > .selectCheckBox:visible').prop('checked', false).closest('tr').toggleClass('selected', false); if (checked) { for (var i = 0; i < this.files.length; i++) { @@ -984,7 +986,7 @@ var fileData = this.files[i]; var fileRow = this.$fileList.find('tr[data-id=' + fileData.id + ']'); // do not select already selected ones - if (!fileRow.hasClass('hidden') && _.isUndefined(this._selectedFiles[fileData.id])) { + if (!fileRow.hasClass('hidden') && _.isUndefined(this._selectedFiles[fileData.id]) && (!fileData.isEncrypted)) { this._selectedFiles[fileData.id] = fileData; this._selectionSummary.add(fileData); } @@ -1419,6 +1421,10 @@ hidden = false; } tr = this._renderRow(fileData, {updateSummary: false, silent: true, hidden: hidden}); + if (tr.attr('data-e2eencrypted') === 'true') { + tr.toggleClass('selected', false); + tr.find('td.selection > .selectCheckBox:visible').prop('checked', false); + } this.$fileList.append(tr); if (isAllSelected || this._selectedFiles[fileData.id]) { tr.addClass('selected'); |