1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Fixed „active“-marking of scroll button.

This commit is contained in:
Tim Düsterhus 2012-05-02 20:53:32 +02:00
parent 5c1f84eb1e
commit 708df74673

View File

@ -174,7 +174,7 @@ window.console ?=
# Immediatly scroll down when activating autoscroll # Immediatly scroll down when activating autoscroll
$('#timsChatAutoscroll').click (event) -> $('#timsChatAutoscroll').click (event) ->
$(this).parent().removeClass('default') $(this).parent().removeClass('active')
if $(this).data 'status' if $(this).data 'status'
$('.timsChatMessageContainer').scrollTop $('.timsChatMessageContainer ul').height() $('.timsChatMessageContainer').scrollTop $('.timsChatMessageContainer ul').height()
@oldScrollTop = $('.timsChatMessageContainer').scrollTop() @oldScrollTop = $('.timsChatMessageContainer').scrollTop()
@ -298,7 +298,7 @@ window.console ?=
if $('.timsChatMessageContainer').scrollTop() < @oldScrollTop if $('.timsChatMessageContainer').scrollTop() < @oldScrollTop
if $('#timsChatAutoscroll').data('status') is 1 if $('#timsChatAutoscroll').data('status') is 1
$('#timsChatAutoscroll').click() $('#timsChatAutoscroll').click()
$('#timsChatAutoscroll').parent().addClass('default').fadeOut('slow').fadeIn('slow') $('#timsChatAutoscroll').parent().addClass('active').fadeOut('slow').fadeIn('slow')
# Insert the messages # Insert the messages
for message in messages for message in messages