From 2dc97b160ad82237c494860fbcbbde1283295518 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Wed, 7 May 2014 14:48:42 +0000 Subject: [PATCH] i2psnark: Allow click on entire table cell for viewing torrent details --- .../java/src/org/klomp/snark/web/I2PSnarkServlet.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java index a77fbf0938..0b4c0663e3 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java @@ -1347,7 +1347,14 @@ public class I2PSnarkServlet extends BasicServlet { } // Torrent name column - out.write("</td><td class=\"snarkTorrentName\">"); + out.write("</td><td class=\"snarkTorrentName\""); + if (isMultiFile) { + // link on the whole td + String jsec = encodedBaseName.replace("'", "\\'"); + out.write(" onclick=\"document.location='" + encodedBaseName + "/';\">"); + } else { + out.write('>'); + } if (remaining == 0 || isMultiFile) { StringBuilder buf = new StringBuilder(128); buf.append("<a href=\"").append(encodedBaseName); -- GitLab