separate link text for a single certificate
This commit is contained in:
@@ -100,6 +100,7 @@ public class Util {
|
||||
_x("Upload"),
|
||||
_x("Uploads"),
|
||||
_x("User"),
|
||||
_x("View 1 Certificate"),
|
||||
_x("View {0} Certificates"),
|
||||
_x("Your Trust"),
|
||||
_x("{0}% of piece")
|
||||
|
||||
@@ -13,7 +13,11 @@ class Result {
|
||||
if (this.certificates == "0")
|
||||
return ""
|
||||
var id = this.hostB64 + "_" + this.infoHash
|
||||
var linkText = _t("View {0} Certificates", this.certificates)
|
||||
var linkText
|
||||
if (this.certificates == "1")
|
||||
linkText = _t("View 1 Certificate")
|
||||
else
|
||||
linkText = _t("View {0} Certificates", this.certificates)
|
||||
var link = "<a href='#' onclick='window.showCertificates(\"" + this.hostB64 + "\",\"" + this.infoHash + "\");return false;'>" + linkText + "</a>"
|
||||
var linkBlock = "<div id='certificates-link-" + id + "'>" + link + "</div>"
|
||||
linkBlock += "<div id='certificates-" + id + "'></div>"
|
||||
@@ -103,7 +107,11 @@ function hideCertificates(hostB64, infoHash) {
|
||||
certSpan.innerHTML = ""
|
||||
|
||||
var result = resultsByInfoHash.get(infoHash)
|
||||
var showLinkText = _t("View {0} Certificates", result.certificates)
|
||||
var showLinkText
|
||||
if (result.certificates == "1")
|
||||
showLinkText = _t("View 1 Certificate")
|
||||
else
|
||||
showLinkText = _t("View {0} Certificates", result.certificates)
|
||||
var showLink = "<a href='#' onclick='window.showCertificates(\"" + hostB64 + "\",\"" + infoHash + "\");return false;'>" + showLinkText + "</a>"
|
||||
|
||||
var linkSpan = document.getElementById("certificates-link-" + id)
|
||||
|
||||
@@ -326,8 +326,12 @@ class SenderForResult {
|
||||
getCertificatesBlock() {
|
||||
if (this.certificates == "0")
|
||||
return ""
|
||||
var linkText
|
||||
if (this.certificates == "1")
|
||||
linkText = _t("View 1 Certificate")
|
||||
else
|
||||
linkText = _t("View {0} Certificates", this.certificates)
|
||||
var id = this.b64 + "_" + currentResult
|
||||
var linkText = _t("View {0} Certificates", this.certificates)
|
||||
var link = "<a href='#' onclick='window.viewCertificatesByFile(\"" + this.b64 + "\",\"" + this.certificates + "\");return false;')>" + linkText + "</a>"
|
||||
var linkBlock = "<div id='certificates-link-" + id + "'>" + link + "</div>"
|
||||
var certBlock = "<div id='certificates-" + id + "'></div>"
|
||||
@@ -636,7 +640,11 @@ function hideCertificatesByFile(fileSenderB64, count) {
|
||||
fetchSpan.innerHTML = ""
|
||||
|
||||
var linkSpan = document.getElementById("certificates-link-" + id)
|
||||
var linkText = _t("View {0} Certificates", count)
|
||||
var linkText
|
||||
if (count == "1")
|
||||
linkText = _t("View 1 Certificate")
|
||||
else
|
||||
linkText = _t("View {0} Certificates", count)
|
||||
var showLink = "<a href='#' onclick='window.viewCertificatesByFile(\"" + fileSenderB64 + "\",\"" + count + "\");return false;'>" + linkText + "</a>"
|
||||
linkSpan.innerHTML = showLink
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user