How about including jQuery jNotify?  http://www.myjqueryplugins.com/


On Tuesday, March 26, 2013 12:55:12 PM UTC-4, LightDot wrote:
>
> I prefer to keep web2py.js stock, to ease updates, so I add a similar 
> fadeout js to layout.html when I need it.
>
> I'm not sure I'd alter the default though. App user can miss a message 
> that fades out quickly, so I prefer to leave such decisions to the UI 
> designer. We have apps that have flash messages with a fixed timeout (4-8 
> sec if I remember correctly), apps that have flash messages with no time 
> out at all and apps entirely without flash messages. All this is a valid 
> design approach and I see no benefit to changing the default, since one 
> solution will never fit all usage cases. Perhaps it would benefit web2py 
> users if fadeout was pre-set in code as a variable (ie. off or value in 
> seconds)? It would be easier to hack the setting. But then again, web2py is 
> a programming framework. web2py users are expected to know how to alter 
> such things or at least search trough the docs and google groups.
>
> I like the idea of having flash messages with different categories (ie. 
> error, warning, info), which could be treated differently (sticky, fadeout, 
> different graphical design etc.). But isn't this pushing it too far..? I 
> mean, isn't it getting too complex? It does sound like a nice idea, 
> though...
>
> Regards,
> Ales
>
> On Tuesday, March 26, 2013 4:36:43 PM UTC+1, Mika Sjöman wrote:
>>
>> Hi
>>
>> Had a user pointing out how irritating it was that the response.flash 
>> never goes away automatically. Found this fix thou in the group, how about 
>> making a standard 4 second fadeout on it?
>>
>> in web2py.js:
>>
>> var flashBox = jQuery(".flash"), flashTimer;
>>   flashBox.click(function(){
>>       if (flashTimer) clearTimeout(flashTimer);
>>       flashBox.fadeOut(400, function(){jQuery(".flash").html('')});
>>   });
>>   flashTimer = setTimeout(function(){flashBox.fadeOut(400, function(){
>> jQuery(".flash").html('')});}, 4000); 
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to