Disable selection in "External storages" file list

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>
This commit is contained in:
Daniel Calviño Sánchez 2017-12-27 16:31:22 +01:00
parent 78891ac320
commit 11125164be
1 changed files with 2 additions and 1 deletions

View File

@ -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;
},