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

Adding Badges for Sidebar-Tabs

This commit is contained in:
Tim Düsterhus 2012-01-07 16:45:14 +01:00
parent 8405a4f31b
commit 99f95ed907
2 changed files with 5 additions and 3 deletions

View File

@ -220,6 +220,8 @@ TimWolla.WCF ?= {}
success: $.proxy((data, textStatus, jqXHR) -> success: $.proxy((data, textStatus, jqXHR) ->
$('#chatRoomList li').remove() $('#chatRoomList li').remove()
$('#toggleRooms a').removeClass 'ajaxLoad' $('#toggleRooms a').removeClass 'ajaxLoad'
$('#toggleRooms .badge').text(data.length);
for room in data for room in data
li = $ '<li></li>' li = $ '<li></li>'
li.addClass 'activeMenuItem' if room.active li.addClass 'activeMenuItem' if room.active

View File

@ -79,8 +79,8 @@
<div id="sidebarMenu"> <div id="sidebarMenu">
<nav class="chatSidebarTabs"> <nav class="chatSidebarTabs">
<ul> <ul>
<li id="toggleUsers" class="active"><a href="javascript:;" title="{lang}wcf.chat.users{/lang}">{lang}wcf.chat.users{/lang}</a></li> <li id="toggleUsers" class="active"><a href="javascript:;" title="{lang}wcf.chat.users{/lang}">{lang}wcf.chat.users{/lang} <span class="badge">25</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}</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="badge">{#$rooms|count}</span></a></li>
</ul> </ul>
</nav> </nav>