fix: corretta intercettazione dello shortcut per l'invio delle email quando l'interfaccia è aperta. fix: corretto shortcut per tornare alla pagina ticket.
This commit is contained in:
1 parent
1bc3d8bf8a
commit
d4ef03b6f4
3 files changed
+26
-3
No files matched your search
+3
-2
@@ -64,6 +64,7 @@ const App = {
|
||||
create_ticket_open: { ctrl: true, alt: true, shift: false, key: 'n', enabled: true },
|
||||
create_ticket_submit: { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true },
|
||||
quick_edit_save: { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true },
|
||||
send_email_submit: { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true },
|
||||
pdf_save_edited: { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true },
|
||||
ricerca_spudorata_open: { ctrl: true, alt: false, shift: true, key: 'f', enabled: true },
|
||||
ticket_list_open: { ctrl: true, alt: false, shift: true, key: 'Backspace', enabled: true },
|
||||
@@ -278,7 +279,7 @@ const App = {
|
||||
toggleClearBtn();
|
||||
}
|
||||
|
||||
// Global keyboard shortcuts (e.g. Crea Nuovo Ticket, Ricerca Spudorata)
|
||||
// Global keyboard shortcuts (e.g. Crea Nuovo Ticket, Ricerca Spudorata, Torna a Elenco Ticket)
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (this.isShortcutTriggered(e, 'create_ticket_open')) {
|
||||
if (window.location.hash !== '#/tickets/new') {
|
||||
@@ -302,7 +303,7 @@ const App = {
|
||||
window.location.hash = '#/tickets';
|
||||
}
|
||||
}
|
||||
});
|
||||
}, true);
|
||||
|
||||
// Check DB connection
|
||||
this.checkConnection();
|
||||
|
||||
@@ -559,7 +559,22 @@ const EmailCompose = (() => {
|
||||
});
|
||||
|
||||
// Send
|
||||
document.getElementById('ec-send').addEventListener('click', () => sendEmail(toTagsCtrl, ccTagsCtrl, bccTagsCtrl));
|
||||
const handleEmailSend = () => sendEmail(toTagsCtrl, ccTagsCtrl, bccTagsCtrl);
|
||||
document.getElementById('ec-send').addEventListener('click', handleEmailSend);
|
||||
|
||||
// Keyboard shortcut handler for email compose modal
|
||||
const handleEmailKeydown = (e) => {
|
||||
if (!document.getElementById('email-compose-overlay')) {
|
||||
document.removeEventListener('keydown', handleEmailKeydown, true);
|
||||
return;
|
||||
}
|
||||
if (App.isShortcutTriggered(e, 'send_email_submit')) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
handleEmailSend();
|
||||
}
|
||||
};
|
||||
document.addEventListener('keydown', handleEmailKeydown, true);
|
||||
}
|
||||
|
||||
function processFiles(files) {
|
||||
|
||||
@@ -93,6 +93,13 @@ const ShortcutsView = {
|
||||
context: 'Pagina Dettaglio Ticket',
|
||||
defaultCombo: { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true }
|
||||
},
|
||||
{
|
||||
id: 'send_email_submit',
|
||||
name: 'Invia Email',
|
||||
description: 'Invia l\'email quando la finestra di composizione email è aperta',
|
||||
context: 'Modal Composizione Email',
|
||||
defaultCombo: { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true }
|
||||
},
|
||||
{
|
||||
id: 'pdf_save_edited',
|
||||
name: 'Salva Immagine / Allegato / PDF Modificato',
|
||||
|
||||
Reference in new issue
Block a user