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

Make smiley selection compatible with WCF 2.0 and 2.1

This commit is contained in:
Maximilian Mader 2015-01-09 20:16:47 +01:00
parent 3758f008b0
commit 0e7d4d9c07
3 changed files with 16 additions and 8 deletions

View File

@ -157,11 +157,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. 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 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 Add click event to smilies in the overlay
@ -335,15 +335,15 @@ Handle saving of persistent toggleable buttons
Mark smilies as disabled when they are disabled. Mark smilies as disabled when they are disabled.
if $('#timsChatSmilies').data('status') is 0 if $('#timsChatSmilies').data('status') is 0
$('#smilies').addClass 'invisible' $('#timsChatSmileyContainer').addClass 'invisible'
else else
$('#smilies').removeClass 'invisible' $('#timsChatSmileyContainer').removeClass 'invisible'
$('#timsChatSmilies').click (event) -> $('#timsChatSmilies').click (event) ->
if $(@).data 'status' if $(@).data 'status'
$('#smilies').removeClass 'invisible' $('#timsChatSmileyContainer').removeClass 'invisible'
else else
$('#smilies').addClass 'invisible' $('#timsChatSmileyContainer').addClass 'invisible'
Toggle fullscreen mode. Toggle fullscreen mode.

View File

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