If you are interested you could add this code:

  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('')});}, 8000);

inside the function web2py_ajax_init in static/js/web2py.js file (attached 
you'll find modified version for your personal usage. Please beware that it 
is related to the last trunk version of web2py and it could be incompatible 
with the version you are using currently).

By this code the flash message will close after 8 seconds if the user 
doesn't close it before.


Il giorno giovedì 20 dicembre 2012 15:31:38 UTC+1, Paolo Caruccio ha 
scritto:
>
> Maybe you'll find this 
> discussion<https://groups.google.com/d/topic/web2py/xXGAGZvLDzo/discussion>
>  useful.
>
>
> Il giorno giovedì 20 dicembre 2012 09:36:25 UTC+1, Johann Spies ha scritto:
>>
>> When I log in the flash telling me that I am logged in does not timeout 
>> until I close it.
>>
>> I want it to fade out after a period - say two seconds.  I have no 
>> clarity on how to change this behaviour in web2py.js.
>>
>> How do get the flash to fade out and set the timeout?
>>
>> Regards
>> Johann
>>
>> -- 
>> Because experiencing your loyal love is better than life itself, 
>> my lips will praise you.  (Psalm 63:3)
>>
>

-- 



Attachment: web2py.js
Description: JavaScript source

Reply via email to