2011-11-26 14:30:56 +00:00
|
|
|
{include file='documentHeader'}
|
|
|
|
|
|
|
|
<head>
|
2011-12-13 16:25:58 +00:00
|
|
|
<title>{$room} - {lang}wcf.chat.title{/lang} - {PAGE_TITLE|language}</title>
|
2011-11-26 14:30:56 +00:00
|
|
|
|
|
|
|
{include file='headInclude' sandbox=false}
|
2011-12-03 13:13:04 +00:00
|
|
|
<style type="text/css">
|
2012-02-05 16:21:43 +00:00
|
|
|
#timsChatCopyrightDialog {
|
2012-01-14 15:33:44 +00:00
|
|
|
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});
|
2012-01-15 20:14:48 +00:00
|
|
|
background-position: 15px center;
|
|
|
|
background-repeat: no-repeat;
|
2011-12-03 13:13:04 +00:00
|
|
|
}
|
|
|
|
|
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-03 13:13:04 +00:00
|
|
|
}
|
|
|
|
|
2011-12-13 21:42:28 +00:00
|
|
|
{assign var='type' value='\wcf\data\chat\message\ChatMessage::TYPE_'}
|
2012-04-15 11:12:14 +00:00
|
|
|
.timsChatMessage{$type|concat:'JOIN'|constant}, .timsChatMessage{$type|concat:'LEAVE'|constant},
|
|
|
|
.timsChatMessage{$type|concat:'INFORMATION'|constant}, .timsChatMessage{$type|concat:'ERROR'|constant} {
|
2011-12-13 21:42:28 +00:00
|
|
|
background-position: left top;
|
|
|
|
background-repeat: no-repeat;
|
2012-04-15 11:14:16 +00:00
|
|
|
background-size: 16px 16px;
|
2011-12-13 21:42:28 +00:00
|
|
|
}
|
|
|
|
|
2012-02-05 16:21:43 +00:00
|
|
|
.timsChatMessage{$type|concat:'JOIN'|constant} {
|
2012-05-21 10:27:26 +00:00
|
|
|
background-image: url({icon size='S'}circleArrowRight{/icon});
|
2011-12-13 21:42:28 +00:00
|
|
|
}
|
|
|
|
|
2012-02-05 16:21:43 +00:00
|
|
|
.timsChatMessage{$type|concat:'LEAVE'|constant} {
|
2012-05-21 10:27:26 +00:00
|
|
|
background-image: url({icon size='S'}circleArrowLeft{/icon});
|
2011-12-13 21:42:28 +00:00
|
|
|
}
|
|
|
|
|
2012-04-15 11:12:14 +00:00
|
|
|
.timsChatMessage{$type|concat:'INFORMATION'|constant} {
|
|
|
|
background-image: url({icon size='S'}systemInfo{/icon});
|
|
|
|
}
|
|
|
|
|
|
|
|
.timsChatMessage{$type|concat:'ERROR'|constant} {
|
|
|
|
background-image: url({icon size='S'}systemError{/icon});
|
|
|
|
}
|
|
|
|
|
2011-12-11 22:29:43 +00:00
|
|
|
.ajaxLoad {
|
2012-05-21 10:27:26 +00:00
|
|
|
background-image: url({icon size='S'}spinner{/icon});
|
2011-12-04 10:52:56 +00:00
|
|
|
}
|
2011-12-03 13:13:04 +00:00
|
|
|
</style>
|
2011-11-26 14:30:56 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body id="tpl{$templateName|ucfirst}">
|
2012-03-04 15:03:18 +00:00
|
|
|
{capture assign='sidebar'}{include file='chatSidebar'}{/capture}
|
|
|
|
{capture assign='headerNavigation'}{include file='chatNavigationInclude'}{/capture}
|
2012-01-09 16:50:39 +00:00
|
|
|
{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-06-29 19:50:03 +00:00
|
|
|
<div id="timsChatTopic" class="container"{if $room->topic|language === ''} style="display: none;"{/if}>{$room->topic|language}</div>
|
2012-05-19 20:00:44 +00:00
|
|
|
<fieldset>
|
2012-06-29 19:50:03 +00:00
|
|
|
<div class="timsChatMessageContainer container box shadow1">
|
2012-05-19 20:00:44 +00:00
|
|
|
<ul>
|
2012-06-28 16:31:42 +00:00
|
|
|
<li class="error">{lang}wcf.chat.noJs{/lang}</li>
|
2012-05-19 20:00:44 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2012-04-20 20:03:38 +00:00
|
|
|
</fieldset>
|
2011-12-11 22:29:43 +00:00
|
|
|
|
2012-10-15 10:08:57 +00:00
|
|
|
<form id="timsChatForm" action="{link controller='Chat' action='Send'}{/link}" method="post">
|
2012-08-08 14:12:51 +00:00
|
|
|
<input id="timsChatInput" accesskey="w" type="text" 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-07-14 13:04:53 +00:00
|
|
|
<div id="timsChatControls" class="marginTop">
|
2012-03-04 14:20:38 +00:00
|
|
|
{if MODULE_SMILEY}
|
2012-08-08 14:12:51 +00:00
|
|
|
{capture assign=__defaultSmilies}
|
|
|
|
{include file='__messageFormSmilies' smilies=$defaultSmilies}
|
|
|
|
{/capture}
|
|
|
|
|
2012-10-15 10:08:57 +00:00
|
|
|
<div id="smilies" class="smiliesContent tabMenuContent container {if $smileyCategories|count} tabMenuContainer{/if}" data-store="activeTabMenuItem" data-active="smilies-default">
|
2012-08-08 14:12:51 +00:00
|
|
|
{if $smileyCategories|count}
|
|
|
|
<nav class="menu">
|
|
|
|
<ul>
|
|
|
|
<li><a href="#smilies-default">{lang}wcf.smilies.default{/lang}</a></li>
|
|
|
|
{foreach from=$smileyCategories item=smileyCategory}
|
|
|
|
<li><a href="#smilies-{@$smileyCategory->smileyCategoryID}" data-smiley-category-id="{@$smileyCategory->smileyCategoryID}">{$smileyCategory->title|language}</a></li>
|
|
|
|
{/foreach}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<div id="smilies-default" class="hidden">
|
|
|
|
{@$__defaultSmilies}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{foreach from=$smileyCategories item='smileyCategory'}
|
|
|
|
<div id="smilies-{$smileyCategory->smileyCategoryID}" class="hidden"></div>
|
|
|
|
{/foreach}
|
|
|
|
{else}
|
|
|
|
{@$__defaultSmilies}
|
|
|
|
{/if}
|
2012-03-04 14:20:38 +00:00
|
|
|
</div>
|
|
|
|
{/if}
|
2012-02-06 17:35:09 +00:00
|
|
|
<nav id="timsChatOptions">
|
2012-04-14 22:21:33 +00:00
|
|
|
<ul class="smallButtons">
|
2012-02-06 17:35:09 +00:00
|
|
|
<li>
|
2012-08-08 14:12:51 +00:00
|
|
|
<a id="timsChatAutoscroll" accesskey="d" href="javascript:;" class="timsChatToggle jsTooltip 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-05-21 10:27:26 +00:00
|
|
|
<img alt="" src="{icon size='S'}enabled{/icon}" /> <span>{lang}wcf.chat.scroll{/lang}</span>
|
2012-02-06 17:35:09 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2012-06-13 16:14:32 +00:00
|
|
|
<li>
|
2012-08-08 14:12:51 +00:00
|
|
|
<a id="timsChatFullscreen" accesskey="f" href="javascript:;" class="timsChatToggle jsTooltip 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="0">
|
2012-06-16 18:17:47 +00:00
|
|
|
<img alt="" src="{icon size='S'}disabled{/icon}" /> <span>{lang}wcf.chat.fullscreen{/lang}</span>
|
2012-06-13 16:14:32 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2012-02-06 17:35:09 +00:00
|
|
|
<li>
|
2012-08-08 14:12:51 +00:00
|
|
|
<a id="timsChatNotify" accesskey="n" href="javascript:;" class="timsChatToggle jsTooltip 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-05-21 10:27:26 +00:00
|
|
|
<img alt="" src="{icon size='S'}disabled{/icon}" /> <span>{lang}wcf.chat.notify{/lang}</span>
|
2012-02-06 17:35:09 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2012-03-04 14:20:38 +00:00
|
|
|
<li{if !MODULE_SMILEY} style="display: none;"{/if}>
|
2012-08-08 14:12:51 +00:00
|
|
|
<a id="timsChatSmilies" accesskey="e" href="javascript:;" class="timsChatToggle jsTooltip 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-05-21 10:27:26 +00:00
|
|
|
<img alt="" src="{icon size='S'}enabled{/icon}" /> <span>{lang}wcf.chat.smilies{/lang}</span>
|
2012-02-06 17:35:09 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
2012-04-14 22:21:33 +00:00
|
|
|
<a id="timsChatClear" href="javascript:;" class="jsTooltip button" title="{lang}wcf.chat.clear.description{/lang}">
|
2012-05-21 10:27:26 +00:00
|
|
|
<img alt="" src="{icon size='S'}delete{/icon}" /> <span>{lang}wcf.chat.clear{/lang}</span>
|
2012-02-06 17:35:09 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
2012-04-14 22:21:33 +00:00
|
|
|
<a id="timsChatMark" href="javascript:;" class="jsTooltip button" title="{lang}wcf.chat.mark.description{/lang}">
|
2012-05-21 10:27:26 +00:00
|
|
|
<img alt="" src="{icon size='S'}check{/icon}" /> <span>{lang}wcf.chat.mark{/lang}</span>
|
2012-02-06 17:35:09 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2011-12-15 17:55:44 +00:00
|
|
|
</div>
|
2012-04-14 22:21:33 +00:00
|
|
|
{include file='chatCopyright'}
|
2011-12-03 13:13:04 +00:00
|
|
|
</div>
|
2012-01-21 16:45:53 +00:00
|
|
|
{include file='chatJavascriptInclude'}
|
2011-11-27 12:13:59 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
//<![CDATA[
|
2012-01-16 16:11:22 +00:00
|
|
|
(function ($, window) {
|
2012-06-28 16:31:42 +00:00
|
|
|
// remove noscript message
|
|
|
|
$('.timsChatMessageContainer .error').remove();
|
|
|
|
|
2012-01-21 16:45:53 +00:00
|
|
|
// populate templates
|
2012-03-12 16:18:15 +00:00
|
|
|
be.bastelstu.WCF.Chat.titleTemplate = (new WCF.Template('{ldelim}$title} - {'wcf.chat.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}')).compile();
|
2012-01-16 16:11:22 +00:00
|
|
|
{capture assign='chatMessageTemplate'}{include file='chatMessage'}{/capture}
|
2012-03-12 16:18:15 +00:00
|
|
|
be.bastelstu.WCF.Chat.messageTemplate = (new WCF.Template('{@$chatMessageTemplate|encodeJS}')).compile();
|
2012-01-21 16:45:53 +00:00
|
|
|
|
|
|
|
// populate config
|
2012-03-12 16:18:15 +00:00
|
|
|
be.bastelstu.WCF.Chat.config = {
|
2012-01-30 16:31:54 +00:00
|
|
|
reloadTime: {@CHAT_RELOADTIME},
|
2012-10-15 10:08:57 +00:00
|
|
|
unloadURL: '{link controller="Chat" action="Leave"}{/link}',
|
|
|
|
messageURL: '{link controller="Chat" action="Message"}{/link}',
|
2012-04-27 13:42:44 +00:00
|
|
|
socketIOPath: '{@CHAT_SOCKET_IO_PATH|encodeJS}'
|
2012-01-16 16:11:22 +00:00
|
|
|
}
|
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({
|
2012-05-21 10:27:26 +00:00
|
|
|
'be.bastelstu.wcf.chat.chat': '{icon size='L'}chat{/icon}'
|
2012-01-21 16:47:12 +00:00
|
|
|
});
|
2012-01-16 16:11:22 +00:00
|
|
|
{event name='shouldInit'}
|
2012-01-21 17:43:58 +00:00
|
|
|
// Boot the chat
|
2012-07-14 13:04:53 +00:00
|
|
|
WCF.TabMenu.init();
|
|
|
|
new WCF.Message.Smilies();
|
2012-03-12 16:18:15 +00:00
|
|
|
be.bastelstu.WCF.Chat.init();
|
2012-01-16 16:11:22 +00:00
|
|
|
{event name='didInit'}
|
2012-01-21 16:45:53 +00:00
|
|
|
|
|
|
|
// show the last X messages
|
2012-03-12 16:18:15 +00:00
|
|
|
be.bastelstu.WCF.Chat.handleMessages([
|
2012-01-16 16:11:22 +00:00
|
|
|
{implode from=$newestMessages item='message'}
|
|
|
|
{@$message->jsonify()}
|
|
|
|
{/implode}
|
|
|
|
]);
|
2012-01-21 16:45:53 +00:00
|
|
|
|
|
|
|
// enable user-interface
|
2012-02-05 16:21:43 +00:00
|
|
|
$('#timsChatInput').enable().jCounter().focus();
|
2012-04-14 22:21:33 +00:00
|
|
|
$('#timsChatCopyright').click(function (event) {
|
2012-01-16 16:11:22 +00:00
|
|
|
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}' });
|
2012-04-30 19:27:29 +00:00
|
|
|
var container = $('<fieldset id="timsChatCopyrightDialog"></fieldset>');
|
2012-01-16 16:11:22 +00:00
|
|
|
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}' });
|
2012-01-16 16:11:22 +00:00
|
|
|
});
|
2012-01-14 15:33:44 +00:00
|
|
|
});
|
2012-01-16 16:11:22 +00:00
|
|
|
})(jQuery, this)
|
2011-11-27 12:13:59 +00:00
|
|
|
//]]>
|
|
|
|
</script>
|
2011-11-26 14:30:56 +00:00
|
|
|
|
|
|
|
{include file='footer' sandbox=false}
|
|
|
|
</body>
|
2012-05-21 10:27:26 +00:00
|
|
|
</html>
|