mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +00:00
(trunk web) remove cruft from Transmission.onRowClicked()
This commit is contained in:
parent
6c61d6ac67
commit
dd762bc7ea
1 changed files with 35 additions and 35 deletions
|
@ -1584,50 +1584,50 @@ Transmission.prototype =
|
||||||
this.remote.getInitialDataFor(null ,function(torrents) { tr.addTorrents(torrents); });
|
this.remote.getInitialDataFor(null ,function(torrents) { tr.addTorrents(torrents); });
|
||||||
},
|
},
|
||||||
|
|
||||||
onRowClicked: function(ev, row)
|
onRowClicked: function(ev, row)
|
||||||
{
|
{
|
||||||
// Prevents click carrying to parent element
|
// Prevents click carrying to parent element
|
||||||
// which deselects all on click
|
// which deselects all on click
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
// but still hide the context menu if it is showing
|
// but still hide the context menu if it is showing
|
||||||
$('#jqContextMenu').hide();
|
$('#jqContextMenu').hide();
|
||||||
|
|
||||||
// 'Apple' button emulation on PC :
|
// 'Apple' button emulation on PC :
|
||||||
// Need settable meta-key and ctrl-key variables for mac emulation
|
// Need settable meta-key and ctrl-key variables for mac emulation
|
||||||
var meta_key = ev.metaKey;
|
var meta_key = ev.metaKey;
|
||||||
if (ev.ctrlKey && navigator.appVersion.toLowerCase().indexOf("mac") == -1)
|
if (ev.ctrlKey && navigator.appVersion.toLowerCase().indexOf("mac") == -1)
|
||||||
meta_key = true;
|
meta_key = true;
|
||||||
|
|
||||||
// Shift-Click - selects a range from the last-clicked row to this one
|
// Shift-Click - selects a range from the last-clicked row to this one
|
||||||
if (iPhone) {
|
if (iPhone) {
|
||||||
if (row.isSelected())
|
if (row.isSelected())
|
||||||
this.showInspector();
|
this.showInspector();
|
||||||
this.setSelectedRow(row, true);
|
this.setSelectedRow(row);
|
||||||
|
|
||||||
} else if (ev.shiftKey) {
|
} else if (ev.shiftKey) {
|
||||||
this.selectRange(row, true);
|
this.selectRange(row);
|
||||||
// Need to deselect any selected text
|
// Need to deselect any selected text
|
||||||
window.focus();
|
window.focus();
|
||||||
|
|
||||||
// Apple-Click, not selected
|
// Apple-Click, not selected
|
||||||
} else if (!row.isSelected() && meta_key) {
|
} else if (!row.isSelected() && meta_key) {
|
||||||
this.selectRow(row, true);
|
this.selectRow(row);
|
||||||
|
|
||||||
// Regular Click, not selected
|
// Regular Click, not selected
|
||||||
} else if (!row.isSelected()) {
|
} else if (!row.isSelected()) {
|
||||||
this.setSelectedRow(row, true);
|
this.setSelectedRow(row);
|
||||||
|
|
||||||
// Apple-Click, selected
|
// Apple-Click, selected
|
||||||
} else if (row.isSelected() && meta_key) {
|
} else if (row.isSelected() && meta_key) {
|
||||||
this.deselectRow(row);
|
this.deselectRow(row);
|
||||||
|
|
||||||
// Regular Click, selected
|
// Regular Click, selected
|
||||||
} else if (row.isSelected()) {
|
} else if (row.isSelected()) {
|
||||||
this.setSelectedRow(row, true);
|
this.setSelectedRow(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._last_torrent_clicked = row.getTorrent().getId();
|
this._last_torrent_clicked = row.getTorrent().getId();
|
||||||
},
|
},
|
||||||
|
|
||||||
addTorrents: function(new_torrents)
|
addTorrents: function(new_torrents)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue