diff --git a/web/index.html b/web/index.html
index 873af9f42..1e71bf29e 100755
--- a/web/index.html
+++ b/web/index.html
@@ -61,6 +61,7 @@
Downloading
Seeding
Paused
+ Finished
diff --git a/web/javascript/common.js b/web/javascript/common.js
index f1c234858..3461fa97c 100644
--- a/web/javascript/common.js
+++ b/web/javascript/common.js
@@ -229,6 +229,7 @@ Prefs._FilterActive = 'active';
Prefs._FilterSeeding = 'seeding';
Prefs._FilterDownloading = 'downloading';
Prefs._FilterPaused = 'paused';
+Prefs._FilterFinished = 'finished';
Prefs._SortDirection = 'sort_direction';
Prefs._SortAscending = 'ascending';
diff --git a/web/javascript/torrent.js b/web/javascript/torrent.js
index ee63cf9e4..556386ed9 100644
--- a/web/javascript/torrent.js
+++ b/web/javascript/torrent.js
@@ -235,6 +235,7 @@ Torrent.prototype =
|| this.state() == Torrent._StatusChecking; },
isActive: function() { return this.state() != Torrent._StatusPaused; },
isDownloading: function() { return this.state() == Torrent._StatusDownloading; },
+ isFinished: function() { return this._isFinishedSeeding; },
isSeeding: function() { return this.state() == Torrent._StatusSeeding; },
name: function() { return this._name; },
peersSendingToUs: function() { return this._peers_sending_to_us; },
@@ -254,7 +255,7 @@ Torrent.prototype =
switch( this.state() ) {
case Torrent._StatusSeeding: return 'Seeding';
case Torrent._StatusDownloading: return 'Downloading';
- case Torrent._StatusPaused: return this._isFinishedSeeding ? 'Seeding complete' : 'Paused';
+ case Torrent._StatusPaused: return this.isFinished() ? 'Seeding complete' : 'Paused';
case Torrent._StatusChecking: return 'Verifying local data';
case Torrent._StatusWaitingToCheck: return 'Waiting to verify';
default: return 'error';
@@ -746,6 +747,9 @@ Torrent.prototype =
case Prefs._FilterPaused:
pass = !this.isActive();
break;
+ case Prefs._FilterFinished:
+ pass = this.isFinished();
+ break;
default:
pass = true;
break;
diff --git a/web/javascript/transmission.js b/web/javascript/transmission.js
index b8665601e..d8fcece20 100644
--- a/web/javascript/transmission.js
+++ b/web/javascript/transmission.js
@@ -46,6 +46,7 @@ Transmission.prototype =
$('#filter_downloading_link').parent().bind('click', function(e){ tr.showDownloadingClicked(e); });
$('#filter_seeding_link').parent().bind('click', function(e){ tr.showSeedingClicked(e); });
$('#filter_paused_link').parent().bind('click', function(e){ tr.showPausedClicked(e); });
+ $('#filter_finished_link').parent().bind('click', function(e){ tr.showFinishedClicked(e); });
$('.inspector_tab').bind('click', function(e){ tr.inspectorTabClicked(e, this); });
$('.file_wanted_control').live('click', function(e){ tr.fileWantedClicked(e, this); });
$('.file_priority_control').live('click', function(e){ tr.filePriorityClicked(e, this); });
@@ -735,6 +736,7 @@ Transmission.prototype =
case Prefs._FilterSeeding: c = '#filter_seeding_link'; break;
case Prefs._FilterDownloading: c = '#filter_downloading_link'; break;
case Prefs._FilterPaused: c = '#filter_paused_link'; break;
+ case Prefs._FilterFinished: c = '#filter_finished_link'; break;
}
$(c).parent().siblings().removeClass('selected');
$(c).parent().addClass('selected');
@@ -758,6 +760,9 @@ Transmission.prototype =
showPausedClicked: function(event) {
this.setFilter( Prefs._FilterPaused );
},
+ showFinishedClicked: function(event) {
+ this.setFilter( Prefs._FilterFinished );
+ },
/*
* 'Clutch Preferences' was clicked (iPhone only)