From 5a9725c24e1ee613759ab05948d1b62aca4cbe47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 30 Jan 2013 17:19:32 +0100 Subject: [PATCH] Make smilies transparent if disabled --- file/js/be.bastelstu.Chat.coffee | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/file/js/be.bastelstu.Chat.coffee b/file/js/be.bastelstu.Chat.coffee index 606d6ac..7749820 100644 --- a/file/js/be.bastelstu.Chat.coffee +++ b/file/js/be.bastelstu.Chat.coffee @@ -178,13 +178,6 @@ window.console ?= # Refreshes the roomlist $('#timsChatRoomList button').click $.proxy @refreshRoomList, @ - # Clears the stream - $('#timsChatClear').click (event) -> - event.preventDefault() - $('.timsChatMessage').remove() - @oldScrollTop = null - $('#timsChatMessageContainer').scrollTop $('#timsChatMessageContainer ul').height() - # Toggle Buttons $('.timsChatToggle').click (event) -> element = $ @ @@ -200,6 +193,19 @@ window.console ?= $('#timsChatInput').focus() + # Clears the stream + $('#timsChatClear').click (event) -> + event.preventDefault() + $('.timsChatMessage').remove() + @oldScrollTop = null + $('#timsChatMessageContainer').scrollTop $('#timsChatMessageContainer ul').height() + + $('#timsChatSmilies.click (event) -> + if $(@).data 'status' + $('#smilies').removeClass 'disabled' + else + $('#smilies').addClass 'disabled' + # Enable fullscreen-mode $('#timsChatFullscreen').click (event) -> if $(@).data 'status'