Skip to content

Commit

Permalink
Don't show the "Click to ..." tooltip when filtering is disabled
Browse files Browse the repository at this point in the history
Fixes #971

Signed-off-by: Mcat12 <[email protected]>
  • Loading branch information
AzureMarker committed Sep 11, 2019
1 parent c96ed02 commit 460333a
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions scripts/pi-hole/js/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,21 +350,45 @@ $(document).ready(function() {
// Query type IPv4 / IPv6
api.$("td:eq(1)").click( function () { if(autofilter()){ api.search( this.innerHTML ).draw(); $("#resetButton").show(); }});
api.$("td:eq(1)").hover(
function () { this.title="Click to show only "+this.innerHTML+" queries"; this.style.color="#72afd2"; },
function () {
if(autofilter()) {
this.title = "Click to show only " + this.innerHTML + " queries";
this.style.color = "#72afd2";
} else {
this.title = "";
this.style.color = "";
}
},
function () { this.style.color=""; }
);
api.$("td:eq(1)").css("cursor","pointer");
// Domain
api.$("td:eq(2)").click( function () { if(autofilter()){ api.search( this.innerHTML ).draw(); $("#resetButton").show(); }});
api.$("td:eq(2)").hover(
function () { this.title="Click to show only queries with domain "+this.innerHTML; this.style.color="#72afd2"; },
function () {
if(autofilter()) {
this.title = "Click to show only queries with domain " + this.innerHTML;
this.style.color = "#72afd2";
} else {
this.title = "";
this.style.color = "";
}
},
function () { this.style.color=""; }
);
api.$("td:eq(2)").css("cursor","pointer");
// Client
api.$("td:eq(3)").click( function () { if(autofilter()){ api.search( this.innerHTML ).draw(); $("#resetButton").show(); }});
api.$("td:eq(3)").hover(
function () { this.title="Click to show only queries made by "+this.innerHTML; this.style.color="#72afd2"; },
function () {
if(autofilter()) {
this.title = "Click to show only queries made by " + this.innerHTML;
this.style.color = "#72afd2";
} else {
this.title = "";
this.style.color = "";
}
},
function () { this.style.color=""; }
);
api.$("td:eq(3)").css("cursor","pointer");
Expand Down

0 comments on commit 460333a

Please sign in to comment.