Add processing double click on torrent

Starting/pausing torrent by double-clicking on it.
This commit is contained in:
buinsky 2015-01-30 00:16:28 +03:00
parent 0fee2216d0
commit c4332fe9a9
2 changed files with 13 additions and 0 deletions

View file

@ -356,6 +356,17 @@ var dynamicTable = new Class({
myTable.selectRow(this.hash);
return true;
});
tr.addEvent('dblclick', function (e) {
e.stop();
myTable.selectRow(this.hash);
var row = myTable.rows.get(this.hash);
var state = row['full_data'].state;
if (~state.indexOf('paused'))
startFN();
else
pauseFN();
return true;
});
tr.addEvent('click', function (e) {
e.stop();
if (e.control) {

View file

@ -30,6 +30,8 @@ function getLocalStorageItem(name, defaultVal) {
}
var deleteFN = function() {};
var startFN = function() {};
var pauseFN = function() {};
initializeWindows = function() {