1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Add smiley overlay for mobile devices

This commit is contained in:
Maximilian Mader 2014-02-27 22:16:08 +01:00
parent bf0463a325
commit f5bd373839
2 changed files with 40 additions and 2 deletions

View File

@ -49,7 +49,9 @@ exposed by a function if necessary.
userListSize = 0 userListSize = 0
remainingFailures = 3 remainingFailures = 3
overlaySmileyList = null
events = events =
newMessage: $.Callbacks() newMessage: $.Callbacks()
userMenu: $.Callbacks() userMenu: $.Callbacks()
@ -147,6 +149,26 @@ Insert the appropriate smiley code into the input when a smiley is clicked.
$('#smilies').on 'click', 'img', -> insertText " #{$(@).attr('alt')} " $('#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 Handle private channel menu
$('#timsChatMessageTabMenu > .tabMenu').on 'click', '.timsChatMessageTabMenuAnchor', -> $('#timsChatMessageTabMenu > .tabMenu').on 'click', '.timsChatMessageTabMenuAnchor', ->

View File

@ -425,7 +425,7 @@
#timsChatUserList { #timsChatUserList {
> ul { > ul {
> li { > .timsChatUser {
&.you { &.you {
a { a {
&:hover { &:hover {
@ -435,6 +435,10 @@
} }
} }
&.away {
opacity: 0.5;
}
a { a {
img { img {
margin-right: @wcfGapTiny; margin-right: @wcfGapTiny;
@ -469,6 +473,18 @@
#fish { #fish {
font-size: 2rem; font-size: 2rem;
} }
.dialogContent {
.smileyList {
> li {
> a {
img {
margin: @wcfGapTiny;
}
}
}
}
}
} }
// TODO // TODO