From 99f6a4ee6971413238f40a5c4920efde20dd90ad Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 4 Dec 2024 21:10:55 +0000 Subject: [PATCH] Bug 36586: Define self-checkin timer using Javascript class This patch rewrites the self-checkin timer code to be defined in a Javascript class which is then instantiated in once in sci-main.pl depending on certain conditions (ie a barcode has been entered, or an item has been checked in by barcode). To test: 1 - Set SelfCheckinTimeout to a small value like 5 2 - Go to the self checkin: http://localhost:8080/cgi-bin/koha/sci/sci-main.pl 3 - Sign in as the SCI user 4 - Watch the page, it should refresh every 5 seconds 5 - Confirm that moving the mouse/typing prevents the reset 6 - Check in an item 7 - Wait and confirm reload of main page happens when idle 8 - Confirm mouse/typing prevents refresh 9 - Sign off! Signed-off-by: David Nind Signed-off-by: Martin Renvoize Bug 36586: Add sc-timer to sco This patch implements the timer form the last patch on the sco To test: 1 - Set SelfCheckTimout to 5 or something low for testing 2 - Go to the self checkout module 3 - Either sign in or confirm you have AutoSelfCheck user setup 4 - Observe the page reloads every 5 seocnds (or as you set above) 5 - Sign in as a patron 6 - Confirm on idle you are logged out to home page 7 - Sign off! Signed-off-by: David Nind Signed-off-by: Martin Renvoize Bug 36586: Fix tidy --- .../bootstrap/en/modules/sci/sci-main.tt | 43 ++++++++----------- .../bootstrap/en/modules/sco/sco-main.tt | 32 +++++++++----- koha-tmpl/opac-tmpl/bootstrap/js/timeout.js | 39 +++++++++++++++++ opac/sci/sci-main.pl | 4 -- opac/sco/sco-main.pl | 7 --- 5 files changed, 79 insertions(+), 46 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/timeout.js diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt index 7bfa4dd8c31..1a6330580ad 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt @@ -189,7 +189,7 @@ -[%# Help modal %] +[% # Help modal %]