From a76e43e6b050c32e902de425ea58d97e316ef2b5 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 2 Oct 2021 13:15:39 +0530 Subject: [PATCH] zone.js: code refactoring done. --- DnsServerCore/www/js/zone.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/DnsServerCore/www/js/zone.js b/DnsServerCore/www/js/zone.js index 472f5137..25d2d02a 100644 --- a/DnsServerCore/www/js/zone.js +++ b/DnsServerCore/www/js/zone.js @@ -18,7 +18,6 @@ along with this program. If not, see . */ $(function () { - $("input[type=radio][name=rdAddZoneType]").change(function () { $("#divAddZonePrimaryNameServerAddresses").hide(); @@ -288,7 +287,7 @@ function enableZone(objBtn, domain) { function disableZone(objBtn, domain) { if (!confirm("Are you sure you want to disable the zone '" + domain + "'?")) - return false; + return; var btn = $(objBtn); var id = btn.attr("data-id"); @@ -318,7 +317,7 @@ function disableZone(objBtn, domain) { function deleteZone(objBtn, domain, editZone) { if (!confirm("Are you sure you want to permanently delete the zone '" + domain + "' and all its records?")) - return false; + return; if (editZone == null) editZone = false; @@ -530,14 +529,13 @@ function saveZoneOptions() { } function resyncZone(objBtn, domain) { - if ($("#titleEditZoneType").text() == "Secondary") { if (!confirm("The resync action will perform a full zone transfer (AXFR). You will need to check the logs to confirm if the resync action was successful.\r\n\r\nAre you sure you want to resync the '" + domain + "' zone?")) - return false; + return; } else { if (!confirm("The resync action will perform a full zone refresh. You will need to check the logs to confirm if the resync action was successful.\r\n\r\nAre you sure you want to resync the '" + domain + "' zone?")) - return false; + return; } var btn = $(objBtn); @@ -2139,7 +2137,7 @@ function deleteRecord(objBtn) { domain = "."; if (!confirm("Are you sure to permanently delete the " + type + " record '" + domain + "' with value '" + value + "'?")) - return false; + return; var apiUrl = "/api/deleteRecord?token=" + token + "&domain=" + domain + "&type=" + type + "&value=" + encodeURIComponent(value);