Skip to content

Commit

Permalink
Disable selection in "External storages" file list
Browse files Browse the repository at this point in the history
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 <danxuliu@gmail.com>
  • Loading branch information
danxuliu committed Dec 27, 2017
1 parent 78891ac commit 1112516
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/files_external/js/mountsfilelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
/** @lends OCA.External.FileList.prototype */ {
appName: 'External storages',

_allowSelection: false,

/**
* @private
*/
Expand All @@ -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;
},

Expand Down

0 comments on commit 1112516

Please sign in to comment.