diff --git a/assets/css/dashboard.css b/assets/css/dashboard.css index ab8e62a..e91ea0d 100644 --- a/assets/css/dashboard.css +++ b/assets/css/dashboard.css @@ -5134,7 +5134,7 @@ table td:nth-child(4) { width: 85vw; max-width: 320px; height: 100vh; - z-index: 1001; + z-index: var(--z-modal); background: var(--bg-primary); transform: translateX(-100%); transition: transform 0.3s ease; @@ -5636,7 +5636,7 @@ table td:nth-child(4) { max-height: 60vh; overflow-y: auto; border-radius: 0; - z-index: 1002; + z-index: var(--z-popover); } .admin-dropdown-content a { diff --git a/assets/js/dashboard.js b/assets/js/dashboard.js index c0c9a63..e6e4fb1 100644 --- a/assets/js/dashboard.js +++ b/assets/js/dashboard.js @@ -620,6 +620,7 @@ function saveTicket() { */ function loadTemplate() { const templateSelect = document.getElementById('templateSelect'); + if (!templateSelect) return; const templateId = templateSelect.value; if (!templateId) { @@ -685,6 +686,7 @@ function loadTemplate() { function toggleSelectAll() { const selectAll = document.getElementById('selectAllCheckbox'); + if (!selectAll) return; const checkboxes = document.querySelectorAll('.ticket-checkbox'); checkboxes.forEach(checkbox => { @@ -819,8 +821,8 @@ function showBulkAssignModal() { @@ -921,8 +923,8 @@ function showBulkPriorityModal() { @@ -1037,8 +1039,8 @@ function showBulkStatusModal() { @@ -1116,8 +1118,8 @@ function showBulkDeleteModal() {

You are about to permanently delete ${ticketIds.length} ticket(s).
All associated comments and history will be lost.

@@ -1209,8 +1211,8 @@ function showConfirmModal(title, message, type = 'warning', onConfirm, onCancel

${safeMessage}

@@ -1261,8 +1263,8 @@ function showInputModal(title, label, placeholder = '', onSubmit, onCancel = nul @@ -1317,8 +1319,8 @@ function quickStatusChange(ticketId, currentStatus) { @@ -1384,8 +1386,8 @@ function quickAssign(ticketId) { diff --git a/assets/js/ticket.js b/assets/js/ticket.js index 4fae089..5454997 100644 --- a/assets/js/ticket.js +++ b/assets/js/ticket.js @@ -680,8 +680,11 @@ function renderDependents(dependents) { function addDependency() { const ticketId = window.ticketData.id; - const dependsOnId = document.getElementById('dependencyTicketId').value.trim(); - const dependencyType = document.getElementById('dependencyType').value; + const depIdEl = document.getElementById('dependencyTicketId'); + const depTypeEl = document.getElementById('dependencyType'); + if (!depIdEl || !depTypeEl) return; + const dependsOnId = depIdEl.value.trim(); + const dependencyType = depTypeEl.value; if (!dependsOnId) { lt.toast.warning('Please enter a ticket ID', 3000); @@ -705,7 +708,7 @@ function addDependency() { .then(data => { if (data.success) { lt.toast.success('Dependency added', 3000); - document.getElementById('dependencyTicketId').value = ''; + if (depIdEl) depIdEl.value = ''; loadDependencies(); } else { lt.toast.error('Error: ' + (data.error || 'Unknown error'), 4000); @@ -806,6 +809,7 @@ function handleFileUpload(files) { const progressDiv = document.getElementById('uploadProgress'); const progressFill = document.getElementById('progressFill'); const statusText = document.getElementById('uploadStatus'); + if (!progressDiv || !progressFill || !statusText) return; let uploadedCount = 0; const totalFiles = files.length; diff --git a/views/CreateTicketView.php b/views/CreateTicketView.php index 670e9a9..621a694 100644 --- a/views/CreateTicketView.php +++ b/views/CreateTicketView.php @@ -12,8 +12,8 @@ $nonce = SecurityHeadersMiddleware::getNonce(); Create New Ticket - - + + diff --git a/views/DashboardView.php b/views/DashboardView.php index 0d21b22..fc3cf67 100644 --- a/views/DashboardView.php +++ b/views/DashboardView.php @@ -13,7 +13,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); Ticket Dashboard - + @@ -87,7 +87,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); [ ]
- +
TEMPLATES WORKFLOW @@ -279,7 +279,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); - + [ X ]
@@ -287,12 +287,12 @@ $nonce = SecurityHeadersMiddleware::getNonce();
- - + +
@@ -274,11 +274,11 @@ $nonce = SecurityHeadersMiddleware::getNonce();
Content Sections
@@ -323,7 +323,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); Preview Markdown - + @@ -368,7 +368,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); echo "
"; // Reply button (max depth of 3) if ($threadDepth < 3) { - echo ""; + echo ""; } // Edit/Delete buttons for owner or admin if ($canModify) { @@ -463,7 +463,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); - +