mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Merge branch 'frontend'
This commit is contained in:
commit
513bdf4e24
@ -49,7 +49,9 @@ exposed by a function if necessary.
|
||||
userListSize = 0
|
||||
|
||||
remainingFailures = 3
|
||||
|
||||
|
||||
overlaySmileyList = null
|
||||
|
||||
events =
|
||||
newMessage: $.Callbacks()
|
||||
userMenu: $.Callbacks()
|
||||
@ -117,36 +119,56 @@ Make the user leave the chat when **Tims Chat** is about to be unloaded.
|
||||
async: false
|
||||
suppressErrors: true
|
||||
undefined
|
||||
|
||||
|
||||
$(window).resize ->
|
||||
# TODO
|
||||
return if WCF.System.Mobile.UX._enabled
|
||||
|
||||
return unless $('html').hasClass 'fullscreen'
|
||||
|
||||
do ->
|
||||
verticalContentPadding = $('#content').innerHeight() - $('#content').height()
|
||||
verticalSizeOfContentElements = do ->
|
||||
height = 0
|
||||
$('#content > *:visible').each (k, v) -> height += $(v).outerHeight()
|
||||
height
|
||||
|
||||
freeSpace = $('body').height() - verticalContentPadding - verticalSizeOfContentElements
|
||||
|
||||
$('.timsChatMessageContainer').height $('.timsChatMessageContainer').height() + freeSpace
|
||||
do ->
|
||||
verticalUserListContainerPadding = $('#timsChatUserListContainer').innerHeight() - $('#timsChatUserListContainer').height()
|
||||
sidebarHeight = $('.sidebar > div').height()
|
||||
|
||||
freeSpace = $('body').height() - verticalUserListContainerPadding - sidebarHeight
|
||||
$('#timsChatUserList').height $('#timsChatUserList').height() + freeSpace
|
||||
|
||||
|
||||
|
||||
if $('html').hasClass 'fullscreen'
|
||||
do ->
|
||||
verticalContentPadding = $('#content').innerHeight() - $('#content').height()
|
||||
verticalSizeOfContentElements = do ->
|
||||
height = 0
|
||||
$('#content > *:visible').each (k, v) -> height += $(v).outerHeight()
|
||||
height
|
||||
|
||||
freeSpace = $('body').height() - verticalContentPadding - verticalSizeOfContentElements
|
||||
|
||||
$('.timsChatMessageContainer').height $('.timsChatMessageContainer').height() + freeSpace
|
||||
do ->
|
||||
verticalUserListContainerPadding = $('#timsChatUserListContainer').innerHeight() - $('#timsChatUserListContainer').height()
|
||||
sidebarHeight = $('.sidebar > div').height()
|
||||
|
||||
freeSpace = $('body').height() - verticalUserListContainerPadding - sidebarHeight
|
||||
$('#timsChatUserList').height $('#timsChatUserList').height() + freeSpace
|
||||
|
||||
if $('#timsChatAutoscroll').data 'status'
|
||||
$('.timsChatMessageContainer.active').scrollTop $('.timsChatMessageContainer.active').prop 'scrollHeight'
|
||||
|
||||
Insert the appropriate smiley code into the input when a smiley is clicked.
|
||||
|
||||
$('#smilies').on 'click', 'img', -> insertText " #{$(@).attr('alt')} "
|
||||
|
||||
Copy the first loaded category of smilies so it won't get detached by wcfDialog
|
||||
|
||||
overlaySmileyList = $('<ul class="smileyList">').append $('#smilies .smileyList').clone().children()
|
||||
|
||||
Add click event to smilies in the overlay
|
||||
|
||||
overlaySmileyList.on 'click', 'img', ->
|
||||
insertText " #{$(@).attr('alt')} "
|
||||
overlaySmileyList.wcfDialog 'close'
|
||||
|
||||
Open the smiley wcfDialog
|
||||
|
||||
$('#timsChatSmileyPopupButton').on 'click', ->
|
||||
overlaySmileyList.wcfDialog
|
||||
title: WCF.Language.get 'chat.general.smilies'
|
||||
|
||||
overlaySmileyList.css
|
||||
'max-height': $(window).height() - overlaySmileyList.parent().siblings('.dialogTitlebar').outerHeight()
|
||||
'overflow': 'auto'
|
||||
|
||||
Handle private channel menu
|
||||
|
||||
$('#timsChatMessageTabMenu > .tabMenu').on 'click', '.timsChatMessageTabMenuAnchor', ->
|
||||
@ -312,6 +334,7 @@ Toggle fullscreen mode.
|
||||
$('.timsChatMessageContainer').height messageContainerSize
|
||||
$('#timsChatUserList').height userListSize
|
||||
$('html').removeClass 'fullscreen'
|
||||
do $(window).resize
|
||||
|
||||
Toggle checkboxes.
|
||||
|
||||
@ -828,9 +851,9 @@ Joins a room.
|
||||
|
||||
$('#timsChatTopic > .topic').text currentRoom.topic
|
||||
if currentRoom.topic.trim() is ''
|
||||
$('#timsChatTopic').addClass 'empty'
|
||||
$('#timsChatTopic').addClass 'invisible'
|
||||
else
|
||||
$('#timsChatTopic').removeClass 'empty'
|
||||
$('#timsChatTopic').removeClass 'invisible'
|
||||
|
||||
$('.timsChatMessage').addClass 'unloaded'
|
||||
|
||||
@ -867,7 +890,7 @@ Open private channel
|
||||
$('.timsChatMessageContainer').height $('.timsChatMessageContainer').height()
|
||||
|
||||
if userID isnt 0
|
||||
$('#timsChatTopic').removeClass 'empty'
|
||||
$('#timsChatTopic').removeClass 'invisible'
|
||||
$('#timsChatTopic > .topic').html WCF.Language.get 'chat.global.privateChannelTopic', {username: userList.allTime[userID].username}
|
||||
$('#timsChatMessageTabMenu').removeClass 'singleTab'
|
||||
|
||||
@ -893,9 +916,9 @@ Open private channel
|
||||
else
|
||||
$('#timsChatTopic > .topic').text currentRoom.topic
|
||||
if currentRoom.topic.trim() is ''
|
||||
$('#timsChatTopic').addClass 'empty'
|
||||
$('#timsChatTopic').addClass 'invisible'
|
||||
else
|
||||
$('#timsChatTopic').removeClass 'empty'
|
||||
$('#timsChatTopic').removeClass 'invisible'
|
||||
|
||||
$('.timsChatMessageContainer').removeClass 'active'
|
||||
$("#timsChatMessageContainer#{userID}").addClass 'active'
|
||||
|
@ -212,7 +212,7 @@
|
||||
border-color: @wcfContainerBorderColor;
|
||||
|
||||
> .timsChatText {
|
||||
li {
|
||||
> li {
|
||||
border-style: solid;
|
||||
border-width: 0 0 1px 0;
|
||||
border-color: @wcfContainerBorderColor;
|
||||
@ -425,7 +425,7 @@
|
||||
|
||||
#timsChatUserList {
|
||||
> ul {
|
||||
> li {
|
||||
> .timsChatUser {
|
||||
&.you {
|
||||
a {
|
||||
&:hover {
|
||||
@ -435,6 +435,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
&.away {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
a {
|
||||
img {
|
||||
margin-right: @wcfGapTiny;
|
||||
@ -455,6 +459,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
#timsChatUploadDropdownMenu {
|
||||
z-index: 398;
|
||||
}
|
||||
|
||||
#timsChatCopyrightDialog {
|
||||
> div {
|
||||
background-repeat: no-repeat;
|
||||
@ -465,6 +473,18 @@
|
||||
#fish {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.dialogContent {
|
||||
.smileyList {
|
||||
> li {
|
||||
> a {
|
||||
img {
|
||||
margin: @wcfGapTiny;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
@ -158,7 +158,7 @@ Probieren Sie, den Chat neu zu laden<!-- , bei Risiken und Nebenwirkungen fragen
|
||||
<item name="chat.global.scroll"><![CDATA[Scrollen]]></item>
|
||||
<item name="chat.global.notify"><![CDATA[Benachrichtigen]]></item>
|
||||
<item name="chat.global.notify.title"><![CDATA[Neue Nachrichten]]></item>
|
||||
<item name="chat.global.smilies"><![CDATA[Smilies]]></item>
|
||||
<item name="chat.global.smilies"><![CDATA[Smileys]]></item>
|
||||
<item name="chat.global.clear"><![CDATA[Chat leeren]]></item>
|
||||
<item name="chat.global.mark"><![CDATA[Markieren]]></item>
|
||||
<item name="chat.global.fullscreen"><![CDATA[Vollbild]]></item>
|
||||
|
Loading…
Reference in New Issue
Block a user