From 88bf5a60034ff517cd548c3a6bfacca5f1702d95 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Thu, 8 Aug 2024 17:58:38 -0300 Subject: [PATCH] Show tooltip only when the number of items is greater than MAXIPDISPLAY Signed-off-by: RD WebDesign --- scripts/pi-hole/js/network.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 6bc09dff..46feb020 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -156,10 +156,12 @@ $(function () { // We hit the maximum above, add "..." to symbolize we would // have more to show here ips.push("..."); + // Show the IPs on the title when there are more than MAXIPDISPLAY items + $("td:eq(0)", row).attr("title", iptxt.join("\n")); } + // Show the IPs in the first column $("td:eq(0)", row).html(ips.join("
")); - $("td:eq(0)", row).attr("title", iptxt.join("\n")); // MAC + Vendor field if available if (data.macVendor && data.macVendor.length > 0) {