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'}
|
{include file='javascriptInclude' application='chat'}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var chat;
|
|
||||||
(function ($, window) {
|
(function ($, window) {
|
||||||
$(function(){
|
$(function(){
|
||||||
WCF.Language.addObject({
|
WCF.Language.addObject({
|
||||||
@ -18,23 +17,28 @@
|
|||||||
'chat.general.notify.title': '{lang}chat.general.notify.title{/lang}'
|
'chat.general.notify.title': '{lang}chat.general.notify.title{/lang}'
|
||||||
});
|
});
|
||||||
|
|
||||||
{event name='shouldInit'}
|
{event name='beforeInit'}
|
||||||
|
|
||||||
// Boot the chat
|
// Boot the chat
|
||||||
WCF.TabMenu.init();
|
{if MODULE_SMILEY}WCF.TabMenu.init();{/if}
|
||||||
new WCF.Message.Smilies();
|
new WCF.Message.Smilies();
|
||||||
{capture assign='messageTemplate'}{include application='chat' file='message'}{/capture}
|
{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}',
|
reloadTime: {@CHAT_RELOADTIME},
|
||||||
messageURL: '{link application="chat" controller="NewMessages"}{/link}',
|
unloadURL: '{link application="chat" controller="Leave"}{/link}',
|
||||||
socketIOPath: '{@CHAT_SOCKET_IO_PATH|encodeJS}'
|
messageURL: '{link application="chat" controller="NewMessages"}{/link}',
|
||||||
}, (new WCF.Template('{ldelim}$title} - {'chat.general.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}')).compile(), (new WCF.Template('{@$messageTemplate|encodeJS}')).compile());
|
socketIOPath: '{@CHAT_SOCKET_IO_PATH|encodeJS}'
|
||||||
{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
|
// show the last X messages
|
||||||
chat.handleMessages([
|
window.chat.handleMessages([
|
||||||
{implode from=$newestMessages item='message'}{@$message->jsonify()}{/implode}
|
{implode from=$newestMessages item='message'}{@$message->jsonify()}{/implode}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -44,7 +48,7 @@
|
|||||||
$('#timsChatCopyright').click(function (event) {
|
$('#timsChatCopyright').click(function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (!$.wcfIsset('timsChatCopyrightDialog')) $('<fieldset id="timsChatCopyrightDialog"></fieldset>').appendTo('body');
|
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}'
|
title: 'Tims Chat{if SHOW_VERSION_NUMBER} {PACKAGE_VERSION}{/if}'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -55,7 +59,7 @@
|
|||||||
be.bastelstu.Chat.Log.loadOverlay();
|
be.bastelstu.Chat.Log.loadOverlay();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})(jQuery, this)
|
})(jQuery, this);
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -84,72 +88,74 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="tpl{$templateName|ucfirst}">
|
<body id="tpl{$templateName|ucfirst}">
|
||||||
{capture assign='sidebar'}{include application='chat' file='sidebar'}{/capture}
|
{capture assign='sidebar'}{include application='chat' file='sidebar'}{/capture}
|
||||||
{capture assign='headerNavigation'}{include application='chat' file='navigationInclude'}{/capture}
|
{capture assign='headerNavigation'}{include application='chat' file='navigationInclude'}{/capture}
|
||||||
{include file='header' sandbox=false sidebarOrientation='right'}
|
{include file='header' sandbox=false sidebarOrientation='right'}
|
||||||
|
|
||||||
<div>
|
<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>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form id="timsChatForm" action="{link application='chat' controller='Chat' action='Send'}{/link}" method="post">
|
<div id="timsChatMessageContainer" class="timsChatMessageContainer container box shadow1">
|
||||||
<fieldset>
|
<p class="error noJsOnly" style="display: none;">{lang}chat.general.noJs{/lang}</p>
|
||||||
<dl class="wide" id="timsChatInputContainer">
|
|
||||||
<dd>
|
|
||||||
<input id="timsChatInput" accesskey="w" type="text" class="inputText long" name="text" autocomplete="off" maxlength="{@CHAT_MAX_LENGTH}" disabled="disabled" required="required" placeholder="{lang}chat.general.submit.default{/lang}" />
|
|
||||||
<small class="innerError" style="display: none;">Lorem ipsum dolor sit amet.</small>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="timsChatControls" class="marginTop">
|
|
||||||
{if MODULE_SMILEY}
|
|
||||||
<div class="tabMenuContainer">
|
|
||||||
{include file='messageFormSmilies' wysiwygSelector=''}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
<nav id="timsChatOptions">
|
|
||||||
<span class="invisible">{lang}chat.general.controls{/lang}</span>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
|
||||||
<a id="timsChatAutoscroll" accesskey="d" class="timsChatToggle jsTooltip" title="{lang}wcf.global.button.disable{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="1">
|
|
||||||
<span class="icon icon16 icon-circle-blank"></span><span>{lang}chat.general.scroll{/lang}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a id="timsChatFullscreen" accesskey="f" class="timsChatToggle jsTooltip" title="{lang}wcf.global.button.disable{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="0">
|
|
||||||
<span class="icon icon16 icon-off"></span><span>{lang}chat.general.fullscreen{/lang}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a id="timsChatNotify" accesskey="n" class="timsChatToggle jsTooltip" title="{lang}wcf.global.button.enable{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="0">
|
|
||||||
<span class="icon icon16 icon-off"></span><span>{lang}chat.general.notify{/lang}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li{if !MODULE_SMILEY} style="display: none;"{/if}>
|
|
||||||
<a id="timsChatSmilies" accesskey="e" class="timsChatToggle jsTooltip" title="{lang}wcf.global.button.{if ENABLE_SMILIES_DEFAULT_VALUE}dis{else}en{/if}able{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="{@ENABLE_SMILIES_DEFAULT_VALUE}">
|
|
||||||
<span class="icon icon16 icon-{if ENABLE_SMILIES_DEFAULT_VALUE}circle-blank{else}off{/if}"></span><span>{lang}chat.general.smilies{/lang}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a id="timsChatClear">
|
|
||||||
<span class="icon icon16 icon-remove"></span><span>{lang}chat.general.clear{/lang}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a id="timsChatMark" class="jsTooltip" title="{lang}chat.general.mark.description{/lang}">
|
|
||||||
<span class="icon icon16 icon-check"></span><span>{lang}chat.general.mark{/lang}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</div>
|
||||||
|
|
||||||
|
<form id="timsChatForm" action="{link application='chat' controller='Chat' action='Send'}{/link}" method="post">
|
||||||
|
<fieldset>
|
||||||
|
<dl class="wide" id="timsChatInputContainer">
|
||||||
|
<dd>
|
||||||
|
<input id="timsChatInput" accesskey="w" type="text" class="inputText long" name="text" autocomplete="off" maxlength="{@CHAT_MAX_LENGTH}" disabled="disabled" required="required" placeholder="{lang}chat.general.submit.default{/lang}" />
|
||||||
|
<small class="innerError" style="display: none;">Lorem ipsum dolor sit amet.</small>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id="timsChatControls" class="marginTop">
|
||||||
|
{if MODULE_SMILEY}
|
||||||
|
<div class="tabMenuContainer">
|
||||||
|
{include file='messageFormSmilies' wysiwygSelector=''}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<nav id="timsChatOptions">
|
||||||
|
<span class="invisible">{lang}chat.general.controls{/lang}</span>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a id="timsChatAutoscroll" accesskey="d" class="timsChatToggle jsTooltip" title="{lang}wcf.global.button.disable{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="1">
|
||||||
|
<span class="icon icon16 icon-circle-blank"></span><span>{lang}chat.general.scroll{/lang}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a id="timsChatFullscreen" accesskey="f" class="timsChatToggle jsTooltip" title="{lang}wcf.global.button.disable{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="0">
|
||||||
|
<span class="icon icon16 icon-off"></span><span>{lang}chat.general.fullscreen{/lang}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a id="timsChatNotify" accesskey="n" class="timsChatToggle jsTooltip" title="{lang}wcf.global.button.enable{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="0">
|
||||||
|
<span class="icon icon16 icon-off"></span><span>{lang}chat.general.notify{/lang}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li{if !MODULE_SMILEY} style="display: none;"{/if}>
|
||||||
|
<a id="timsChatSmilies" accesskey="e" class="timsChatToggle jsTooltip" title="{lang}wcf.global.button.{if ENABLE_SMILIES_DEFAULT_VALUE}dis{else}en{/if}able{/lang}" data-disable-message="{lang}wcf.global.button.disable{/lang}" data-enable-message="{lang}wcf.global.button.enable{/lang}" data-status="{@ENABLE_SMILIES_DEFAULT_VALUE}">
|
||||||
|
<span class="icon icon16 icon-{if ENABLE_SMILIES_DEFAULT_VALUE}circle-blank{else}off{/if}"></span><span>{lang}chat.general.smilies{/lang}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a id="timsChatClear">
|
||||||
|
<span class="icon icon16 icon-remove"></span><span>{lang}chat.general.clear{/lang}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a id="timsChatMark" class="jsTooltip" title="{lang}chat.general.mark.description{/lang}">
|
||||||
|
<span class="icon icon16 icon-check"></span><span>{lang}chat.general.mark{/lang}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{include file='footer' sandbox=false}
|
{include file='footer' sandbox=false}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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}
|
{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'}
|
{event name='javascript'}
|
Loading…
Reference in New Issue
Block a user