Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/files/css/files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
color: var(--color-text-maxcontrast);
}
}

// Deactivates the possiblility to checkmark or click on the encrypted folder
tr[data-e2eencrypted="true"] {
pointer-events: none;
}
}
}

Expand Down
8 changes: 7 additions & 1 deletion apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,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++) {
Expand All @@ -1001,7 +1003,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);
}
Expand Down Expand Up @@ -1436,6 +1438,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');
Expand Down