diff --git a/webui/src/main/js/filesTable.js b/webui/src/main/js/filesTable.js index 9de82264..2c84b7ab 100644 --- a/webui/src/main/js/filesTable.js +++ b/webui/src/main/js/filesTable.js @@ -1,6 +1,7 @@ class SharedFile { - constructor(name, path, size, comment, certified) { + constructor(name, infoHash, path, size, comment, certified) { this.name = name + this.infoHash = infoHash this.path = path this.size = size this.comment = comment @@ -19,7 +20,8 @@ class SharedFile { var showCommentLink = new Link(_t("Comment"), "showCommentForm", [this.path]) showCommentHtml = "" + showCommentLink.render() + "" showCommentHtml += "
" - mapping.set("File", this.name + " " + unshareLink.render() + " " + certifyHtml + " " + showCommentHtml) + var fetchLink = "" + _t("Fetch") + "" + mapping.set("File", this.name + "
" + unshareLink.render() + " " + fetchLink + " " + certifyHtml + " " + showCommentHtml + "
") mapping.set("Size", this.size) return mapping @@ -76,6 +78,7 @@ function refreshTable() { var i for(i = 0; i < files.length; i++) { var fileName = files[i].getElementsByTagName("Path")[0].childNodes[0].nodeValue + var infoHash = files[i].getElementsByTagName("InfoHash")[0].childNodes[0].nodeValue var size = files[i].getElementsByTagName("Size")[0].childNodes[0].nodeValue var comment = files[i].getElementsByTagName("Comment") if (comment != null && comment.length == 1) @@ -85,7 +88,7 @@ function refreshTable() { var certified = files[i].getElementsByTagName("Certified")[0].childNodes[0].nodeValue var path = Base64.encode(fileName) - var newSharedFile = new SharedFile(fileName, path, size, comment, certified) + var newSharedFile = new SharedFile(fileName, infoHash, path, size, comment, certified) filesByPath.set(path, newSharedFile) filesList.push(newSharedFile) }