diff --git a/.gitmodules b/.gitmodules index 5b6a506..8064296 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "jtable"] path = jtable url = https://github.com/hikalkan/jtable.git +[submodule "addclear"] + path = js/addclear + url = https://github.com/skorecky/Add-Clear.git diff --git a/index.php b/index.php index 550507f..f90a3db 100644 --- a/index.php +++ b/index.php @@ -34,6 +34,7 @@ if (!is_logged_in() and isset($_POST['formname']) && $_POST['formname'] == "logi + - + - + - +
Gebruikersnaam:Username:
Wachtwoord:Password:
@@ -117,7 +118,13 @@ if (isset($templatelist)) {
-
+
+ +
@@ -473,6 +480,15 @@ $(document).ready(function () { } } }); + $('#domsearch').addClear({ + onClear: function() { $('#MasterZones').jtable('load'); } + }); + $('#domsearch').on('input', function (e) { + e.preventDefault(); + $('#MasterZones').jtable('load', { + domsearch: $('#domsearch').val() + }); + }); $('#MasterZones').jtable('load'); }); diff --git a/zones.php b/zones.php index 3b7850c..c02d0cc 100644 --- a/zones.php +++ b/zones.php @@ -182,6 +182,13 @@ if ($action == "list" or $action== "listslaves") { if (check_owner($zone['name']) === FALSE) continue; + if (isset($_POST['domsearch'])) { + $q = $_POST['domsearch']; + if (!preg_match("/$q/", $zone['name']) == 1) { + continue; + } + } + $zone['name'] = htmlspecialchars($zone['name']); $zone['owner'] = get_zone_owner($zone['name']); if ($action == "listslaves" and $zone['kind'] == "Slave") {