Browse Source

Merge pull request #3348 from ngosang/webuistates

[Web UI] Fix missing torrent states.
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
d0b54b0797
  1. 31
      src/webui/www/public/scripts/dynamicTable.js

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

@ -250,15 +250,15 @@ var dynamicTable = new Class({
var state = row['full_data'].state; var state = row['full_data'].state;
switch(filterName) { switch(filterName) {
case 'downloading': case 'downloading':
if ((state != 'downloading') && !~state.indexOf('DL')) if (state != 'downloading' && !~state.indexOf('DL'))
return false; return false;
break; break;
case 'seeding': case 'seeding':
if ((state != 'uploading') && (state != 'stalledUP') && (state != 'queuedUP') && (state != 'checkingUP')) if (state != 'uploading' && state != 'forcedUP' && state != 'stalledUP' && state != 'queuedUP' && state != 'checkingUP')
return false; return false;
break; break;
case 'completed': case 'completed':
if ((state != 'uploading') && !~state.indexOf('UP')) if (state != 'uploading' && !~state.indexOf('UP'))
return false; return false;
break; break;
case 'paused': case 'paused':
@ -270,11 +270,11 @@ var dynamicTable = new Class({
return false; return false;
break; break;
case 'active': case 'active':
if ((state != 'uploading') && (state != 'downloading')) if (state != 'downloading' && state != 'forcedDL' && state != 'uploading' && state != 'forcedUP')
return false; return false;
break; break;
case 'inactive': case 'inactive':
if ((state == 'uploading') || (state == 'downloading')) if (state == 'downloading' || state == 'forcedDL' || state == 'uploading' || state == 'forcedUP')
return false; return false;
break; break;
} }
@ -501,16 +501,23 @@ var dynamicTable = new Class({
this.columns['state_icon'].updateTd = function (td, row) { this.columns['state_icon'].updateTd = function (td, row) {
var state = this.getRowValue(row); var state = this.getRowValue(row);
if (state == "pausedUP" || state == "pausedDL") if (state == "forcedDL" || state == "metaDL")
state = "paused";
else if (state == "queuedUP" || state == "queuedDL")
state = "queued";
else if (state == "checkingUP" || state == "checkingDL")
state = "checking";
else if (state == "forcedDL" || state == "metaDL")
state = "downloading"; state = "downloading";
else if (state == "allocating")
state = "stalledDL";
else if (state == "forcedUP") else if (state == "forcedUP")
state = "uploading"; state = "uploading";
else if (state == "pausedDL")
state = "paused";
else if (state == "pausedUP")
state = "completed";
else if (state == "queuedDL" || state == "queuedUP")
state = "queued";
else if (state == "checkingDL" || state == "checkingUP" ||
state == "queuedForChecking" || state == "checkingResumeData")
state = "checking";
else if (state == "unknown")
state = "error";
var img_path = 'images/skin/' + state + '.png'; var img_path = 'images/skin/' + state + '.png';

Loading…
Cancel
Save