mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Add smiley overlay for mobile devices
This commit is contained in:
parent
bf0463a325
commit
f5bd373839
@ -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', ->
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user