From 11125164bee4a2130f5adc4808b3f92c892a6138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Wed, 27 Dec 2017 16:31:22 +0100 Subject: [PATCH] Disable selection in "External storages" file list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the checkbox was moved to where the favourite icon was shown before the layout of the file list was modified. The checkbox is no longer a descendant of the ".filename" element, so it is no longer removed by the "External storages" file list. However, even before the checkbox was moved, explicitly removing it was not the best approach, as file list rows could still be selected using "Ctrl/Shift+click". This did not provide much value, as the selection header has no actions; it simply states the number of selected elements. The proper way to disable the selection is by setting "_allowSelection" to false in the file list instead. Signed-off-by: Daniel Calviño Sánchez --- apps/files_external/js/mountsfilelist.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files_external/js/mountsfilelist.js b/apps/files_external/js/mountsfilelist.js index 3beee6f73b..90b90e3874 100644 --- a/apps/files_external/js/mountsfilelist.js +++ b/apps/files_external/js/mountsfilelist.js @@ -30,6 +30,8 @@ /** @lends OCA.External.FileList.prototype */ { appName: 'External storages', + _allowSelection: false, + /** * @private */ @@ -56,7 +58,6 @@ $scopeColumn.find('span').text(scopeText); $backendColumn.text(fileData.backend); $tr.find('td.filename').after($scopeColumn).after($backendColumn); - $tr.find('td.filename input:checkbox').remove(); return $tr; },