Initial commit: Real Estate Registry app

This commit is contained in:
Georges Haddad
2026-04-10 15:24:22 +03:00
commit 7305e54f66
32 changed files with 3612 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
// Image zoom controls
let zoomLevel = 1;
function zoomIn() {
zoomLevel = Math.min(zoomLevel + 0.2, 3);
applyZoom();
}
function zoomOut() {
zoomLevel = Math.max(zoomLevel - 0.2, 0.4);
applyZoom();
}
function resetZoom() {
zoomLevel = 1;
applyZoom();
}
function applyZoom() {
const img = document.getElementById('docImage');
if (img) img.style.transform = `scale(${zoomLevel})`;
}
// Keyboard navigation in properties table
document.addEventListener('keydown', function(e) {
if (e.target.tagName !== 'INPUT') return;
const row = e.target.closest('tr');
if (!row || !row.closest('#propertiesTbody')) return;
const inputs = Array.from(row.querySelectorAll('input'));
const idx = inputs.indexOf(e.target);
if (e.key === 'Tab' && !e.shiftKey && idx === inputs.length - 1) {
e.preventDefault();
const nextRow = row.nextElementSibling;
if (nextRow) {
nextRow.querySelector('input')?.focus();
} else {
// Add a new row at end of table
if (typeof addRow === 'function') addRow();
}
}
});