[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-26 Thread Niphlod
we should add some features to the standard flash message  there are 
some messages that are good to behave as "sticky" (click ensures the 
message is read by the user) and some that are "niceties" that can fade out 
.
We should only agree on which features use and what variables use as a 
standard.
I'm adding it to the roadmap but feel free to fiel a bug on googlecode 
pointing to this thread.

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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-26 Thread LightDot
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-29 Thread Craig Matthews
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-29 Thread Niphlod
fits better in a plugin.

On Friday, March 29, 2013 8:49:57 AM UTC+1, Craig Matthews wrote:
>
> 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.