commit 560278e327fb1a6a74891c3c7d0568c7ab0e1f79
parent 540675df113fd29a3a97625a3fcb656d396bb251
Author: Jan Dankert <devnull@localhost>
Date: Thu, 25 Oct 2012 20:46:35 +0200
Fix: Notices haben ein Timeout und sind trotzdem per Click schließbar.
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js
@@ -847,7 +847,8 @@ function doResponse(data,status,element)
$(notice).append('<div class="log">'+value+'</div>');
});
$('#noticebar').prepend(notice);
- $('#noticebar div.notice').fadeIn();
+ //$('#noticebar div.notice').fadeIn();
+
$(notice).fadeIn().click( function()
{
$(this).fadeOut('fast',function() { $(this).remove(); } );
@@ -858,9 +859,9 @@ function doResponse(data,status,element)
timeoutSeconds = 2;
else
timeoutSeconds = 5;
-
- $(notice).delay(timeoutSeconds*1000).fadeOut( function() { $(this).remove(); } );
+ //$(notice).delay(timeoutSeconds*1000).fadeOut( function() { $(this).remove(); } );
+ setTimeout( function() { $(notice).fadeOut('slow').remove(); },timeoutSeconds*1000 );
/*
$('div.window div.status').html('<div />');