fix: deep audit — wire TDS v1.2 components, fix kanban/tabs/bulk/avatar
- ticket.js: fix showTab() early return preventing attachments/deps from loading - ticket.js: fix performStatusChange() overwriting lt-status-* classes - dashboard.js: fix updateSelectionCount() using is-visible instead of style.display - dashboard.js: fix populateKanbanCards() to use #kanban-col-* IDs (TDS v1.2) - dashboard.js: fix setViewMode() removing references to old non-TDS elements - dashboard.js: remove mobile-bottom-nav injection (no CSS existed for it) - dashboard.css: add full lt-kanban-card component styles with priority accents - dashboard.css: add mobile sidebar overlay, filter toggle, ticket preview popup CSS - DashboardView.php: replace priority badges with lt-chip component - TicketView.php: add lt-avatar with initials to comment author display - ApiKeysView.php: enhance API usage section with lt-code-block component + curl example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-37
@@ -410,9 +410,9 @@ function performStatusChange(statusSelect, selectedOption, newStatus) {
|
||||
lt.api.post('/api/update_ticket.php', { ticket_id: ticketId, status: newStatus })
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
// Update the dropdown to show new status as current
|
||||
const newClass = 'status-' + newStatus.toLowerCase().replace(/ /g, '-');
|
||||
statusSelect.className = 'editable status-select ' + newClass;
|
||||
// Update the dropdown to show new status as current (preserve TDS v1.2 classes)
|
||||
const newClass = 'lt-status-' + newStatus.toLowerCase().replace(/ /g, '-');
|
||||
statusSelect.className = 'lt-select lt-select-sm lt-status-select ' + newClass;
|
||||
|
||||
// Update the selected option text to show as current
|
||||
selectedOption.text = newStatus + ' (current)';
|
||||
@@ -440,43 +440,11 @@ function performStatusChange(statusSelect, selectedOption, newStatus) {
|
||||
}
|
||||
|
||||
function showTab(tabName) {
|
||||
// Hide all tab contents
|
||||
const descriptionTab = document.getElementById('description-tab');
|
||||
const commentsTab = document.getElementById('comments-tab');
|
||||
const attachmentsTab = document.getElementById('attachments-tab');
|
||||
const dependenciesTab = document.getElementById('dependencies-tab');
|
||||
const activityTab = document.getElementById('activity-tab');
|
||||
|
||||
if (!descriptionTab || !commentsTab) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide all tabs
|
||||
document.querySelectorAll('.tab-content').forEach(tab => tab.classList.remove('active'));
|
||||
|
||||
// Remove active class and aria-selected from all buttons
|
||||
document.querySelectorAll('.tab-btn').forEach(btn => {
|
||||
btn.classList.remove('active');
|
||||
btn.setAttribute('aria-selected', 'false');
|
||||
});
|
||||
|
||||
// Show selected tab and activate its button
|
||||
const tabEl = document.getElementById(`${tabName}-tab`);
|
||||
if (tabEl) tabEl.classList.add('active');
|
||||
const activeBtn = document.querySelector(`.tab-btn[data-tab="${tabName}"]`);
|
||||
if (activeBtn) {
|
||||
activeBtn.classList.add('active');
|
||||
activeBtn.setAttribute('aria-selected', 'true');
|
||||
}
|
||||
|
||||
// Load attachments when tab is shown
|
||||
// Load content for tabs that require it (TDS v1.2 handles the actual show/hide via lt.tabs)
|
||||
if (tabName === 'attachments') {
|
||||
loadAttachments();
|
||||
initializeUploadZone();
|
||||
}
|
||||
|
||||
// Load dependencies when tab is shown
|
||||
if (tabName === 'dependencies') {
|
||||
} else if (tabName === 'dependencies') {
|
||||
loadDependencies();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user