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'