mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Clean up templates
This commit is contained in:
parent
7e275f9fc8
commit
83f39ca868
@ -7,7 +7,6 @@
|
||||
{include file='javascriptInclude' application='chat'}
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var chat;
|
||||
(function ($, window) {
|
||||
$(function(){
|
||||
WCF.Language.addObject({
|
||||
@ -18,23 +17,28 @@
|
||||
'chat.general.notify.title': '{lang}chat.general.notify.title{/lang}'
|
||||
});
|
||||
|
||||
{event name='shouldInit'}
|
||||
{event name='beforeInit'}
|
||||
|
||||
// Boot the chat
|
||||
WCF.TabMenu.init();
|
||||
{if MODULE_SMILEY}WCF.TabMenu.init();{/if}
|
||||
new WCF.Message.Smilies();
|
||||
{capture assign='messageTemplate'}{include application='chat' file='message'}{/capture}
|
||||
|
||||
chat = new be.bastelstu.Chat({
|
||||
window.chat = new be.bastelstu.Chat(
|
||||
{
|
||||
reloadTime: {@CHAT_RELOADTIME},
|
||||
unloadURL: '{link application="chat" controller="Leave"}{/link}',
|
||||
messageURL: '{link application="chat" controller="NewMessages"}{/link}',
|
||||
socketIOPath: '{@CHAT_SOCKET_IO_PATH|encodeJS}'
|
||||
}, (new WCF.Template('{ldelim}$title} - {'chat.general.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}')).compile(), (new WCF.Template('{@$messageTemplate|encodeJS}')).compile());
|
||||
{event name='didInit'}
|
||||
},
|
||||
new WCF.Template('{ldelim}$title} - {'chat.general.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}'),
|
||||
new WCF.Template('{@$messageTemplate|encodeJS}')
|
||||
);
|
||||
|
||||
{event name='afterInit'}
|
||||
|
||||
// show the last X messages
|
||||
chat.handleMessages([
|
||||
window.chat.handleMessages([
|
||||
{implode from=$newestMessages item='message'}{@$message->jsonify()}{/implode}
|
||||
]);
|
||||
|
||||
@ -44,7 +48,7 @@
|
||||
$('#timsChatCopyright').click(function (event) {
|
||||
event.preventDefault();
|
||||
if (!$.wcfIsset('timsChatCopyrightDialog')) $('<fieldset id="timsChatCopyrightDialog"></fieldset>').appendTo('body');
|
||||
$('#timsChatCopyrightDialog').load('{link application='chat' controller='Copyright'}{/link}').wcfDialog({
|
||||
$('#timsChatCopyrightDialog').load('{link application="chat" controller="Copyright"}{/link}').wcfDialog({
|
||||
title: 'Tims Chat{if SHOW_VERSION_NUMBER} {PACKAGE_VERSION}{/if}'
|
||||
});
|
||||
});
|
||||
@ -55,7 +59,7 @@
|
||||
be.bastelstu.Chat.Log.loadOverlay();
|
||||
});
|
||||
});
|
||||
})(jQuery, this)
|
||||
})(jQuery, this);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@ -89,7 +93,8 @@
|
||||
{include file='header' sandbox=false sidebarOrientation='right'}
|
||||
|
||||
<div>
|
||||
<div id="timsChatTopic" class="container{if $room->topic|language === ''} empty{/if}">{$room->topic|language}</div>
|
||||
<p id="timsChatTopic" class="container{if $room->topic|language === ''} empty{/if}">{$room->topic|language}</p>
|
||||
|
||||
<div id="timsChatMessageContainer" class="timsChatMessageContainer container box shadow1">
|
||||
<p class="error noJsOnly" style="display: none;">{lang}chat.general.noJs{/lang}</p>
|
||||
<ul>
|
||||
@ -150,6 +155,7 @@
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file='footer' sandbox=false}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<script type="text/javascript" src="{@$__wcf->getPath('chat')}js/be.bastelstu.Chat.js?version={PACKAGE_VERSION|urlencode}"></script>
|
||||
<script type="text/javascript" src="{$__wcf->getPath('chat')}js/be.bastelstu.Chat.js?version={PACKAGE_VERSION|rawurlencode}"></script>
|
||||
{if CHAT_SOCKET_IO_PATH}<script type="text/javascript" src="{CHAT_SOCKET_IO_PATH}/socket.io/socket.io.js"></script>{/if}
|
||||
<script type="text/javascript" src="{@$__wcf->getPath('chat')}js/be.bastelstu.Chat.Log.js?version={PACKAGE_VERSION|urlencode}"></script>
|
||||
<script type="text/javascript" src="{$__wcf->getPath('chat')}js/be.bastelstu.Chat.Log.js?version={PACKAGE_VERSION|rawurlencode}"></script>
|
||||
{event name='javascript'}
|
Loading…
Reference in New Issue
Block a user