Is it possible to set S.notice timeout length?

40 views
Skip to first unread message

wm

unread,
Nov 14, 2015, 2:33:43 AM11/14/15
to Lift
Hi,

Is it possible to set S.notice timeout length? and how?

Thx!

Antonio Salazar Cardozo

unread,
Nov 14, 2015, 3:32:17 PM11/14/15
to Lift
What would you expect a timeout to do? S.notice is used for server-side tracking of
a notice for the duration of this request.
Thanks,
Antonio

wm

unread,
Nov 14, 2015, 6:24:37 PM11/14/15
to Lift
E.g. when new user sign up, S.notice will display:

"You have signed up. A validation email message will be sent to you."

to the webpage, but it only flashed a few seconds, people may not able to read the full sentence.

I want increase the time duration before this notice fade away.

Peter Petersson

unread,
Nov 15, 2015, 5:34:15 AM11/15/15
to lif...@googlegroups.com
I thing what you are looking for is something like this in Boot

    LiftRules.noticesAutoFadeOut.default.set( (notices: NoticeType.Value) => {
        notices match {
          case NoticeType.Notice => Full((8 seconds, 4 seconds))
          case _ => Empty
        }
     }
    )

If I am not mistaken this will inject a javascript fadeout function into your page  (for the notice message type) so if you already see a fadeout but you want it to change the time it takes before the effect kicks in (the first argument) or the time for the effect (the second argument) look in your Lift applications Boot file for the lines above.

best regards Peter Petersson
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages