Topic: Make the "RESTART" button default, so RETURN actions it

I've long cursed the PHP SESSION EXPIRED popup, and have only recently come up with a tiny panacea for it (which is only useful on a Desktop PC or device with a keyboard).

If you edit /www/cal/pages/alert.php to add "autofocus" to the RESTART button as shown below, pressing RETURN is all you need to do to restart the page.

$rButton = "<button type='button' onclick=\"window.location = window.location.h ref.split('?')[0];\" autofocus>{$xx['restart']}</button>\n"; //restart button

This works on Edge (so presumably also Chrome) but I've not tested it with any other browsers.

Note that the code above has a space added in "h ref" to get around the block for posting URLs, so be careful if you copy this line directly into your own calendar.


- G.

Re: Make the "RESTART" button default, so RETURN actions it

Hi Greig,

I agree that the SESSION EXPIRED popup was very frustrating, but this problem has been solved several LuxCal versions ago.
What calendar version are you using?
I would like to urge users of old calendar versions to upgrade to the latest version.

(Very clever to add a space to h ref and also to htt s in your previous post. smile I like it)

Roel

Re: Make the "RESTART" button default, so RETURN actions it

We're on LuxCal calendar: 5.2.1M (us), and I was still seeing the RESTART prompt up until I created the new credentials for each device. (I am permanently signed-in on three). Maybe that last step has finally suppressed it. It would be worthy of a Nobel Peace Prize if you've finally managed that. I'll get the nomination drafted now...

Thanks for the compliment, but I don't think it was all that clever to add the spaces: I just kept Previewing the post until I could get the "don't include URLs" warning to go away.


- Greig.