1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-23 21:50:09 +00:00
Tims-Chat/template/chat.tpl

160 lines
6.5 KiB
Smarty
Raw Normal View History

{include file='documentHeader'}
<head>
2011-12-13 16:25:58 +00:00
<title>{$room} - {lang}wcf.chat.title{/lang} - {PAGE_TITLE|language}</title>
{include file='headInclude' sandbox=false}
<style type="text/css">
@import url("{@$__wcf->getPath('wcf')}style/be.bastelstu.chat.css");
2012-02-05 16:21:43 +00:00
#timsChatCopyrightDialog {
background-image: url("{link controller='Chat' action='Copyright' sheep=1}{/link}");
background-position: right 45px;
background-repeat: no-repeat;
min-height: 50%;
}
2012-02-05 16:21:43 +00:00
#timsChatUserList > li > a {
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}arrowRight{/icon});
background-position: 15px center;
background-repeat: no-repeat;
}
2012-02-05 16:21:43 +00:00
#timsChatUserList > li.activeMenuItem > a {
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}arrowDown{/icon});
}
2011-12-13 21:42:28 +00:00
{assign var='type' value='\wcf\data\chat\message\ChatMessage::TYPE_'}
2012-02-05 16:21:43 +00:00
.timsChatMessage{$type|concat:'JOIN'|constant}, .timsChatMessage{$type|concat:'LEAVE'|constant} {
2011-12-13 21:42:28 +00:00
background-position: left top;
background-repeat: no-repeat;
}
2012-02-05 16:21:43 +00:00
.timsChatMessage{$type|concat:'JOIN'|constant} {
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}toRight1{/icon});
}
2012-02-05 16:21:43 +00:00
.timsChatMessage{$type|concat:'LEAVE'|constant} {
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}toLeft1{/icon});
}
2011-12-11 22:29:43 +00:00
.ajaxLoad {
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}spinner1{/icon});
2011-12-04 10:52:56 +00:00
}
</style>
</head>
<body id="tpl{$templateName|ucfirst}">
{capture assign='sidebar'}{include file='chatSidebar'}{/capture}
{capture assign='headerNavigation'}{include file='chatNavigationInclude'}{/capture}
{include file='header' sandbox=false sidebarOrientation='right'}
2011-12-15 20:57:20 +00:00
2012-02-05 16:21:43 +00:00
<div id="timsChatRoomContent">
2012-03-07 18:39:56 +00:00
<div id="timsChatTopic" class="wcf-box wcf-marginBottom"{if $room->topic|language === ''} style="display: none;"{/if}>{$room->topic|language}</div>
<div class="timsChatMessageContainer wcf-box wcf-shadow1 wcf-boxPadding">
<ul>
2012-02-06 17:35:09 +00:00
<noscript><li class="wcf-error">{lang}wcf.chat.noJs{/lang}</li></noscript>
</ul>
2011-12-15 17:55:44 +00:00
</div>
2011-12-11 22:29:43 +00:00
2012-02-05 16:21:43 +00:00
<form id="timsChatForm" action="{link controller="Chat" action="Send"}{/link}" method="post">
<input type="text" id="timsChatInput" class="inputText long" name="text" autocomplete="off" maxlength="{@CHAT_MAX_LENGTH}" disabled="disabled" required="required" placeholder="{lang}wcf.chat.submit.default{/lang}" />
2011-12-15 17:55:44 +00:00
</form>
2012-03-07 18:39:56 +00:00
<div id="timsChatControls" class="wcf-box wcf-marginTop">
2012-03-04 14:20:38 +00:00
{if MODULE_SMILEY}
<div id="smileyList">
<ul class="smilies">
{foreach from=$smilies item='smiley'}
<li>
<img src="{$smiley->getURL()}" alt="{$smiley->smileyCode}" title="{$smiley->smileyTitle}" class="jsSmiley jsTooltip" />
</li>
{/foreach}
</ul>
</div>
{/if}
2012-02-06 17:35:09 +00:00
<nav id="timsChatOptions">
<ul class="wcf-smallButtons">
<li>
2012-02-11 18:33:14 +00:00
<a id="timsChatAutoscroll" href="javascript:;" class="timsChatToggle jsTooltip wcf-button" 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">
2012-02-06 17:35:09 +00:00
<img alt="" src="{icon size='S'}enabled1{/icon}" /> <span>{lang}wcf.chat.scroll{/lang}</span>
</a>
</li>
<li>
2012-02-11 18:33:14 +00:00
<a id="timsChatNotify" href="javascript:;" class="timsChatToggle jsTooltip wcf-button" 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">
2012-02-06 17:35:09 +00:00
<img alt="" src="{icon size='S'}disabled1{/icon}" /> <span>{lang}wcf.chat.notify{/lang}</span>
</a>
</li>
2012-03-04 14:20:38 +00:00
<li{if !MODULE_SMILEY} style="display: none;"{/if}>
2012-02-11 18:33:14 +00:00
<a id="timsChatSmilies" href="javascript:;" class="timsChatToggle jsTooltip wcf-button" 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">
2012-02-06 17:35:09 +00:00
<img alt="" src="{icon size='S'}enabled1{/icon}" /> <span>{lang}wcf.chat.smilies{/lang}</span>
</a>
</li>
<li>
2012-02-11 18:33:14 +00:00
<a id="timsChatClear" href="javascript:;" class="jsTooltip wcf-button" title="{lang}wcf.chat.clear.description{/lang}">
2012-02-06 17:35:09 +00:00
<img alt="" src="{icon size='S'}delete1{/icon}" /> <span>{lang}wcf.chat.clear{/lang}</span>
</a>
</li>
<li>
2012-02-11 18:33:14 +00:00
<a id="timsChatMark" href="javascript:;" class="jsTooltip wcf-button" title="{lang}wcf.chat.mark.description{/lang}">
2012-02-06 17:35:09 +00:00
<img alt="" src="{icon size='S'}check1{/icon}" /> <span>{lang}wcf.chat.mark{/lang}</span>
</a>
</li>
</ul>
</nav>
{include file='chatCopyright'}
2011-12-15 17:55:44 +00:00
</div>
</div>
{include file='chatJavascriptInclude'}
<script type="text/javascript">
//<![CDATA[
(function ($, window) {
// populate templates
be.bastelstu.WCF.Chat.titleTemplate = (new WCF.Template('{ldelim}$title} - {'wcf.chat.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}')).compile();
{capture assign='chatMessageTemplate'}{include file='chatMessage'}{/capture}
be.bastelstu.WCF.Chat.messageTemplate = (new WCF.Template('{@$chatMessageTemplate|encodeJS}')).compile();
// populate config
be.bastelstu.WCF.Chat.config = {
reloadTime: {@CHAT_RELOADTIME},
unloadURL: '{link controller='Chat' action='Leave'}{/link}'
}
2012-01-21 16:47:12 +00:00
WCF.Language.addObject({
2012-01-21 17:43:58 +00:00
'wcf.chat.query': '{lang}wcf.chat.query{/lang}',
'wcf.chat.kick': '{lang}wcf.chat.kick{/lang}',
'wcf.chat.ban': '{lang}wcf.chat.ban{/lang}',
'wcf.chat.profile': '{lang}wcf.chat.profile{/lang}',
'wcf.chat.newMessages': '{lang}wcf.chat.newMessages{/lang}'
});
WCF.Icon.addObject({
'be.bastelstu.wcf.chat.chat': '{icon size='L'}chat1{/icon}'
2012-01-21 16:47:12 +00:00
});
{event name='shouldInit'}
2012-01-21 17:43:58 +00:00
// Boot the chat
be.bastelstu.WCF.Chat.init();
{event name='didInit'}
// show the last X messages
be.bastelstu.WCF.Chat.handleMessages([
{implode from=$newestMessages item='message'}
{@$message->jsonify()}
{/implode}
]);
// enable user-interface
2012-02-05 16:21:43 +00:00
$('#timsChatInput').enable().jCounter().focus();
$('#timsChatControls .copyright').click(function (event) {
event.preventDefault();
2012-02-05 16:21:43 +00:00
if ($.wcfIsset('timsChatCopyrightDialog')) return WCF.showDialog('timsChatCopyrightDialog', { title: 'Tims Chat{if CHAT_SHOW_VERSION} {$chatVersion}{/if}' });
var container = $('<div id="timsChatCopyrightDialog"></div>');
container.load('{link controller='Chat' action='Copyright'}{/link}', function() {
$('body').append(container);
2012-02-05 16:21:43 +00:00
WCF.showDialog('timsChatCopyrightDialog', { title: 'Tims Chat{if CHAT_SHOW_VERSION} {$chatVersion}{/if}' });
});
});
})(jQuery, this)
//]]>
</script>
{include file='footer' sandbox=false}
</body>
</html>