diff --git a/web/javascript/file-row.js b/web/javascript/file-row.js index 7b76e4ec8..1f6352c9e 100644 --- a/web/javascript/file-row.js +++ b/web/javascript/file-row.js @@ -172,6 +172,13 @@ function FileRow(torrent, i) this.isEditable = function () { return (fields.torrent.getFileCount()>1) && !isDone(); }; + this.getPath = function () { + var file = torrent.getFile(i); + path = file.name.replace(/\/\/+/g,'/') + path = path.split('/').slice(0,-1) + path.push('t' + fields.torrent.getId() + 'f' + fields.index) + return path + }; initialize(torrent, i); }; diff --git a/web/javascript/inspector.js b/web/javascript/inspector.js index 320df186b..f8395b4c9 100644 --- a/web/javascript/inspector.js +++ b/web/javascript/inspector.js @@ -503,20 +503,133 @@ function Inspector(controller) { // build the file list tor = torrents[0]; + for (parentid in data.parents) { + data.parents[parentid] = $('#'+parentid).children('li').css('display') + } clearFileList(); data.file_torrent = tor; n = tor.getFileCount(); data.file_rows = []; fragment = document.createDocumentFragment(); - + heirarchy = {'/':[]} + for (i=0; i