Merge branch 'spidev' into 'master'
Pops Bugfix See merge request fronk/thetool!1865
This commit is contained in:
@@ -686,7 +686,9 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
<th colspan="13"
|
||||
class="text-center border-bottom font-15 pt-1 pb-1"
|
||||
data-rackhe="<?= $poprack['rack']['he'] ?>"
|
||||
data-rackid="<?= $poprack['rack']['id']; ?>"><span
|
||||
data-rackid="<?= $poprack['rack']['id']; ?>"
|
||||
data-rackname="<?= $poprack['rack']['name']; ?>"
|
||||
><span
|
||||
class="rack-name"><i
|
||||
class="fa-regular fa-arrows-up-down-left-right move-handle float-left"></i><?= $poprack['rack']['name']; ?> <span
|
||||
class="rack-side-indicator font-weight-normal">- Vorderseite</span></span>
|
||||
|
||||
@@ -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 '<td title="' . strip_tags($displayName) . $extText . '" colspan="' . $slots['width'] . '" class="text-center border-top border-bottom border-right ' . $colorclass . '" data-id="' . $slots['moduleid'] . '" data-type="' . $slots['type'] . '" data-name="' . strip_tags($originalName) . '" data-status="' . ($slots['status'] ?? 'productive') . '" data-starthe="' . $module['start_he'] . '" data-ports="' . $slots['ports'] . '" data-plug="' . $slots['plug'] . '" rowspan="' . $modulelenght . '" style="width: ' . $width . '; border-color: #797979 !important;">' . $slots['modulname'] . $extTextspan . '</td>';
|
||||
|
||||
echo '<td title="' . strip_tags($displayName) . $extText . '" colspan="' . $slots['width'] . '" class="text-center border-top border-bottom border-right ' . $colorclass . '" data-id="' . $slots['moduleid'] . '" data-type="' . $slots['type'] . '" data-name="' . strip_tags($originalName) . '" data-status="' . ($slots['status'] ?? 'productive') . '" data-starthe="' . $module['start_he'] . '" data-ports="' . $slots['ports'] . '" data-plug="' . $slots['plug'] . '" data-width="' . $slots['width'] . '" rowspan="' . $modulelenght . '" style="width: ' . $width . '; border-color: #797979 !important;">' . $slots['modulname'] . $extTextspan . '</td>';
|
||||
$position++;
|
||||
$calcwidth += $slots['width'];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -74,6 +74,8 @@ $(document).ready(function () {
|
||||
modal.find('.modal-title').html('<span id="module-info">Modul (' + destinationname + ')</span>');
|
||||
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 + '<option value="' + i + '">' + i + '</option>';
|
||||
}
|
||||
$('#module-slot').html(options);
|
||||
$('#module-position').html(options);
|
||||
$('#module-slot-div').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
$('#module-width').attr('disabled', 'disabled');
|
||||
$('#he-count-div').html(`<select required="required" id="module-he-count" name="module-he-count" class="form-control" disabled="disabled"><option value="` + parent.find('td').eq(1).attr('rowspan') + `">` + parent.find('td').eq(1).attr('rowspan') + `</option><select>`);
|
||||
$('#he-start-div').html(`<select required="required" id="module-he-start" name="module-he-start" class="form-control" disabled="disabled"><option value="` + parent.find('td').eq(0).data('he') + `">` + parent.find('td').eq(0).data('he') + `</option></select>`);
|
||||
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user