From a15ab7e89d7e2a18f2bda0742dbb8524066983d3 Mon Sep 17 00:00:00 2001 From: Gabriele Cimaschi Date: Fri, 11 Sep 2026 18:27:12 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20ora=20=C3=A8=20possibile=20variare=20la?= =?UTF-8?q?=20quantit=C3=A0=20di=20risultati=20dalla=20pagina=20ricerca=20?= =?UTF-8?q?spudorata.=20feat:=20aggiunto=20shortcut=20ctrl+shift+f=20per?= =?UTF-8?q?=20raggiungere=20la=20pagina=20ricerca=20spudorata.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/app.js | 14 ++++++++- public/js/views/ricercaSpudorata.js | 46 +++++++++++++++++++++++++---- public/js/views/shortcuts.js | 7 +++++ 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index ae75bdc..1ccbe09 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -65,6 +65,7 @@ const App = { 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 }, 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 }, }; return defaults[id] || { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true }; }, @@ -261,13 +262,24 @@ const App = { toggleClearBtn(); } - // Global keyboard shortcuts (e.g. Crea Nuovo Ticket) + // Global keyboard shortcuts (e.g. Crea Nuovo Ticket, Ricerca Spudorata) document.addEventListener('keydown', (e) => { if (this.isShortcutTriggered(e, 'create_ticket_open')) { if (window.location.hash !== '#/tickets/new') { e.preventDefault(); window.location.hash = '#/tickets/new'; } + } else if (this.isShortcutTriggered(e, 'ricerca_spudorata_open')) { + e.preventDefault(); + if (!window.location.hash.startsWith('#/ricerca-spudorata')) { + window.location.hash = '#/ricerca-spudorata'; + } else { + const searchInput = document.getElementById('spudorata-search-input'); + if (searchInput) { + searchInput.focus(); + searchInput.select(); + } + } } }); diff --git a/public/js/views/ricercaSpudorata.js b/public/js/views/ricercaSpudorata.js index acc1617..0091a83 100644 --- a/public/js/views/ricercaSpudorata.js +++ b/public/js/views/ricercaSpudorata.js @@ -49,6 +49,14 @@ const RicercaSpudorataView = { this.renderContainer(container); this.bindEvents(); + + setTimeout(() => { + const input = document.getElementById('spudorata-search-input'); + if (input) { + input.focus(); + input.select(); + } + }, 50); }, renderContainer(container) { @@ -420,15 +428,32 @@ const RicercaSpudorataView = { }, renderPagination(current, perPage, total, totalPages, isTop = false) { + const limitSelectHtml = ` +
+ Righe: + +
+ `; + return `