mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 02:30:12 +01:00
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:
parent
99f1b9b6df
commit
b3d92b9779
1 changed files with 7 additions and 2 deletions
|
|
@ -177,8 +177,13 @@ var TracksPages = {
|
|||
var flash = $('div#message_holder');
|
||||
flash.html("<h4 id=\'flash\' class=\'alert "+type+"\'>"+message+"</h4>");
|
||||
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) {
|
||||
$('#badge_count').html(count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue