Add an apply button to the new Audit log page (#532)

* Add an apply button to the new Audit log page

* The button is not actually called "Apply"
This commit is contained in:
DL6ER
2017-07-14 22:50:09 +02:00
committed by GitHub
parent 40ae7fb0ca
commit a13b7bd692
3 changed files with 20 additions and 5 deletions
+9 -1
View File
@@ -69,11 +69,19 @@
<!-- /.box -->
</div>
<div class="col-md-12">
<p><strong>Important:</strong> Note that black- and whitelisted domains are not automatically applied on this page to avoid restarting the DNS service too often. Instead, go to <a href="http://pi.hole/admin/gravity.php">Update Lists</a> and run the update, to have the new settings become effective.</p>
<p><strong>Important:</strong> Note that black- and whitelisted domains are not automatically applied on this page to avoid restarting the DNS service too often. Instead, click on this button, to have the new settings become effective:</p>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<div class="container">
<div class="row justify-content-md-right">
<div class="col-2">
<button class="btn btn-lg btn-primary btn-block" id="gravityBtn" disabled="true">Update black-/whitelists</button>
</div>
</div>
</div>
<?php
require "scripts/pi-hole/php/footer.php";
?>
+2 -2
View File
@@ -1,4 +1,4 @@
<?php /*
<?php /*
* Pi-hole: A black hole for Internet advertisements
* (c) 2017 Pi-hole, LLC (https://pi-hole.net)
* Network-wide ad blocking via your own hardware.
@@ -9,7 +9,7 @@
?>
<!-- Title -->
<div class="page-header">
<h1>Update list of ad-serving domains</h1>
<h1>Update list of ad-serving domains / blacklist / whitelist</h1>
</div>
<!-- Alerts -->
+9 -2
View File
@@ -89,9 +89,10 @@ $(document).ready(function() {
$("#domain-frequency tbody").on( "click", "button", function () {
var url = ($(this).parents("tr"))[0].innerText.split(" ")[0];
if($(this).context.innerText === "Blacklist")
if($(this).context.innerText === " Blacklist")
{
add(url,"black");
$("#gravityBtn").prop("disabled", false);
}
else
{
@@ -101,9 +102,10 @@ $(document).ready(function() {
$("#ad-frequency tbody").on( "click", "button", function () {
var url = ($(this).parents("tr"))[0].innerText.split(" ")[0].split(" ")[0];
if($(this).context.innerText === "Whitelist")
if($(this).context.innerText === " Whitelist")
{
add(url,"white");
$("#gravityBtn").prop("disabled", false);
}
else
{
@@ -111,3 +113,8 @@ $(document).ready(function() {
}
});
});
$("#gravityBtn").on("click", function() {
window.location.replace("gravity.php?go");
});