From 275258563a4b9b7279003a07887f051c2e857ebc Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Tue, 4 Nov 2025 10:18:14 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Pops=20Bugfix=20*=20Popnamen=20beim=20bearb?= =?UTF-8?q?eiten=20werden=20nun=20nicht=20werden=20nun=20nicht=20mehr=20mi?= =?UTF-8?q?t=20Vorder-=20und=20R=C3=BCckseite=20verf=C3=A4lscht.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Layout/default/Pop/Detail.php | 4 +++- public/js/pages/pop/detail.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Layout/default/Pop/Detail.php b/Layout/default/Pop/Detail.php index 58b3bae68..b3b12f296 100644 --- a/Layout/default/Pop/Detail.php +++ b/Layout/default/Pop/Detail.php @@ -686,7 +686,9 @@ if (!empty(trim($pops->vlan_ipv6)))  - Vorderseite diff --git a/public/js/pages/pop/detail.js b/public/js/pages/pop/detail.js index 7278126a3..73445bbd9 100644 --- a/public/js/pages/pop/detail.js +++ b/public/js/pages/pop/detail.js @@ -28,7 +28,7 @@ $(document).ready(function () { var thisclick = $(event.relatedTarget); var rackhe = thisclick.closest('table').find('th').data('rackhe'); var rackid = thisclick.closest('table').find('th').data('rackid'); - var rackname = $.trim(thisclick.closest('table').find('th').text()); + var rackname = thisclick.closest('table').find('th').data('rackname'); var minhe = 1; var modal = $(this); var edit = 0; From a6bf3e915e861ad1a2224556affaae762043b98b Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Tue, 4 Nov 2025 13:17:43 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Pops=20Bugfix=20*=20Popnamen=20beim=20bearb?= =?UTF-8?q?eiten=20werden=20nun=20nicht=20werden=20nun=20nicht=20mehr=20mi?= =?UTF-8?q?t=20Vorder-=20und=20R=C3=BCckseite=20verf=C3=A4lscht.=20*=20Wen?= =?UTF-8?q?n=20ein=20Rack=201/3=20oder=201/4=20Zoll=20hat=20und=20der=201t?= =?UTF-8?q?e=20Slot=20belegt=20wurde=20wurde=201/2=20Slot=20beim=20bearbei?= =?UTF-8?q?ten=20angezeigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Layout/default/Pop/_rack_body.php | 9 ++++----- public/js/pages/pop/detail.js | 29 ++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/Layout/default/Pop/_rack_body.php b/Layout/default/Pop/_rack_body.php index 5f35c4ed8..20ff5f38d 100644 --- a/Layout/default/Pop/_rack_body.php +++ b/Layout/default/Pop/_rack_body.php @@ -107,9 +107,9 @@ for ($i = 1; $i <= $rack_he; $i++) : ?> } if ($slots['width'] == "12") $width = "85%"; - else if ($slots['width'] == "6") $width = "42%"; - else if ($slots['width'] == "4") $width = "28%"; - else if ($slots['width'] == "3") $width = "21%"; + else if ($slots['width'] == "6") $width = "42.5%"; + else if ($slots['width'] == "4") $width = "28.33%"; + else if ($slots['width'] == "3") $width = "21.25%"; while ($position < $slots['position']) { @@ -118,8 +118,7 @@ for ($i = 1; $i <= $rack_he; $i++) : ?> $calcwidth += $slots['width']; } - echo '' . $slots['modulname'] . $extTextspan . ''; - + echo '' . $slots['modulname'] . $extTextspan . ''; $position++; $calcwidth += $slots['width']; } diff --git a/public/js/pages/pop/detail.js b/public/js/pages/pop/detail.js index 73445bbd9..e1127f35a 100644 --- a/public/js/pages/pop/detail.js +++ b/public/js/pages/pop/detail.js @@ -74,6 +74,8 @@ $(document).ready(function () { modal.find('.modal-title').html('Modul (' + destinationname + ')'); modal.find('.alert').text(''); modal.find('.alert').hide(); + $('#module-slot-div').hide(); + $('#module-position-div').hide(); var options; var selected; var hemaxcount = 1; @@ -96,23 +98,40 @@ $(document).ready(function () { if (parent.find('td').eq(1).data('id') || parent.find('td').eq(2).data('id') || parent.find('td').eq(3).data('id') || parent.find('td').eq(4).data('id')) { var counttd = parent.find('td').length - 1; var newmodule = false; - if (counttd > 1) { + + var modwidth; + var totalPositions; + if (parent.find('td').eq(1).data('width')) { + modwidth = parent.find('td').eq(1).data('width'); + totalPositions = 12 / modwidth; + } else { + modwidth = 12 / counttd; + totalPositions = counttd; + } + $('#module-width').val(modwidth); + + if (totalPositions > 1) { var options; - for (let i = 1; i <= counttd; i++) { + for (let i = 1; i <= totalPositions; i++) { options = options + ''; } $('#module-slot').html(options); $('#module-position').html(options); $('#module-slot-div').show(); } + else + { + + } + $('#module-width').attr('disabled', 'disabled'); $('#he-count-div').html(``); $('#he-start-div').html(``); + + if (parent.find('td').eq(1).data('id') === undefined) { newmodule = true; } - var modwidth = 12 / counttd; - $('#module-width').val(modwidth); if (!newmodule) { $('#module-remove').show(); @@ -133,7 +152,7 @@ $(document).ready(function () { } $('#module-name').val(parent.find('td').eq(1).data('name')); const status = parent.find('td').eq(1).data('status'); - $('#module-type').val(parent.find('td').eq(1).data('type')).change(); // .change() ist hier wichtig! + $('#module-type').val(parent.find('td').eq(1).data('type')).change(); $('#module-status').val(status); $('#module-type option[value="1"]').prop('disabled', true);