From 64f409e8abaa8522fff49ecc854aec5721e41aed Mon Sep 17 00:00:00 2001 From: "kavita.sonawane@t-systems.com" Date: Tue, 15 Nov 2022 11:27:46 +0530 Subject: Filelist:-Deselecting all files checkboxes within cells of encrypted folder Signed-off-by: kavita.sonawane@t-systems.com --- apps/files/js/filelist.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/files/js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 7caed29baa3..46b63140b27 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -976,6 +976,7 @@ // 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); + 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 +985,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); } -- cgit v1.2.3 From 23f968400cdabc0e4c2ba5bc268d9b32ecca0036 Mon Sep 17 00:00:00 2001 From: "kavita.sonawane@t-systems.com" Date: Tue, 15 Nov 2022 17:58:57 +0530 Subject: Add comments for prevents the selection of encrypted folders Signed-off-by: kavita.sonawane@t-systems.com --- apps/files/js/filelist.js | 1 + 1 file changed, 1 insertion(+) (limited to 'apps/files/js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 46b63140b27..75d7603022b 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -976,6 +976,7 @@ // 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) { -- cgit v1.2.3 From 44c1049e0ce7bdc4532886a2e5fd89101baf49d3 Mon Sep 17 00:00:00 2001 From: "kavita.sonawane@t-systems.com" Date: Thu, 17 Nov 2022 11:31:07 +0530 Subject: Prevents the selection of encrypted folder on scroll page Signed-off-by: kavita.sonawane@t-systems.com --- apps/files/js/filelist.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/files/js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 75d7603022b..38d096acccc 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -976,7 +976,7 @@ // 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 + // 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) { @@ -1271,6 +1271,7 @@ _onScroll: function(e) { if (this.$container.scrollTop() + this.$container.height() > this.$el.height() - 300) { this._nextPage(true); + this.$fileList.find('tr[data-e2eencrypted="true"]').find('td.selection > .selectCheckBox:visible').prop('checked', false).closest('tr').toggleClass('selected', false); } }, -- cgit v1.2.3 From acdd34ecaf1f99627005af08bae3cbbb65394be6 Mon Sep 17 00:00:00 2001 From: "kavita.sonawane@t-systems.com" Date: Fri, 18 Nov 2022 14:46:50 +0530 Subject: Prevents the selection of encrypted folder on next page load Signed-off-by: kavita.sonawane@t-systems.com --- apps/files/js/filelist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files/js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 38d096acccc..201edde48bd 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1271,7 +1271,6 @@ _onScroll: function(e) { if (this.$container.scrollTop() + this.$container.height() > this.$el.height() - 300) { this._nextPage(true); - this.$fileList.find('tr[data-e2eencrypted="true"]').find('td.selection > .selectCheckBox:visible').prop('checked', false).closest('tr').toggleClass('selected', false); } }, @@ -1422,6 +1421,7 @@ hidden = false; } tr = this._renderRow(fileData, {updateSummary: false, silent: true, hidden: hidden}); + this.$fileList.find('tr[data-e2eencrypted="true"]').find('td.selection > .selectCheckBox:visible').prop('checked', false).closest('tr').toggleClass('selected', false); this.$fileList.append(tr); if (isAllSelected || this._selectedFiles[fileData.id]) { tr.addClass('selected'); -- cgit v1.2.3 From 95e61ef685f7733bcdd796b6bce6b72cd9a02743 Mon Sep 17 00:00:00 2001 From: "kavita.sonawane@t-systems.com" Date: Mon, 21 Nov 2022 11:55:25 +0530 Subject: Prevent selection of encrypted folders Signed-off-by: kavita.sonawane@t-systems.com --- apps/files/js/filelist.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/files/js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 201edde48bd..96273b325cb 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1421,7 +1421,10 @@ hidden = false; } tr = this._renderRow(fileData, {updateSummary: false, silent: true, hidden: hidden}); - this.$fileList.find('tr[data-e2eencrypted="true"]').find('td.selection > .selectCheckBox:visible').prop('checked', false).closest('tr').toggleClass('selected', false); + 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'); -- cgit v1.2.3