From 8158ec60b33d529bdca97942fccb8dc66a2c5e7c Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 19 Mar 2009 12:46:53 +0000 Subject: [PATCH] #1940 Disable file wanted and priority selector when there is only one file. --- web/javascript/torrent.js | 18 ++++++++---------- web/stylesheets/common.css | 5 +++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/web/javascript/torrent.js b/web/javascript/torrent.js index a58292de3..6e715a37e 100644 --- a/web/javascript/torrent.js +++ b/web/javascript/torrent.js @@ -88,7 +88,7 @@ Torrent.prototype = // insert the element $('#torrent_list').append(this._element); - this.initializeTorrentFilesInspectorGroup(); + this.initializeTorrentFilesInspectorGroup(data.files.length); for (var i = 0; i < data.files.length; i++) { var file = data.files[i]; @@ -107,14 +107,12 @@ Torrent.prototype = this.refresh(data); }, - initializeTorrentFilesInspectorGroup: function() { + initializeTorrentFilesInspectorGroup: function(length) { this._files = []; - this._fileList = $('