fix #1160 (again) by changing the long fadeout of the flash message into a fadein.delay.fadeout sequence for better readability.

This commit is contained in:
Reinier Balt 2011-05-03 13:46:33 +02:00
parent 99f1b9b6df
commit b3d92b9779

View file

@ -177,8 +177,13 @@ var TracksPages = {
var flash = $('div#message_holder'); var flash = $('div#message_holder');
flash.html("<h4 id=\'flash\' class=\'alert "+type+"\'>"+message+"</h4>"); flash.html("<h4 id=\'flash\' class=\'alert "+type+"\'>"+message+"</h4>");
flash = $('h4#flash'); flash = $('h4#flash');
flash.show();
flash.fadeOut(fade_duration_in_sec*1000); fadein_duration = 1500;
fadeout_duration = 1500;
show_duration = fade_duration_in_sec*1000 - fadein_duration - fadeout_duration
if (show_duration < 0)
show_duration = 1000;
flash.fadeIn(fadein_duration).delay(show_duration).fadeOut(fadeout_duration);
}, },
set_page_badge: function(count) { set_page_badge: function(count) {
$('#badge_count').html(count); $('#badge_count').html(count);