Hi i am trying to create an event listener for the user's timeout event. I read the guide here. Do I need to put the file events.service.js in my code? If yes, How can I do this?
Second question: Do I build the event listener the same way as I build a Property Editor? Thanks
Session timeout message
Hi i am trying to create an event listener for the user's timeout event. I read the guide here. Do I need to put the file events.service.js in my code? If yes, How can I do this?
Second question: Do I build the event listener the same way as I build a Property Editor? Thanks
Hi,
What you can do is the following:
Create a js file (for example custom.timeout.service.js)
Then to make sure this runs when umbraco loads, create a package.manifest
{ "javascript": [ "~/App_Plugins/CustomTimeoutMessage/custom.timeout.service.js" ] }
Let me know how it goes!
(sorry for the code snippets, I never get this to show right ;) )
-Joep
Works great, Thank you Can you tell me what is the right way to unsubscribe the listener? or does it happen automatically when the user log out?
The eventlistener only gets initialized once I think. So when Umbraco boots , it runs your JS once.
Thanks.
is working on a reply...