From: Jordan Lee Date: Mon, 29 Aug 2011 21:12:05 +0000 (+0000) Subject: in transmission.updateFileList(), move the var declarations to the front of the function. X-Git-Tag: 2.40b1~113 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1013ff1a4e1cdfb752507c82449678e988b2d4e;p=transmission in transmission.updateFileList(), move the var declarations to the front of the function. --- diff --git a/web/javascript/transmission.js b/web/javascript/transmission.js index d8b418b67..f82424026 100644 --- a/web/javascript/transmission.js +++ b/web/javascript/transmission.js @@ -1640,24 +1640,27 @@ Transmission.prototype = }, updateFileList: function() { + var i, n, tr, sel, row, torrent, fragment; + if (!$(this._inspector_file_list).is(':visible')) return; - var sel = this.getSelectedTorrents(); + sel = this.getSelectedTorrents(); if (sel.length !== 1) { this.clearFileList(); return; } // build the file list + torrent = sel[0]; this.clearFileList(); this._file_torrent = torrent; - var n = torrent.getFileCount(); + n = torrent.getFileCount(); this._file_rows = []; - var fragment = document.createDocumentFragment(); - var tr = this; - for (var i=0; i