(trunk web) #4731 "'Select All' and 'Deselect All' options missing from Inspector>Files" -- fixed.

This commit is contained in:
Jordan Lee
2012-02-03 22:59:33 +00:00
parent fbc7f3dc3c
commit 9a27751d77
6 changed files with 106 additions and 8 deletions

View File

@@ -453,6 +453,14 @@ function Inspector(controller) {
data.controller.changeFileCommand(torrentId, rowIndices, command);
},
selectAllFiles = function() {
changeFileCommand([], 'files-wanted');
},
deselectAllFiles = function() {
changeFileCommand([], 'files-unwanted');
},
onFileWantedToggled = function(ev, row, want) {
changeFileCommand([row], want?'files-wanted':'files-unwanted');
},
@@ -714,6 +722,10 @@ function Inspector(controller) {
data.elements.comment_lb = $('#inspector-info-comment')[0];
data.elements.name_lb = $('#torrent_inspector_name')[0];
// file page's buttons
$('#select-all-files').click(selectAllFiles);
$('#deselect-all-files').click(deselectAllFiles);
// force initial 'N/A' updates on all the pages
updateInspector();
updateInfoPage();