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 --- .../exams/templates/page-add-edit-exam.html | 2 +- .../locations/lang/de/template-tags.json | 4 +- .../locations/lang/en/template-tags.json | 8 +- .../locations/templates/location-subnets.html | 92 ++++++++++++++-------- .../locations/templates/locations.html | 46 +++++++---- modules-available/locations/templates/subnets.html | 9 ++- 6 files changed, 105 insertions(+), 56 deletions(-) diff --git a/modules-available/exams/templates/page-add-edit-exam.html b/modules-available/exams/templates/page-add-edit-exam.html index cb1578ad..f4db8a93 100644 --- a/modules-available/exams/templates/page-add-edit-exam.html +++ b/modules-available/exams/templates/page-add-edit-exam.html @@ -111,8 +111,8 @@
+ -
diff --git a/modules-available/locations/lang/de/template-tags.json b/modules-available/locations/lang/de/template-tags.json index 29a19b85..72f6c4f2 100644 --- a/modules-available/locations/lang/de/template-tags.json +++ b/modules-available/locations/lang/de/template-tags.json @@ -28,7 +28,7 @@ "lang_startAddress": "Startadresse", "lang_subnet": "IP-Bereich", "lang_sysConfig": "Lokalisierung", - "lang_thisListByLocation": "Zur Ortsansicht", - "lang_thisListBySubnet": "Nach Subnetzen auflisten", + "lang_thisListByLocation": "Orte", + "lang_thisListBySubnet": "Subnetze", "lang_unassignedMachines": "Rechner, die in keinen definierten Ort fallen" } \ No newline at end of file diff --git a/modules-available/locations/lang/en/template-tags.json b/modules-available/locations/lang/en/template-tags.json index 6094ebce..720e029f 100644 --- a/modules-available/locations/lang/en/template-tags.json +++ b/modules-available/locations/lang/en/template-tags.json @@ -7,10 +7,10 @@ "lang_deleteLocation": "Delete location", "lang_deleteSubnet": "Delete range", "lang_editConfigVariables": "Config vars", - "lang_editRoomplan": "edit roomplan", + "lang_editRoomplan": "Edit roomplan", "lang_endAddress": "End address", "lang_listOfSubnets": "List of subnets", - "lang_location": "Ort", + "lang_location": "Location", "lang_locationInfo": "Location details", "lang_locationName": "Name", "lang_locationOtherOverlap": "Warning! These locations have overlapping address ranges", @@ -28,7 +28,7 @@ "lang_startAddress": "Start address", "lang_subnet": "IP range", "lang_sysConfig": "Localization\/Integration", - "lang_thisListByLocation": "List by location", - "lang_thisListBySubnet": "List by subnet", + "lang_thisListByLocation": "Locations", + "lang_thisListBySubnet": "Subnets", "lang_unassignedMachines": "Machines not matching any location" } \ No newline at end of file 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