diff options
author | Simon Rettberg | 2019-11-27 11:22:11 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-11-27 11:22:11 +0100 |
commit | 63c02d5082528d9d0c69520e0034cbb52522208d (patch) | |
tree | 0db60510494949f368b47d5e8da3986a20eb971a /modules-available/locations/templates/locations.html | |
parent | [rebootcontrol] Start adding WOL functionality (diff) | |
download | slx-admin-63c02d5082528d9d0c69520e0034cbb52522208d.tar.gz slx-admin-63c02d5082528d9d0c69520e0034cbb52522208d.tar.xz slx-admin-63c02d5082528d9d0c69520e0034cbb52522208d.zip |
[js_ip/locations] Mode cidr/ip handling to own module
Diffstat (limited to 'modules-available/locations/templates/locations.html')
-rw-r--r-- | modules-available/locations/templates/locations.html | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index f30ebcab..e2224bc0 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -209,7 +209,7 @@ function slxOpenLocation(e, lid) { tr.append(td); $(e).closest('tr').addClass('active slx-bold').after(tr); td.load('?do=Locations&page=details&action=showlocation&locationid=' + lid, function() { - slxAttachCidr(); + if (slxAttachCidr) slxAttachCidr(); scollIntoView(tr); }); slxLastLocation = tr; @@ -230,18 +230,14 @@ function scollIntoView(el) { function slxAddSubnetRow(e, lid) { var tr = $('#loc-sub-' + lid); - tr.before('<tr id="row' + slxAddCounter + '" class="cidrmagic">\ + tr.before('<tr class="cidrmagic">\ <td>#</td>\ <td><input class="form-control cidrstart" type="text" name="newstartaddr[' + slxAddCounter + ']" pattern="\\d{1,3}\.\\d{1,3}\.\\d{1,3}\.\\d{1,3}"></td>\ <td><input class="form-control cidrend" type="text" name="newendaddr[' + slxAddCounter + ']" pattern="\\d{1,3}\.\\d{1,3}\.\\d{1,3}\.\\d{1,3}"></td>\ - <td class="text-center"><button class="btn btn-default btn-sm" type="button" onclick="removeNewSubnetRow(' + slxAddCounter + ')"><span class="glyphicon glyphicon-remove"></span></button></td>\ + <td class="text-center"><button class="btn btn-default btn-sm" type="button" onclick="$(this).closest(\'tr\').remove()"><span class="glyphicon glyphicon-remove"></span></button></td>\ </tr>'); slxAddCounter++; - slxAttachCidr(); -} - -function removeNewSubnetRow(r) { - $("#row"+r).remove(); + if (slxAttachCidr) slxAttachCidr(); } function deleteSubnetWarning(locid) { |