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 20:54:37 +00:00
|
|
|
@import url("{@$__wcf->getPath('wcf')}style/timwolla.wcf.chat.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-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
|
|
|
}
|
2012-02-05 16:21:43 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* jCounter CSS
|
|
|
|
*
|
|
|
|
* TODO: Seperate jCounter completely from Tims-Chat
|
|
|
|
*/
|
|
|
|
.jsCounterContainer {
|
2011-12-18 14:46:16 +00:00
|
|
|
display: table;
|
|
|
|
}
|
|
|
|
|
2012-02-05 16:21:43 +00:00
|
|
|
.jsCounterContainer > div {
|
2011-12-18 14:46:16 +00:00
|
|
|
display: table-row;
|
|
|
|
}
|
|
|
|
|
2012-02-05 16:21:43 +00:00
|
|
|
.jsCounterInput {
|
2011-12-18 14:46:16 +00:00
|
|
|
height: 16px;
|
|
|
|
}
|
|
|
|
|
2012-02-05 16:21:43 +00:00
|
|
|
.jsCounterInput, .jsCounter {
|
2011-12-18 14:46:16 +00:00
|
|
|
display: table-cell;
|
|
|
|
}
|
|
|
|
|
2012-02-05 16:21:43 +00:00
|
|
|
.jsCounterInput, .jsCounterContainer {
|
2011-12-18 14:46:16 +00:00
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2012-02-05 16:21:43 +00:00
|
|
|
.jsCounter {
|
2011-12-18 14:49:17 +00:00
|
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
|
|
padding: 0 5px 0 10px;
|
2011-12-18 14:33:47 +00:00
|
|
|
position: relative;
|
|
|
|
z-index: 0 !important;
|
|
|
|
border-radius: 0px 5px 5px 0px;
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
2011-12-18 14:49:17 +00:00
|
|
|
width: 30px;
|
2011-12-17 20:29:57 +00:00
|
|
|
}
|
|
|
|
|
2012-02-05 16:21:43 +00:00
|
|
|
.jsCounter.color-1 {
|
2011-12-17 20:29:57 +00:00
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
2012-02-05 16:21:43 +00:00
|
|
|
.jsCounter.color-2 {
|
2011-12-18 14:46:16 +00:00
|
|
|
color: rgba(255,255,255,0.5);
|
2011-12-17 20:29:57 +00:00
|
|
|
}
|
2012-02-05 16:21:43 +00:00
|
|
|
.jsCounter.color-3 {
|
2011-12-17 20:29:57 +00:00
|
|
|
color: #D40D12;
|
|
|
|
}
|
2011-12-03 13:13:04 +00:00
|
|
|
</style>
|
2011-11-26 14:30:56 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body id="tpl{$templateName|ucfirst}">
|
2011-12-18 15:47:50 +00:00
|
|
|
{capture assign='sidebar'}
|
2012-02-06 17:35:09 +00:00
|
|
|
<div id="sidebarContent" class="wcf-sidebarContent">
|
2012-02-05 16:21:43 +00:00
|
|
|
<nav class="timsChatSidebarTabs">
|
2011-12-18 16:03:00 +00:00
|
|
|
<ul>
|
2012-02-09 20:19:48 +00:00
|
|
|
<li id="toggleUsers" class="active"><a href="javascript:;" title="{lang}wcf.chat.users{/lang}">{lang}wcf.chat.users{/lang} <span class="wcf-badge">0</span></a></li>
|
|
|
|
<li id="toggleRooms"><a href="javascript:;" title="{lang}wcf.chat.rooms{/lang}" data-refresh-url="{link controller="Chat" action="RefreshRoomList"}{/link}">{lang}wcf.chat.rooms{/lang} <span class="wcf-badge">{#$rooms|count}</span></a></li>
|
2011-12-18 16:03:00 +00:00
|
|
|
</ul>
|
2011-12-18 15:47:50 +00:00
|
|
|
</nav>
|
2011-12-18 16:03:00 +00:00
|
|
|
|
|
|
|
<div id="sidebarContainer">
|
2012-02-05 16:21:43 +00:00
|
|
|
<ul id="timsChatUserList">
|
2011-12-18 16:03:00 +00:00
|
|
|
</ul>
|
2012-02-06 17:35:09 +00:00
|
|
|
<nav id="timsChatRoomList" class="wcf-sidebarMenu" style="display: none;">
|
2011-12-18 16:03:00 +00:00
|
|
|
<div>
|
|
|
|
<ul>
|
|
|
|
{foreach from=$rooms item='roomListRoom'}
|
2011-12-26 11:46:33 +00:00
|
|
|
{if $roomListRoom->canEnter()}
|
|
|
|
<li{if $roomListRoom->roomID == $room->roomID} class="activeMenuItem"{/if}>
|
2012-02-05 16:21:43 +00:00
|
|
|
<a href="{link controller='Chat' object=$roomListRoom}{/link}" class="timsChatRoom">{$roomListRoom}</a>
|
2011-12-26 11:46:33 +00:00
|
|
|
</li>
|
|
|
|
{/if}
|
2011-12-18 16:03:00 +00:00
|
|
|
{/foreach}
|
|
|
|
</ul>
|
2012-01-28 15:43:48 +00:00
|
|
|
<div style="text-align: center;"><button type="button">Force Refresh</button></div>
|
2011-12-18 16:03:00 +00:00
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</div>
|
2011-12-18 15:47:50 +00:00
|
|
|
</div>
|
|
|
|
{/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-02-06 17:35:09 +00:00
|
|
|
<div id="timsChatTopic" class="wcf-border"{if $room->topic|language === ''} style="display: none;"{/if}>{$room->topic|language}</div>
|
|
|
|
<div class="timsChatMessageContainer wcf-border wcf-content">
|
2011-12-27 11:25:20 +00:00
|
|
|
<ul>
|
2012-02-06 17:35:09 +00:00
|
|
|
<noscript><li class="wcf-error">{lang}wcf.chat.noJs{/lang}</li></noscript>
|
2011-12-27 11:25:20 +00:00
|
|
|
</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">
|
2012-02-06 17:35:09 +00:00
|
|
|
<input type="text" id="timsChatInput" class="inputText long jsCounterInput" name="text" autocomplete="off" maxlength="{@CHAT_LENGTH}" disabled="disabled" required="required" placeholder="{lang}wcf.chat.submit.default{/lang}" />
|
2011-12-15 17:55:44 +00:00
|
|
|
</form>
|
|
|
|
|
2012-02-06 17:35:09 +00:00
|
|
|
<div id="timsChatControls" class="wcf-border">
|
|
|
|
<div id="smileyList">
|
2011-12-15 17:55:44 +00:00
|
|
|
<ul class="smilies">
|
|
|
|
{foreach from=$smilies item='smiley'}
|
|
|
|
<li>
|
2012-02-12 11:30:51 +00:00
|
|
|
<img src="{$smiley->getURL()}" alt="{$smiley->smileyCode}" title="{$smiley->smileyCode}" class="jsSmiley" />
|
2011-12-13 16:22:54 +00:00
|
|
|
</li>
|
|
|
|
{/foreach}
|
2011-12-15 17:55:44 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
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>
|
|
|
|
<li>
|
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>
|
2012-01-14 15:33:44 +00:00
|
|
|
{include file='chatCopyright'}
|
2011-12-15 17:55:44 +00:00
|
|
|
</div>
|
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-01-21 16:45:53 +00:00
|
|
|
// populate templates
|
2012-01-30 16:05:35 +00:00
|
|
|
TimWolla.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-01-30 16:05:35 +00:00
|
|
|
TimWolla.WCF.Chat.messageTemplate = (new WCF.Template('{@$chatMessageTemplate|encodeJS}')).compile();
|
2012-01-21 16:45:53 +00:00
|
|
|
|
|
|
|
// populate config
|
|
|
|
TimWolla.WCF.Chat.config = {
|
2012-01-30 16:31:54 +00:00
|
|
|
reloadTime: {@CHAT_RELOADTIME},
|
2012-02-18 16:35:33 +00:00
|
|
|
unloadURL: '{link controller='Chat' action='Leave'}{/link}'
|
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({
|
|
|
|
'timwolla.wcf.chat.chat': '{icon size='L'}chat1{/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-01-16 16:11:22 +00:00
|
|
|
TimWolla.WCF.Chat.init();
|
|
|
|
{event name='didInit'}
|
2012-01-21 16:45:53 +00:00
|
|
|
|
|
|
|
// show the last X messages
|
2012-01-16 16:11:22 +00:00
|
|
|
TimWolla.WCF.Chat.handleMessages([
|
|
|
|
{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();
|
|
|
|
$('#timsChatControls .copyright').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}' });
|
|
|
|
var container = $('<div id="timsChatCopyrightDialog"></div>');
|
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-01-30 16:31:54 +00:00
|
|
|
</html>
|