mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Use CSS animations for topic
This commit is contained in:
parent
5a5a2c9ad1
commit
76191f9476
@ -178,6 +178,13 @@ 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 = $ @
|
||||
@ -193,19 +200,6 @@ 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'
|
||||
@ -225,7 +219,7 @@ window.console ?=
|
||||
$('#timsChatNotify').click (event) ->
|
||||
if $(@).data('status') and window.webkitNotifications.checkPermission() isnt 0
|
||||
window.webkitNotifications.requestPermission()
|
||||
|
||||
|
||||
###
|
||||
# Changes the chat-room.
|
||||
#
|
||||
@ -248,14 +242,11 @@ window.console ?=
|
||||
target.parent().addClass 'activeMenuItem'
|
||||
|
||||
# Set new topic
|
||||
$('#timsChatTopic').text data.topic
|
||||
if data.topic is ''
|
||||
return if $('#timsChatTopic').text().trim() is ''
|
||||
|
||||
$('#timsChatTopic').wcfBlindOut 'vertical', () ->
|
||||
$(@).text ''
|
||||
$('#timsChatTopic').addClass 'empty'
|
||||
else
|
||||
$('#timsChatTopic').text data.topic
|
||||
$('#timsChatTopic').wcfBlindIn() if $('#timsChatTopic').text().trim() isnt '' and $('#timsChatTopic').is ':hidden'
|
||||
$('#timsChatTopic').removeClass 'empty'
|
||||
|
||||
$('.timsChatMessage').addClass 'unloaded', 800
|
||||
@handleMessages data.messages
|
||||
@ -383,7 +374,7 @@ window.console ?=
|
||||
element.addClass 'away'
|
||||
element.attr 'title', user.awayStatus
|
||||
else
|
||||
element.removeClass 'away'
|
||||
element.removeClass 'timsChatAway'
|
||||
element.removeAttr 'title'
|
||||
element.data 'tooltip', ''
|
||||
if user.suspended
|
||||
|
@ -13,6 +13,16 @@
|
||||
|
||||
#timsChatTopic {
|
||||
padding: 5px;
|
||||
.transition(height, .2s);
|
||||
.transition(padding-top, .2s);
|
||||
.transition(padding-bottom, .2s);
|
||||
|
||||
&.empty {
|
||||
height: 0px;
|
||||
overflow: hidden;
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@
|
||||
{include file='header' sandbox=false sidebarOrientation='right'}
|
||||
|
||||
<div id="timsChatRoomContent">
|
||||
<div id="timsChatTopic" class="container"{if $room->topic|language === ''} style="display: none;"{/if}>{$room->topic|language}</div>
|
||||
<div id="timsChatTopic" class="container{if $room->topic|language === ''} empty{/if}">{$room->topic|language}</div>
|
||||
<fieldset>
|
||||
<div id="timsChatMessageContainer" class="timsChatMessageContainer container box shadow1">
|
||||
<noscript><p class="error">{lang}chat.general.noJs{/lang}</p></noscript>
|
||||
|
Loading…
Reference in New Issue
Block a user