Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Bryan Venteicher
How do I customize the session timeout notice?
October 12, 2012 2:27 PM
Answer

Bryan Venteicher

Rank: New Member

Posts: 6

Join Date: October 12, 2012

Recent Posts

Hello, I'm using Liferay 6.1 and a custom theme. I'm looking to significantly change the style of the default session timeout notice. Is there a template/css I can override to accomplish this?

Thanks.
Aniruddha p Shirguppe
RE: How do I customize the session timeout notice?
October 12, 2012 11:36 PM
Answer

Aniruddha p Shirguppe

Rank: New Member

Posts: 5

Join Date: April 19, 2011

Recent Posts

write in your Language.properties file with property name as warning-your-session-will-expire =your custom text
otherwise it will take default value.
refer Language.properties & html/js/liferay/session.js
Bryan Venteicher
RE: How do I customize the session timeout notice?
October 15, 2012 7:21 AM
Answer

Bryan Venteicher

Rank: New Member

Posts: 6

Join Date: October 12, 2012

Recent Posts

That solution will only customize the text, correct? I need to customize the html/css.
Bryan Venteicher
RE: How do I customize the session timeout notice?
October 17, 2012 9:55 AM
Answer

Bryan Venteicher

Rank: New Member

Posts: 6

Join Date: October 12, 2012

Recent Posts

I mistakenly said I was on liferay 6.1, I'm actually on 6.0.

To solve this problem, what I ended up doing was creating a session.js in my theme that overrode liferay's session.js warn function:

1AUI().use('liferay-session', function(A) {
2    if(Liferay.Session) {
3        Liferay.Session.warn = function() {
4          // customized session timeout warning            
5        };
6    }
7});

Seems to work well. It will probably break when upgrading liferay though.