From 72061402d9e710de8ae322d46cd1d54702a27019 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 19 Mar 2018 16:31:52 -0300 Subject: [PATCH] Bug 15492: (QA followup) Make page refresh work correctly Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt | 9 ++++----- opac/sci/sci-main.pl | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) 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 6d78a590ce..e042aee850 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 @@ -168,7 +168,7 @@ - [% IF ( Koha.Preference('SelfCheckInMainUserBlock' ) ) %] + [% IF ( Koha.Preference('SelfCheckInMainUserBlock') ) %]
[% Koha.Preference('SelfCheckInMainUserBlock' ) %]
[% END %] @@ -245,8 +245,8 @@ var idleTime = 0; $(document).ready(function () { - //Increment the idle time counter every minute. - var idleInterval = setInterval(timerIncrement, 1000); // 1 second + //Increment the idle time counter every second + var idleInterval = setInterval(timerIncrement, 1000); //Zero the idle timer on mouse movement. $(this).mousemove(function (e) { @@ -262,8 +262,7 @@ idleTime = idleTime + 1; idleTimeout = [% refresh_timeout %]; if (idleTime >= idleTimeout ) { - if ( $("#sci_finish_button").is(":visible") ) $("#sci_finish_button").click(); - if ( $("#sci_refresh_button").is(":visible") ) $("#sci_refresh_button").click(); + location.href = '/cgi-bin/koha/sci/sci-main.pl'; } } } diff --git a/opac/sci/sci-main.pl b/opac/sci/sci-main.pl index e5ccc72122..b76179ecf4 100755 --- a/opac/sci/sci-main.pl +++ b/opac/sci/sci-main.pl @@ -93,7 +93,7 @@ if ( $op eq 'check_in' ) { $template->param( success => \@success, errors => \@errors, checkins => 1 ); } -# Make sure timeour has a reasonable value +# Make sure timeout has a reasonable value my $timeout = C4::Context->preference('SelfCheckInTimeout') // 120; $template->param( refresh_timeout => $timeout ); -- 2.39.5