1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-21 21:30:08 +00:00

Backport: Make smiley selection compatible with WCF 2.0 and 2.1

This backports 0e7d4d9c07

Conflicts:
	file/js/be.bastelstu.Chat.litcoffee
This commit is contained in:
Maximilian Mader 2015-01-09 20:16:47 +01:00 committed by Tim Düsterhus
parent b8fb128dc5
commit 12dd915ea2
3 changed files with 14 additions and 6 deletions

View File

@ -156,11 +156,11 @@ Make the user leave the chat when **Tims Chat** is about to be unloaded.
Insert the appropriate smiley code into the input when a smiley is clicked.
$('#smilies').on 'click', 'img', -> insertText " #{$(@).attr('alt')} "
$('#timsChatSmileyContainer').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()
overlaySmileyList = $('<ul class="smileyList">').append $('#timsChatSmileyContainer .smileyList').clone().children()
Add click event to smilies in the overlay
@ -322,9 +322,9 @@ Mark smilies as disabled when they are disabled.
$('#timsChatSmilies').click (event) ->
if $(@).data 'status'
$('#smilies').removeClass 'invisible'
$('#timsChatSmileyContainer').removeClass 'invisible'
else
$('#smilies').addClass 'invisible'
$('#timsChatSmileyContainer').addClass 'invisible'
Toggle fullscreen mode.

View File

@ -46,6 +46,10 @@
{if MODULE_SMILEY}
new WCF.Message.Smilies();
if (typeof $.fn.messageTabMenu === 'function') {
$('.messageTabMenu > .messageTabMenu').messageTabMenu().show();
}
{/if}
{capture assign='messageTemplate'}{include application='chat' file='message'}{/capture}
@ -134,7 +138,9 @@
</form>
{if MODULE_SMILEY && $smileyCategories|count}
{include file='messageFormSmilies' wysiwygSelector=''}
<div id="timsChatSmileyContainer" class="messageTabMenu marginTop">
{include file='messageFormSmilies' wysiwygSelector=''}
</div>
{/if}
<div id="timsChatOptions" class="marginTop">

View File

@ -1,3 +1,5 @@
{if MODULE_ATTACHMENT && $__wcf->session->getPermission('user.chat.canUploadAttachment')}<script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Attachment{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>{/if}
{if !'LAST_UPDATE_TIME'|defined}
{if MODULE_ATTACHMENT && $__wcf->session->getPermission('user.chat.canUploadAttachment')}<script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Attachment{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>{/if}
{/if}
<script data-relocate="true" src="{$__wcf->getPath('chat')}js/be.bastelstu.Chat{if !ENABLE_DEBUG_MODE}.min{/if}.js?version={PACKAGE_VERSION|rawurlencode}"></script>
{event name='javascript'}