diff --git a/public/css/style.css b/public/css/style.css index 46453eb..ece5118 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1983,4 +1983,59 @@ body { .attachment-size { color: var(--text-muted); font-size: 0.72rem; +} + +/* Upload list & item styling */ +.upload-file-list { + display: flex; + flex-direction: column; + gap: var(--space-xs); + margin-top: var(--space-sm); + margin-bottom: var(--space-md); + max-width: 400px; +} + +.upload-file-item { + display: flex; + justify-content: space-between; + align-items: center; + background: var(--bg-secondary); + border: 1px solid var(--border-light); + border-radius: var(--radius-md); + padding: var(--space-xs) var(--space-sm); + font-size: 0.8rem; + color: var(--text-primary); +} + +.upload-file-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-right: var(--space-sm); +} + +.upload-file-remove { + background: none; + border: none; + color: var(--error); + cursor: pointer; + padding: 0 4px; + font-size: 1rem; + transition: opacity var(--transition-fast); +} + +.upload-file-remove:hover { + opacity: 0.8; +} + +.bulk-row .badge-attachments-count { + position: absolute; + top: -6px; + right: -6px; + background: var(--accent-primary); + color: white; + font-size: 0.65rem; + padding: 1px 4px; + border-radius: 6px; + font-weight: bold; } \ No newline at end of file diff --git a/public/js/views/ticketBulk.js b/public/js/views/ticketBulk.js index c3a2754..89cedb3 100644 --- a/public/js/views/ticketBulk.js +++ b/public/js/views/ticketBulk.js @@ -5,6 +5,8 @@ const TicketBulkView = { rowCount: 0, activeRequests: false, + savedRows: null, + rowAttachments: {}, async render() { const container = document.getElementById('view-container'); @@ -196,6 +198,10 @@ const TicketBulkView = {
+ + +
+ `).join(''); + + // Bind remove clicks + listEl.querySelectorAll('.upload-file-remove').forEach(btn => { + btn.addEventListener('click', (e) => { + const idx = parseInt(btn.dataset.index, 10); + this.attachments.splice(idx, 1); + this.updateAttachmentList(); + }); + }); + }, saveState() { const stateEl = document.getElementById('create-state'); @@ -175,6 +196,9 @@ const TicketCreateView = { + +
+
-
+
+ +