Browse Source

Add processing double click on torrent

Starting/pausing torrent by double-clicking on it.
adaptive-webui-19844
buinsky 10 years ago
parent
commit
c4332fe9a9
  1. 11
      src/webui/www/public/scripts/dynamicTable.js
  2. 2
      src/webui/www/public/scripts/mocha-init.js

11
src/webui/www/public/scripts/dynamicTable.js

@ -356,6 +356,17 @@ var dynamicTable = new Class({
myTable.selectRow(this.hash); myTable.selectRow(this.hash);
return true; 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) { tr.addEvent('click', function (e) {
e.stop(); e.stop();
if (e.control) { if (e.control) {

2
src/webui/www/public/scripts/mocha-init.js

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

Loading…
Cancel
Save