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

Merge branch 'master' of github.com:wbbaddons/Tims-Chat

This commit is contained in:
Tim Düsterhus 2012-01-16 14:36:39 +01:00
commit 0c3fc4e474
3 changed files with 52 additions and 12 deletions

View File

@ -211,10 +211,10 @@ TimWolla.WCF ?= {}
li.append a
menu = $ '<ul></ul>'
menu.addClass 'chatUserMenu'
menu.append $ '<li><a href="javascript:;">{lang}wcf.chat.query{/lang}</a></li>'
menu.append $ '<li><a href="javascript:;">{lang}wcf.chat.kick{/lang}</a></li>'
menu.append $ '<li><a href="javascript:;">{lang}wcf.chat.ban{/lang}</a></li>'
menu.append $ '<li><a href="index.php/User/'+user.userID+'">{lang}wcf.chat.profile{/lang}</a></li>'
menu.append $ '<li><a href="javascript:;">' + WCF.Language.get('wcf.chat.query') + '</a></li>'
menu.append $ '<li><a href="javascript:;">' + WCF.Language.get('wcf.chat.kick') + '</a></li>'
menu.append $ '<li><a href="javascript:;">' + WCF.Language.get('wcf.chat.ban') + '</a></li>'
menu.append $ '<li><a href="index.php/User/' + user.userID + '">' + WCF.Language.get('wcf.chat.profile') + '</a></li>'
@events.userMenu.fire user, menu
li.append menu
li.appendTo $ '#chatUserList'
@ -306,15 +306,15 @@ TimWolla.WCF ?= {}
# @param jQuery-object target
###
toggleSidebarContents: (target) ->
return if target.parent().hasClass 'active'
return if target.parents('li').hasClass 'active'
if target.parent().attr('id') is 'toggleUsers'
if target.parents('li').attr('id') is 'toggleUsers'
$('#toggleUsers').addClass 'active'
$('#toggleRooms').removeClass 'active'
$('#chatRoomList').hide()
$('#chatUserList').show()
else if target.parent().attr('id') is 'toggleRooms'
else if target.parents('li').attr('id') is 'toggleRooms'
$('#toggleRooms').addClass 'active'
$('#toggleUsers').removeClass 'active'

View File

@ -209,4 +209,38 @@ #sidebarContainer {
overflow-y: auto;
height: 420px;
width: 100%;
}
}
#sidebarContainer a {
outline: none;
}
#chatCopyright {
bottom: 5px;
position: absolute;
}
.sidebarContent {
> div {
ul {
> li {
margin-top: 5px;
background-color: transparent !important;
box-shadow: none !important;
}
}
}
}
.sidebarContent {
> div {
ul {
> li.activeMenuItem {
> a {
background-color: #FFFFFF;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
}
}
}
}

14
template/chat.tpl Normal file → Executable file
View File

@ -12,11 +12,13 @@
background-repeat: no-repeat;
min-height: 50%;
}
#chatUserList > li > .bgFix a {
#chatUserList > li > a {
background-image: url({icon size='S'}arrowRight{/icon});
background-position: 15px center;
background-repeat: no-repeat;
}
#chatUserList > li.activeMenuItem > .bgFix a {
#chatUserList > li.activeMenuItem > a {
background-image: url({icon size='S'}arrowDown{/icon});
}
@ -82,7 +84,7 @@
<body id="tpl{$templateName|ucfirst}">
{capture assign='sidebar'}
<div id="sidebarContent">
<div id="sidebarContent" class="sidebarContent">
<nav class="chatSidebarTabs">
<ul>
<li id="toggleUsers" class="active"><a href="javascript:;" title="{lang}wcf.chat.users{/lang}">{lang}wcf.chat.users{/lang} <span class="badge">0</span></a></li>
@ -191,6 +193,10 @@
animations: {CHAT_ANIMATIONS},
maxTextLength: {CHAT_LENGTH}
}
WCF.Language.add('wcf.chat.query', '{lang}wcf.chat.query{/lang}');
WCF.Language.add('wcf.chat.kick', '{lang}wcf.chat.kick{/lang}');
WCF.Language.add('wcf.chat.ban', '{lang}wcf.chat.ban{/lang}');
WCF.Language.add('wcf.chat.profile', '{lang}wcf.chat.profile{/lang}');
{event name='shouldInit'}
TimWolla.WCF.Chat.init();
{event name='didInit'}
@ -214,4 +220,4 @@
{include file='footer' sandbox=false}
</body>
</html>
</html>