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:
parent
78891ac320
commit
11125164be
|
@ -30,6 +30,8 @@
|
||||||
/** @lends OCA.External.FileList.prototype */ {
|
/** @lends OCA.External.FileList.prototype */ {
|
||||||
appName: 'External storages',
|
appName: 'External storages',
|
||||||
|
|
||||||
|
_allowSelection: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
@ -56,7 +58,6 @@
|
||||||
$scopeColumn.find('span').text(scopeText);
|
$scopeColumn.find('span').text(scopeText);
|
||||||
$backendColumn.text(fileData.backend);
|
$backendColumn.text(fileData.backend);
|
||||||
$tr.find('td.filename').after($scopeColumn).after($backendColumn);
|
$tr.find('td.filename').after($scopeColumn).after($backendColumn);
|
||||||
$tr.find('td.filename input:checkbox').remove();
|
|
||||||
return $tr;
|
return $tr;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue