1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00
Tims-Chat/template/chat.tpl

400 lines
9.9 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">
2011-12-11 22:29:43 +00:00
#chatBox {
2011-12-05 16:12:30 +00:00
padding: 0;
}
2011-12-11 22:29:43 +00:00
#chatBox > div {
text-align: center;
}
2011-12-11 22:29:43 +00:00
#chatBox aside, #chatRoomContent {
text-align: left;
}
2011-12-17 17:40:17 +00:00
.sidebar {
margin-bottom: -20px !important;
}
2011-12-23 13:22:34 +00:00
.left aside {
2011-12-11 22:29:43 +00:00
overflow: auto;
padding: 0 1px 0 0;
2011-12-23 13:22:34 +00:00
}
.right aside {
overflow: auto;
padding: 0 0 1px 0;
}
2011-12-15 17:55:44 +00:00
aside h2 {
margin: auto;
text-align: center;
2011-12-11 22:29:43 +00:00
font-size: 130%;
color: #336699;
cursor: default;
font-weight: bold;
margin-top: 5px;
}
2011-12-15 17:55:44 +00:00
aside ul li a {
2011-12-11 22:29:43 +00:00
color: #6699CC;
display: block;
padding: 5px 25px 7px 35px;
text-shadow: 0 1px 0 #FFFFFF;
}
2011-12-11 22:29:43 +00:00
#topic, #smileyList, #chatOptions {
padding: 5px;
}
2011-12-05 20:17:01 +00:00
2011-12-12 14:52:36 +00:00
.chatMessageContainer {
2011-12-13 20:10:10 +00:00
height: 200px;
2011-12-11 22:29:43 +00:00
overflow-y: scroll;
2011-12-05 20:17:01 +00:00
}
2011-12-11 22:29:43 +00:00
#smileyList .smilies li, .smallButtons li {
display: inline;
margin-right: 5px;
margin-top: 5px;
2011-12-05 20:17:01 +00:00
}
2011-12-11 22:29:43 +00:00
#chatForm {
margin-top: 15px;
white-space: nowrap;
margin-top: 10px;
2011-12-15 20:45:37 +00:00
/* Fix to align chatInput in center */
text-align: center;
}
2011-12-17 17:40:17 +00:00
#chatInput {
position: relative;
2011-12-18 14:33:47 +00:00
z-index: 10;
2011-12-17 17:40:17 +00:00
}
2011-12-11 22:29:43 +00:00
#chatOptions {
display: inline-block;
}
2011-12-15 17:55:44 +00:00
#chatUserList > li > .bgFix 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;
background-size: 16px auto;
}
2011-12-15 17:55:44 +00:00
#chatUserList > li.activeMenuItem > .bgFix a {
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}arrowDown{/icon});
}
2011-12-15 17:55:44 +00:00
#chatUserList .chatUserMenu li a {
2011-12-11 22:29:43 +00:00
margin-left: 30px !important;
}
2011-12-15 17:55:44 +00:00
#chatUserList .chatUserMenu {
2011-12-11 22:29:43 +00:00
display: none;
}
2011-12-15 17:55:44 +00:00
#chatUserList > li a {
2011-12-11 22:29:43 +00:00
margin-left: 20px;
}
2011-12-11 22:29:43 +00:00
.chatMessage time, .chatMessage time::before, .chatMessage time::after {
font-size: .8em;
}
2011-12-11 22:29:43 +00:00
.chatMessage time::before {
content: "[";
}
2011-12-03 23:50:04 +00:00
2011-12-11 22:29:43 +00:00
.chatMessage time::after {
content: "]";
2011-12-04 10:52:56 +00:00
}
2011-12-13 21:42:28 +00:00
.chatMessage {
padding-left: 16px;
min-height: 16px;
}
{assign var='type' value='\wcf\data\chat\message\ChatMessage::TYPE_'}
.chatMessage{$type|concat:'JOIN'|constant}, .chatMessage{$type|concat:'LEAVE'|constant} {
background-position: left top;
background-repeat: no-repeat;
}
.chatMessage{$type|concat:'JOIN'|constant} {
background-image: url({icon size='S'}toRight1{/icon});
}
.chatMessage{$type|concat:'LEAVE'|constant} {
background-image: url({icon size='S'}toLeft1{/icon});
}
2011-12-20 20:20:32 +00:00
.chatMessageContainer {
padding-left: 7px !important;
}
2011-12-11 22:29:43 +00:00
.ajaxLoad {
background-position: right center;
background-repeat: no-repeat;
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}spinner1{/icon});
2011-12-04 10:52:56 +00:00
}
2011-12-11 22:29:43 +00:00
.bgFix {
display: block;
2011-12-03 23:50:04 +00:00
}
2011-12-17 17:40:17 +00:00
.chatSidebarTabs {
2011-12-23 13:22:34 +00:00
height: 32px;
z-index: 101;
position: relative;
}
.left .chatSidebarTabs {
margin-right: 1px;
}
.right .chatSidebarTabs {
margin-left: 1px;
2011-12-17 17:40:17 +00:00
}
2011-12-23 13:22:34 +00:00
.chatSidebarTabs ul {
background-color: rgba(0, 0, 0, 0.2);
border-bottom: 1px solid #FFFFFF;
height: 31px;
}
2011-12-17 17:40:17 +00:00
.chatSidebarTabs ul li {
width: 50%;
float: left;
text-align: center;
}
.chatSidebarTabs ul li a {
2011-12-22 21:36:48 +00:00
color: rgba(0, 0, 0, 0.4);
text-shadow: none;
2011-12-23 13:22:34 +00:00
height: 22px;
padding: 9px 0 0;
2011-12-22 20:45:09 +00:00
2011-12-23 13:22:34 +00:00
-moz-transition-property: border-radius, background-color, font-size; -moz-transition-duration: .2s;
-webkit-transition-property: border-radius, background-color, font-size; -webkit-transition-duration: .2s;
transition-property: border-radius, background-color, font-size; transition-duration: .2s;
2011-12-17 17:40:17 +00:00
}
.chatSidebarTabs ul li.active a {
2011-12-22 20:45:09 +00:00
background-color: #FFFFFF;
border-bottom: 1px solid #BBCCDD;
border-radius: 0 0 7px 7px;
color: #000000;
2011-12-17 17:40:17 +00:00
font-size: 130%;
font-weight: bold;
2011-12-23 13:22:34 +00:00
2011-12-22 20:45:09 +00:00
height: 23px;
padding: 7px 0 0;
}
2011-12-23 13:22:34 +00:00
.collapsed .chatSidebarTabs ul li a {
border: none !important;
}
2011-12-22 20:45:09 +00:00
.chatSidebarTabs ul li:first-child.active a {
border-radius: 0 0 7px 0;
2011-12-23 13:22:34 +00:00
border-right: 1px solid #BBCCDD;
2011-12-22 20:45:09 +00:00
}
.chatSidebarTabs ul li:last-child.active a {
border-radius: 0 0 0 7px;
2011-12-23 13:22:34 +00:00
border-left: 1px solid #BBCCDD;
}
.left .chatSidebarTabs ul li:last-child.active a {
margin-right: -1px;
}
.right .chatSidebarTabs ul li:first-child.active a {
margin-left: -1px;
2011-12-17 17:40:17 +00:00
}
#chatRoomList {
margin-top: 5px;
}
#sidebarContainer {
overflow-y: auto;
height: 420px;
width: 100%;
}
.hidden {
display: none;
}
2011-12-18 14:46:16 +00:00
.counterContainer {
display: table;
}
.counterContainer > div {
display: table-row;
}
.counterInput {
height: 16px;
}
.counterInput, .counter {
display: table-cell;
}
.counterInput, .counterContainer {
width: 100%;
}
.counter {
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);
width: 30px;
}
2011-12-18 14:46:16 +00:00
.counter.color-1 {
color: #FFFFFF;
}
2011-12-18 14:46:16 +00:00
.counter.color-2 {
color: rgba(255,255,255,0.5);
}
2011-12-18 14:46:16 +00:00
.counter.color-3 {
color: #D40D12;
}
</style>
</head>
<body id="tpl{$templateName|ucfirst}">
2011-12-18 15:47:50 +00:00
{capture assign='sidebar'}
<div id="sidebarMenu">
2011-12-18 16:03:00 +00:00
<nav class="chatSidebarTabs">
<ul>
<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}</a></li>
2011-12-23 13:22:34 +00:00
<li id="toggleUsers" class="active"><a href="javascript:;" title="{lang}wcf.chat.users{/lang}">{lang}wcf.chat.users{/lang}</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">
<ul id="chatUserList">
{section name=user start=1 loop=26}
<li id="user-{$user}" class="chatUser">
<span class="bgFix"><a class="chatUserLink" href="javascript:;">User {$user}</a></span>
<ul class="chatUserMenu">
<li>
<a href="javascript:;">{lang}wcf.chat.query{/lang}</a>
<a href="javascript:;">{lang}wcf.chat.kick{/lang}</a>
<a href="javascript:;">{lang}wcf.chat.ban{/lang}</a>
<a href="{link controller="User" id=$user}{/link}">{lang}wcf.chat.profile{/lang}</a>
2011-12-18 16:03:00 +00:00
</li>
</ul>
</li>
{/section}
</ul>
<nav id="chatRoomList" class="sidebarMenu hidden">
<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}>
<a href="{link controller='Chat' object=$roomListRoom}{/link}" class="chatRoom">{$roomListRoom}</a>
</li>
{/if}
2011-12-18 16:03:00 +00:00
{/foreach}
</ul>
</div>
</nav>
</div>
2011-12-18 15:47:50 +00:00
</div>
{/capture}
{include file='header' sandbox=false sidebarDirection='left'}
2011-12-15 20:57:20 +00:00
2011-12-15 17:55:44 +00:00
<div id="chatRoomContent">
<div id="topic" class="border"{if $room->topic|language === ''} style="display: none;"{/if}>{$room->topic|language}</div>
<div class="chatMessageContainer border content">
<ul></ul>
</div>
2011-12-11 22:29:43 +00:00
2011-12-15 17:55:44 +00:00
<form id="chatForm" action="{link controller="Chat" action="Send"}{/link}" method="post">
2011-12-20 15:39:43 +00:00
<input type="text" id="chatInput" class="inputText long counterInput" name="text" autocomplete="off" maxlength="{CHAT_LENGTH}" required="required" placeholder="{lang}wcf.chat.submit.default{/lang}" />
2011-12-15 17:55:44 +00:00
</form>
<div id="chatControls">
<div id="smileyList" class="border">
<ul class="smilies">
{foreach from=$smilies item='smiley'}
<li>
<img src="{$smiley->getURL()}" alt="{$smiley->smileyCode}" title="{$smiley->smileyCode}" class="smiley" />
2011-12-13 16:22:54 +00:00
</li>
{/foreach}
2011-12-15 17:55:44 +00:00
</ul>
</div>
<div id="chatOptions" class="border">
<div class="smallButtons">
2011-12-11 22:29:43 +00:00
<ul>
2011-12-15 17:55:44 +00:00
<li>
2011-12-15 21:54:49 +00:00
<a id="chatAutoscroll" href="javascript:;" class="chatToggle balloonTooltip" 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">
<img alt="" src="{icon}enabled1{/icon}" /> <span>{lang}wcf.chat.scroll{/lang}</span>
2011-12-15 17:55:44 +00:00
</a>
</li>
<li>
2011-12-15 21:54:49 +00:00
<a id="chatNotify" href="javascript:;" class="chatToggle balloonTooltip" 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">
<img alt="" src="{icon}disabled1{/icon}" /> <span>{lang}wcf.chat.notify{/lang}</span>
2011-12-15 17:55:44 +00:00
</a>
</li>
2011-12-20 20:20:32 +00:00
<li>
2011-12-22 16:03:51 +00:00
<a id="chatSmilies" href="javascript:;" class="chatToggle balloonTooltip" 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">
2011-12-20 20:20:32 +00:00
<img alt="" src="{icon}enabled1{/icon}" /> <span>{lang}wcf.chat.smilies{/lang}</span>
</a>
</li>
2011-12-15 17:55:44 +00:00
<li>
2011-12-15 21:54:49 +00:00
<a id="chatClear" href="javascript:;" class="balloonTooltip" title="Clear the chat">
<img alt="" src="{icon}delete1{/icon}" /> <span>{lang}wcf.chat.clear{/lang}</span>
2011-12-15 17:55:44 +00:00
</a>
2011-12-11 22:29:43 +00:00
</li>
2011-12-15 17:55:44 +00:00
<li>
2011-12-15 21:54:49 +00:00
<a id="chatMark" href="javascript:;" class="balloonTooltip" title="Show checkboxes">
<img alt="" src="{icon}check1{/icon}" /> <span>{lang}wcf.chat.mark{/lang}</span>
2011-12-15 17:55:44 +00:00
</a>
</li>
2011-12-11 22:29:43 +00:00
</ul>
</div>
</div>
2011-12-15 17:55:44 +00:00
</div>
</div>
<script type="text/javascript">
//<![CDATA[
2011-12-03 17:07:57 +00:00
TimWolla.WCF.Chat.titleTemplate = new WCF.Template('{ldelim}$title} - {'wcf.chat.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}');
2011-12-04 22:12:12 +00:00
{capture assign='chatMessageTemplate'}{include file='chatMessage'}{/capture}
2011-12-05 14:40:30 +00:00
TimWolla.WCF.Chat.messageTemplate = new WCF.Template('{@$chatMessageTemplate|encodeJS}');
2011-12-04 21:50:17 +00:00
TimWolla.WCF.Chat.init({$room->roomID}, 1);
TimWolla.WCF.Chat.handleMessages([
{implode from=$newestMessages item='message'}
{@$message->jsonify()}
{/implode}
]);
TimWolla.WCF.Chat.config = {
2011-12-26 11:46:33 +00:00
reloadTime: {CHAT_RELOADTIME},
animations: {CHAT_ANIMATIONS},
maxTextLength: {CHAT_LENGTH}
}
2011-12-20 15:39:43 +00:00
$('#chatInput').jCounter();
//]]>
</script>
{include file='footer' sandbox=false}
</body>
</html>