feat(v3.4.7): add interactive floors and classrooms panel in building edit and preselect room creation
This commit is contained in:
@@ -241,9 +241,18 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
}
|
||||
}
|
||||
|
||||
if (newBuildingNameInput) newBuildingNameInput.addEventListener('input', updatePreview);
|
||||
if (floorInput) floorInput.addEventListener('input', updatePreview);
|
||||
if (roomInput) roomInput.addEventListener('input', updatePreview);
|
||||
// Preselección de edificio y piso desde URL o backend
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var targetBId = urlParams.get('building_id') || '{{ preselected_building_id or "" }}';
|
||||
var targetFloor = urlParams.get('floor') || '{{ preselected_floor or "" }}';
|
||||
|
||||
if (targetBId && buildingSelect) {
|
||||
buildingSelect.value = targetBId;
|
||||
updateFloorsDatalist(targetBId);
|
||||
}
|
||||
if (targetFloor && floorInput) {
|
||||
floorInput.value = targetFloor;
|
||||
}
|
||||
|
||||
updatePreview();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user