mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Adjust sidebar height in fullscreen mode
This commit is contained in:
parent
c32bd4bbef
commit
4e641fdfa1
@ -46,6 +46,7 @@ exposed by a function if necessary.
|
|||||||
openChannel = 0
|
openChannel = 0
|
||||||
|
|
||||||
messageContainerSize = 0
|
messageContainerSize = 0
|
||||||
|
userListSize = 0
|
||||||
|
|
||||||
remainingFailures = 3
|
remainingFailures = 3
|
||||||
|
|
||||||
@ -80,6 +81,7 @@ Initialize **Tims Chat**. Bind needed DOM events and initialize data structures.
|
|||||||
initialized = true
|
initialized = true
|
||||||
|
|
||||||
messageContainerSize = $('.timsChatMessageContainer').height()
|
messageContainerSize = $('.timsChatMessageContainer').height()
|
||||||
|
userListSize = $('#timsChatUserList').height()
|
||||||
|
|
||||||
v.config = config
|
v.config = config
|
||||||
v.titleTemplate = titleTemplate
|
v.titleTemplate = titleTemplate
|
||||||
@ -122,15 +124,24 @@ Make the user leave the chat when **Tims Chat** is about to be unloaded.
|
|||||||
|
|
||||||
return unless $('html').hasClass 'fullscreen'
|
return unless $('html').hasClass 'fullscreen'
|
||||||
|
|
||||||
verticalContentPadding = $('#content').innerHeight() - $('#content').height()
|
do ->
|
||||||
verticalSizeOfContentElements = do ->
|
verticalContentPadding = $('#content').innerHeight() - $('#content').height()
|
||||||
height = 0
|
verticalSizeOfContentElements = do ->
|
||||||
$('#content > *:visible').each (k, v) -> height += $(v).outerHeight()
|
height = 0
|
||||||
height
|
$('#content > *:visible').each (k, v) -> height += $(v).outerHeight()
|
||||||
|
height
|
||||||
|
|
||||||
freeSpace = $('body').height() - verticalContentPadding - verticalSizeOfContentElements
|
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
|
||||||
|
|
||||||
|
|
||||||
$('.timsChatMessageContainer').height $('.timsChatMessageContainer').height() + freeSpace
|
|
||||||
|
|
||||||
Insert the appropriate smiley code into the input when a smiley is clicked.
|
Insert the appropriate smiley code into the input when a smiley is clicked.
|
||||||
|
|
||||||
@ -299,6 +310,7 @@ Toggle fullscreen mode.
|
|||||||
do $(window).resize
|
do $(window).resize
|
||||||
else
|
else
|
||||||
$('.timsChatMessageContainer').height messageContainerSize
|
$('.timsChatMessageContainer').height messageContainerSize
|
||||||
|
$('#timsChatUserList').height userListSize
|
||||||
$('html').removeClass 'fullscreen'
|
$('html').removeClass 'fullscreen'
|
||||||
|
|
||||||
Toggle checkboxes.
|
Toggle checkboxes.
|
||||||
|
Loading…
Reference in New Issue
Block a user