openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ace80dc82ca26d60eb8703a1efed0d0bb0f9e90f
parent 560278e327fb1a6a74891c3c7d0568c7ab0e1f79
Author: Jan Dankert <devnull@localhost>
Date:   Thu, 25 Oct 2012 20:48:09 +0200

Timeout für Notices erhöht.

Diffstat:
themes/default/js/openrat.js | 18+++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js @@ -846,9 +846,9 @@ function doResponse(data,status,element) $.each(value.log, function(name,value) { $(notice).append('<div class="log">'+value+'</div>'); }); - $('#noticebar').prepend(notice); - //$('#noticebar div.notice').fadeIn(); + $('#noticebar').prepend(notice); // Notice anhängen. + // Per Klick wird die Notice entfernt. $(notice).fadeIn().click( function() { $(this).fadeOut('fast',function() { $(this).remove(); } ); @@ -856,20 +856,12 @@ function doResponse(data,status,element) var timeoutSeconds; if ( value.status == 'ok' ) - timeoutSeconds = 2; + timeoutSeconds = 3; else - timeoutSeconds = 5; + timeoutSeconds = 8; - //$(notice).delay(timeoutSeconds*1000).fadeOut( function() { $(this).remove(); } ); + // Und nach einem Timeout entfernt sich die Notice von alleine. setTimeout( function() { $(notice).fadeOut('slow').remove(); },timeoutSeconds*1000 ); - - /* - $('div.window div.status').html('<div />'); - $('div.window div.status div').addClass( value.status ); - $('div.window div.status div').append( value.text ); - $('div.window div.status div').delay(3000).fadeOut(2500, function() { $(this).remove(); }); - */ - //alert( value.text ); }); $.each(data['errors'], function(idx,value) {