diff options
author | Simon Rettberg | 2016-06-24 17:08:24 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-06-24 17:08:24 +0200 |
commit | 3d0cb99c70dd9714655cf26893504e4bd007b036 (patch) | |
tree | 8b5cdaee9c0196aedb6a5c3f8138005a18091fa8 /modules-available/locations/templates/locations.html | |
parent | modified the editor toolbar. (diff) | |
download | slx-admin-3d0cb99c70dd9714655cf26893504e4bd007b036.tar.gz slx-admin-3d0cb99c70dd9714655cf26893504e4bd007b036.tar.xz slx-admin-3d0cb99c70dd9714655cf26893504e4bd007b036.zip |
[locations] Support CIDR notion (start field), tweak templates a bit
Diffstat (limited to 'modules-available/locations/templates/locations.html')
-rw-r--r-- | modules-available/locations/templates/locations.html | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index 2971105b..1fb60926 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -6,13 +6,15 @@ <table class="table table-condensed" style="margin-bottom:0px"> <tr> <th width="100%">{{lang_locationName}}</th> - <th>{{#havestatistics}}{{lang_machineCount}}{{/havestatistics}}</th> - <th class="slx-nowrap">{{lang_editConfigVariables}}</th> - {{#havesysconfig}} + <th> + {{#havestatistics}}{{lang_machineCount}}{{/havestatistics}} + </th> + <th class="slx-nowrap"> + {{#havebaseconfig}}{{lang_editConfigVariables}}{{/havebaseconfig}} + </th> <th class="slx-nowrap"> - {{#havebaseconfig}}{{lang_sysConfig}}{{/havebaseconfig}} + {{#havesysconfig}}{{lang_sysConfig}}{{/havesysconfig}} </th> - {{/havesysconfig}} </tr> {{#list}} <tr> @@ -37,13 +39,13 @@ {{/havebaseconfig}} </td> <td class="slx-nowrap"> + {{#havesysconfig}} <div class="pull-right"> <a class="btn btn-default btn-xs" href="?do=sysconfig&locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a> </div> <span class="{{configClass}}"> {{configName}}   </span> - {{#havesysconfig}} {{/havesysconfig}} </td> </tr> @@ -123,23 +125,26 @@ function slxOpenLocation(e, lid) { } return; } - var td = $('<td>').attr('colspan', '2').css('padding', '0px 0px 12px'); + var td = $('<td>').attr('colspan', '4').css('padding', '0px 0px 12px'); var tr = $('<tr>').attr('id', 'location-details-' + lid); tr.append(td); $(e).closest('tr').addClass('active slx-bold').after(tr); - td.load('?do=Locations&action=showlocation&locationid=' + lid); + td.load('?do=Locations&action=showlocation&locationid=' + lid, function() { + slxAttachCidr(); + }); slxLastLocation = tr; } function slxAddSubnetRow(e, lid) { var tr = $('#loc-sub-' + lid); - tr.before('<tr>\ + tr.before('<tr class="cidrmagic">\ <td>#</td>\ - <td><input class="form-control" type="text" name="newstartaddr[' + slxAddCounter + ']" pattern="\\d{1,3}\.\\d{1,3}\.\\d{1,3}\.\\d{1,3}"></td>\ - <td><input class="form-control" type="text" name="newendaddr[' + slxAddCounter + ']" pattern="\\d{1,3}\.\\d{1,3}\.\\d{1,3}\.\\d{1,3}"></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></td>\ </tr>'); slxAddCounter++; + slxAttachCidr(); } function slxConfirm() { |