ui improvements, keyboard shortcuts, and toast not
This commit is contained in:
@@ -775,3 +775,42 @@ function performBulkPriority() {
|
||||
alert('Error performing bulk priority update: ' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
// Make table rows clickable
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const tableRows = document.querySelectorAll('tbody tr');
|
||||
tableRows.forEach(row => {
|
||||
// Skip if row already has click handler
|
||||
if (row.dataset.clickable) return;
|
||||
|
||||
row.dataset.clickable = 'true';
|
||||
row.style.cursor = 'pointer';
|
||||
|
||||
row.addEventListener('click', function(e) {
|
||||
// Don't navigate if clicking on a link, button, checkbox, or select
|
||||
if (e.target.tagName === 'A' ||
|
||||
e.target.tagName === 'BUTTON' ||
|
||||
e.target.tagName === 'INPUT' ||
|
||||
e.target.tagName === 'SELECT' ||
|
||||
e.target.closest('a') ||
|
||||
e.target.closest('button')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the ticket link in the row
|
||||
const ticketLink = row.querySelector('.ticket-link');
|
||||
if (ticketLink) {
|
||||
window.location.href = ticketLink.href;
|
||||
}
|
||||
});
|
||||
|
||||
// Add hover effect
|
||||
row.addEventListener('mouseenter', function() {
|
||||
this.style.backgroundColor = 'rgba(0, 255, 65, 0.08)';
|
||||
});
|
||||
|
||||
row.addEventListener('mouseleave', function() {
|
||||
this.style.backgroundColor = '';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user