Only left-clicking now activates the selection of an item

This commit is contained in:
Joost Kwakkel 2017-08-05 00:04:15 +02:00
parent a9b794e70c
commit c71032a707
3 changed files with 10 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -113,13 +113,15 @@ class FileManager {
selectRow() {
$('#file_listing tr').on('mousedown', event => {
if($(event.target).is('th') || $(event.target).is('input[data-action="selectAll"]')) {
new ActionsClass().highlightAll(event);
} else if($(event.target).is('td') || $(event.target).is('input[data-action="addSelection"]')) {
new ActionsClass().toggleHighlight(event);
}
if (event.which === 1) {
if ($(event.target).is('th') || $(event.target).is('input[data-action="selectAll"]')) {
new ActionsClass().highlightAll(event);
} else if ($(event.target).is('td') || $(event.target).is('input[data-action="addSelection"]')) {
new ActionsClass().toggleHighlight(event);
}
new ActionsClass().toggleMassActions();
new ActionsClass().toggleMassActions();
}
});
}