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,6 +124,7 @@ Make the user leave the chat when **Tims Chat** is about to be unloaded.
|
|||||||
|
|
||||||
return unless $('html').hasClass 'fullscreen'
|
return unless $('html').hasClass 'fullscreen'
|
||||||
|
|
||||||
|
do ->
|
||||||
verticalContentPadding = $('#content').innerHeight() - $('#content').height()
|
verticalContentPadding = $('#content').innerHeight() - $('#content').height()
|
||||||
verticalSizeOfContentElements = do ->
|
verticalSizeOfContentElements = do ->
|
||||||
height = 0
|
height = 0
|
||||||
@ -131,6 +134,14 @@ Make the user leave the chat when **Tims Chat** is about to be unloaded.
|
|||||||
freeSpace = $('body').height() - verticalContentPadding - verticalSizeOfContentElements
|
freeSpace = $('body').height() - verticalContentPadding - verticalSizeOfContentElements
|
||||||
|
|
||||||
$('.timsChatMessageContainer').height $('.timsChatMessageContainer').height() + freeSpace
|
$('.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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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