From dee16f6c7ae45867f25da99fbed3499f3bbeadee Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 3 Jan 2020 12:44:12 +0200 Subject: [PATCH] Switch to using Font Awesome This should be more consistent. Signed-off-by: XhmikosR --- scripts/pi-hole/js/customdns.js | 2 +- scripts/pi-hole/js/groups-adlists.js | 19 +++++++------------ scripts/pi-hole/js/groups-clients.js | 19 +++++++------------ scripts/pi-hole/js/groups-domains.js | 19 +++++++------------ scripts/pi-hole/js/groups.js | 14 +++++++------- scripts/pi-hole/js/list.js | 2 +- scripts/pi-hole/php/loginpage.php | 2 +- settings.php | 8 ++++---- 8 files changed, 35 insertions(+), 50 deletions(-) diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index 8d9b7f3c..149fada9 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -52,7 +52,7 @@ $(document).ready(function() { "' data-ip='" + row[1] + "'>" + - '' + + '' + "" ); } diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 53a137ba..f282ebe0 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -19,7 +19,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -42,7 +42,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -56,7 +56,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; @@ -179,7 +179,7 @@ function initTable() { '"; $("td:eq(4)", row).html(button); }, @@ -249,7 +249,7 @@ function addAdlist() { }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-plus", "Successfully added adlist", address); + showAlert("success", "fas fa-plus", "Successfully added adlist", address); $("#new_address").val(""); $("#new_comment").val(""); table.ajax.reload(); @@ -305,12 +305,7 @@ function editAdlist() { }, success: function(response) { if (response.success) { - showAlert( - "success", - "glyphicon glyphicon-pencil", - "Successfully " + done + " adlist ", - address - ); + showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " adlist ", address); } else { showAlert( "error", @@ -345,7 +340,7 @@ function deleteAdlist() { data: { action: "delete_adlist", id: id, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-trash", "Successfully deleted adlist ", address); + showAlert("success", "far fa-trash-alt", "Successfully deleted adlist ", address); table .row(tr) .remove() diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index 68fbed9e..3148a5b2 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -17,7 +17,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -40,7 +40,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -54,7 +54,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; @@ -185,7 +185,7 @@ function initTable() { '"; $("td:eq(2)", row).html(button); }, @@ -252,7 +252,7 @@ function addClient() { data: { action: "add_client", ip: ip, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-plus", "Successfully added client", ip); + showAlert("success", "fas fa-plus", "Successfully added client", ip); reload_client_suggestions(); table.ajax.reload(); } else { @@ -294,12 +294,7 @@ function editClient() { data: { action: "edit_client", id: id, groups: groups, token: token }, success: function(response) { if (response.success) { - showAlert( - "success", - "glyphicon glyphicon-plus", - "Successfully " + done + " client", - ip_name - ); + showAlert("success", "fas fa-plus", "Successfully " + done + " client", ip_name); } else { showAlert("error", "Error while " + not_done + " client with ID " + id, response.message); } @@ -335,7 +330,7 @@ function deleteClient() { data: { action: "delete_client", id: id, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-trash", "Successfully deleted client ", ip_name); + showAlert("success", "far fa-trash-alt", "Successfully deleted client ", ip_name); table .row(tr) .remove() diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index b83c5296..a298531b 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -19,7 +19,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -42,7 +42,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -56,7 +56,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; @@ -196,7 +196,7 @@ function initTable() { '"; $("td:eq(5)", row).html(button); }, @@ -268,7 +268,7 @@ function addDomain() { }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-plus", "Successfully added domain", domain); + showAlert("success", "fas fa-plus", "Successfully added domain", domain); $("#new_domain").val(""); $("#new_comment").val(""); table.ajax.reload(); @@ -329,12 +329,7 @@ function editDomain() { }, success: function(response) { if (response.success) { - showAlert( - "success", - "glyphicon glyphicon-pencil", - "Successfully " + done + " domain", - domain - ); + showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " domain", domain); } else showAlert( "error", @@ -368,7 +363,7 @@ function deleteDomain() { data: { action: "delete_domain", id: id, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-trash", "Successfully deleted domain", domain); + showAlert("success", "far fa-trash-alt", "Successfully deleted domain", domain); table .row(tr) .remove() diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index b7ec372c..33859515 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -18,7 +18,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -41,7 +41,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -55,7 +55,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; @@ -139,7 +139,7 @@ $(document).ready(function() { '"; $("td:eq(3)", row).html(button); } @@ -205,7 +205,7 @@ function addGroup() { data: { action: "add_group", name: name, desc: desc, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-plus", "Successfully added group", name); + showAlert("success", "fas fa-plus", "Successfully added group", name); $("#new_name").val(""); $("#new_desc").val(""); table.ajax.reload(); @@ -259,7 +259,7 @@ function editGroup() { }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-pencil", "Successfully " + done + " group", name); + showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " group", name); } else { showAlert( "error", @@ -294,7 +294,7 @@ function deleteGroup() { data: { action: "delete_group", id: id, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-trash", "Successfully deleted group ", name); + showAlert("success", "far fa-trash-alt", "Successfully deleted group ", name); table .row(tr) .remove() diff --git a/scripts/pi-hole/js/list.js b/scripts/pi-hole/js/list.js index 8a369c34..5765e2c7 100644 --- a/scripts/pi-hole/js/list.js +++ b/scripts/pi-hole/js/list.js @@ -42,7 +42,7 @@ function addListEntry(entry, index, list, button, type) { disabled_message + "" + '' + '' ); // Handle button $(button + " #" + index).on("click", "button", function() { diff --git a/scripts/pi-hole/php/loginpage.php b/scripts/pi-hole/php/loginpage.php index fcd225dc..9c32f713 100644 --- a/scripts/pi-hole/php/loginpage.php +++ b/scripts/pi-hole/php/loginpage.php @@ -41,7 +41,7 @@
- +
diff --git a/settings.php b/settings.php index 1861eb36..33033f24 100644 --- a/settings.php +++ b/settings.php @@ -285,7 +285,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists" @@ -603,7 +603,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists" @@ -633,7 +633,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists" 0) { ?> @@ -647,7 +647,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"