From 1724b55abdfcee25fe58f5f9fb763e99081043c9 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Wed, 13 Sep 2017 17:01:30 +0200 Subject: [locations] fixed inconsistencies + small design changes --- .../locations/templates/location-subnets.html | 92 ++++++++++++++-------- .../locations/templates/locations.html | 46 +++++++---- modules-available/locations/templates/subnets.html | 9 ++- 3 files changed, 98 insertions(+), 49 deletions(-) (limited to 'modules-available/locations/templates') diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html index b8a2b091..0722e54b 100644 --- a/modules-available/locations/templates/location-subnets.html +++ b/modules-available/locations/templates/location-subnets.html @@ -8,9 +8,9 @@
-
+
- {{lang_name}} + {{lang_name}}
@@ -24,13 +24,9 @@
- -
-
- - +
+
-

{{lang_assignedSubnets}}
@@ -40,47 +36,81 @@ # {{lang_startAddress}} {{lang_endAddress}} - + {{#list}} {{subnetid}} - + +
+ + +
+ {{/list}} - -
-
- {{#roomplanner}} - {{lang_locationInfo}}
+ +
+ +
+
+ {{#roomplanner}} + - {{lang_editRoomplan}} - - {{/roomplanner}} + {{lang_editRoomplan}} + + {{/roomplanner}} +
+
+
+ +
-
- -
-
{{lang_locationInfo}}
- {{#haveDozmod}} -
- {{lang_referencingLectures}}: {{lectures}} -
- {{/haveDozmod}} - {{#haveStatistics}} -
- {{lang_matchingMachines}}: {{machines}} / {{machines_online}} / {{machines_used}} ({{used_percent}}%) + + - {{/haveStatistics}} +
diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index c2dc610e..15dcdd42 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -1,6 +1,7 @@
-
- {{lang_thisListBySubnet}} +

{{lang_locationsMainHeading}}

@@ -84,15 +85,17 @@
- + - - +
- + + + - -
@@ -111,17 +114,29 @@ var slxAddCounter = 0; var slxLastLocation = false; +var newRowCounter = 0; + function slxAddLocationRow() { + $("#saveLocationRows").show(); var tr = $('#lasttr'); - tr.before('\ - #\ + tr.before('\ \ \ + \ '); slxAddCounter++; + newRowCounter++; +} + +function removeNewLocationRow(r) { + $("#row"+r).remove(); + newRowCounter--; + if (newRowCounter === 0) { + $("#saveLocationRows").hide(); + } } function slxOpenLocation(e, lid) { @@ -134,7 +149,7 @@ function slxOpenLocation(e, lid) { if (existing.is(slxLastLocation)) { slxLastLocation = false; } else { - existing.show()[0].scrollIntoView(); + existing.show(); $(e).closest('tr').addClass('active slx-bold'); slxLastLocation = existing; } @@ -146,23 +161,26 @@ function slxOpenLocation(e, lid) { $(e).closest('tr').addClass('active slx-bold').after(tr); td.load('?do=Locations&action=showlocation&locationid=' + lid, function() { slxAttachCidr(); - $('#location-details-' + lid)[0].scrollIntoView(); }); slxLastLocation = tr; } function slxAddSubnetRow(e, lid) { var tr = $('#loc-sub-' + lid); - tr.before('\ + tr.before('\ #\ \ \ - \ + \ '); slxAddCounter++; slxAttachCidr(); } +function removeNewSubnetRow(r) { + $("#row"+r).remove(); +} + function slxConfirm() { return confirm('{{lang_areYouSureNoUndo}}'); } diff --git a/modules-available/locations/templates/subnets.html b/modules-available/locations/templates/subnets.html index 15fa28f2..1da5a942 100644 --- a/modules-available/locations/templates/subnets.html +++ b/modules-available/locations/templates/subnets.html @@ -1,6 +1,7 @@
-
- {{lang_thisListByLocation}} +

{{lang_listOfSubnets}}

@@ -28,8 +29,8 @@ {{/list}} -
- +
+
-- cgit v1.2.3-55-g7522