wandbuchsen editieren ungetestet
This commit is contained in:
@@ -167,7 +167,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
if (markerType === 'outlet' && Number(entry.id) === activeId) {
|
||||
return;
|
||||
}
|
||||
appendReference(entry, 'outlet-marker', 32, 32);
|
||||
appendReference(entry, 'outlet-marker', 10, 10);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -93,12 +93,17 @@ if ($type === 'patchpanel') {
|
||||
}
|
||||
|
||||
$defaultPanelSize = ['width' => 140, 'height' => 40];
|
||||
$defaultOutletSize = 32;
|
||||
$defaultOutletSize = 10;
|
||||
$showPanelPlacementFields = $type === 'patchpanel' && $selectedFloorId > 0;
|
||||
|
||||
if ($type === 'patchpanel') {
|
||||
$panel['width'] = $panel['width'] ?? $defaultPanelSize['width'];
|
||||
$panel['height'] = $panel['height'] ?? $defaultPanelSize['height'];
|
||||
$panel['pos_x'] = $panel['pos_x'] ?? 30;
|
||||
$panel['pos_y'] = $panel['pos_y'] ?? 30;
|
||||
} else {
|
||||
$outlet['x'] = $outlet['x'] ?? 30;
|
||||
$outlet['y'] = $outlet['y'] ?? 30;
|
||||
}
|
||||
|
||||
$markerWidth = $type === 'patchpanel' ? $panel['width'] : $defaultOutletSize;
|
||||
@@ -177,23 +182,13 @@ $mapOutlets = $sql->get(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="pos_x" value="<?php echo (int)($panel['pos_x'] ?? 30); ?>">
|
||||
<input type="hidden" name="pos_y" value="<?php echo (int)($panel['pos_y'] ?? 30); ?>">
|
||||
<input type="hidden" name="width" value="<?php echo (int)$panel['width']; ?>">
|
||||
<input type="hidden" name="height" value="<?php echo (int)$panel['height']; ?>">
|
||||
|
||||
<div id="panel-placement-fields" class="form-grid" <?php echo $showPanelPlacementFields ? '' : 'hidden'; ?>>
|
||||
<div class="form-group">
|
||||
<label>X</label>
|
||||
<input type="number" name="pos_x" value="<?php echo $panel['pos_x'] ?? 0; ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Y</label>
|
||||
<input type="number" name="pos_y" value="<?php echo $panel['pos_y'] ?? 0; ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Breite</label>
|
||||
<input type="number" name="width" value="<?php echo $panel['width']; ?>" readonly title="Breite wird automatisch nach Standardwerten vorgegeben.">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Höhe</label>
|
||||
<input type="number" name="height" value="<?php echo $panel['height']; ?>" readonly title="Höhe wird automatisch nach Standardwerten vorgegeben.">
|
||||
</div>
|
||||
<p class="info">Position, Breite und Höhe werden über die Karte gesetzt.</p>
|
||||
</div>
|
||||
|
||||
<div id="panel-floor-plan-group" class="form-group" <?php echo $showPanelPlacementFields ? '' : 'hidden'; ?>>
|
||||
@@ -212,7 +207,7 @@ $mapOutlets = $sql->get(
|
||||
<div id="floor-plan-marker" class="floor-plan-marker panel-marker"
|
||||
style="--marker-width: <?php echo $markerWidth; ?>px; --marker-height: <?php echo $markerHeight; ?>px;"></div>
|
||||
</div>
|
||||
<p class="floor-plan-hint">Nur das aktuell bearbeitete Patchpanel ist verschiebbar. Andere Objekte werden als Referenz halbtransparent angezeigt.</p>
|
||||
<p class="floor-plan-hint">Nur das aktuell bearbeitete Patchpanel ist verschiebbar. Andere Objekte werden als Referenz halbtransparent angezeigt. Neue Objekte starten bei Position 30 x 30.</p>
|
||||
<p class="floor-plan-position">Koordinate: <span id="floor-plan-position"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -254,15 +249,8 @@ $mapOutlets = $sql->get(
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>X</label>
|
||||
<input type="number" name="x" value="<?php echo $outlet['x'] ?? 0; ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Y</label>
|
||||
<input type="number" name="y" value="<?php echo $outlet['y'] ?? 0; ?>">
|
||||
</div>
|
||||
<input type="hidden" name="x" value="<?php echo (int)($outlet['x'] ?? 30); ?>">
|
||||
<input type="hidden" name="y" value="<?php echo (int)($outlet['y'] ?? 30); ?>">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Stockwerkskarte</label>
|
||||
@@ -280,7 +268,7 @@ $mapOutlets = $sql->get(
|
||||
<div id="floor-plan-marker" class="floor-plan-marker outlet-marker"
|
||||
style="--marker-width: <?php echo $markerWidth; ?>px; --marker-height: <?php echo $markerHeight; ?>px;"></div>
|
||||
</div>
|
||||
<p class="floor-plan-hint">Nur die aktuell bearbeitete Wandbuchse ist verschiebbar. Andere Objekte werden als Referenz halbtransparent angezeigt.</p>
|
||||
<p class="floor-plan-hint">Nur die aktuell bearbeitete Wandbuchse ist verschiebbar. Andere Objekte werden als Referenz halbtransparent angezeigt. Netzwerkdosen sind immer 10 x 10.</p>
|
||||
<p class="floor-plan-position">Koordinate: <span id="floor-plan-position"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -400,8 +388,8 @@ $mapOutlets = $sql->get(
|
||||
border-radius: 6px;
|
||||
}
|
||||
.floor-plan-reference.outlet-marker {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: rgba(25, 135, 84, 0.22);
|
||||
border: 2px solid rgba(25, 135, 84, 0.7);
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -287,8 +287,8 @@ if ($editorFloorId > 0) {
|
||||
border-radius: 6px;
|
||||
}
|
||||
.infra-marker.outlet {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: rgba(25, 135, 84, 0.25);
|
||||
border: 2px solid #198754;
|
||||
border-radius: 4px;
|
||||
@@ -317,7 +317,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const outletSize = 32;
|
||||
const outletSize = 10;
|
||||
const patchPanels = <?php echo json_encode($editorPatchPanels, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>;
|
||||
const outlets = <?php echo json_encode($editorOutlets, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user