(trunk web) Add Select / Deselect All buttons to the file listing. Patch from Grug. Fixes #2294

This commit is contained in:
Kevin Glowacz
2009-12-06 03:21:08 +00:00
parent d370222113
commit a53de0d430
5 changed files with 90 additions and 13 deletions

View File

@@ -808,18 +808,20 @@ TorrentFile.prototype = {
}
},
setWanted: function(wanted) {
setWanted: function(wanted, process) {
this._dirty = true;
this._wanted = wanted;
if(!iPhone)
this.element().toggleClass( 'skip', !wanted );
var command = wanted ? 'files-wanted' : 'files-unwanted';
this._torrent._controller.changeFileCommand(command, this._torrent, this);
if (process) {
var command = wanted ? 'files-wanted' : 'files-unwanted';
this._torrent._controller.changeFileCommand(command, this._torrent, this);
}
},
toggleWanted: function() {
if (this.isEditable())
this.setWanted( !this._wanted );
this.setWanted( !this._wanted, true );
},
refreshHTML: function() {