From 9689d3b3977e4635e1269c72e5e33ec80d968bf6 Mon Sep 17 00:00:00 2001 From: max-m Date: Sun, 15 Jan 2012 21:14:48 +0100 Subject: [PATCH] Fixed CSS, add and use language vars via WCF.Language, tabs change when clicking on badges too --- file/js/TimWolla.WCF.Chat.coffee | 14 ++++++------ file/style/timwolla.wcf.chat.scss | 36 ++++++++++++++++++++++++++++++- template/chat.tpl | 14 ++++++++---- 3 files changed, 52 insertions(+), 12 deletions(-) mode change 100644 => 100755 template/chat.tpl diff --git a/file/js/TimWolla.WCF.Chat.coffee b/file/js/TimWolla.WCF.Chat.coffee index c54a775..ff4923f 100644 --- a/file/js/TimWolla.WCF.Chat.coffee +++ b/file/js/TimWolla.WCF.Chat.coffee @@ -212,10 +212,10 @@ TimWolla.WCF ?= {} li.append a menu = $ '' menu.addClass 'chatUserMenu' - menu.append $ '
  • {lang}wcf.chat.query{/lang}
  • ' - menu.append $ '
  • {lang}wcf.chat.kick{/lang}
  • ' - menu.append $ '
  • {lang}wcf.chat.ban{/lang}
  • ' - menu.append $ '
  • {lang}wcf.chat.profile{/lang}
  • ' + menu.append $ '
  • ' + WCF.Language.get('wcf.chat.query') + '
  • ' + menu.append $ '
  • ' + WCF.Language.get('wcf.chat.kick') + '
  • ' + menu.append $ '
  • ' + WCF.Language.get('wcf.chat.ban') + '
  • ' + menu.append $ '
  • ' + WCF.Language.get('wcf.chat.profile') + '
  • ' @events.userMenu.fire user, menu li.append menu li.appendTo $ '#chatUserList' @@ -307,15 +307,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' diff --git a/file/style/timwolla.wcf.chat.scss b/file/style/timwolla.wcf.chat.scss index d6e457d..5eea3a3 100644 --- a/file/style/timwolla.wcf.chat.scss +++ b/file/style/timwolla.wcf.chat.scss @@ -209,4 +209,38 @@ #sidebarContainer { overflow-y: auto; height: 420px; width: 100%; -} \ No newline at end of file +} + +#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); + } + } + } + } +} diff --git a/template/chat.tpl b/template/chat.tpl old mode 100644 new mode 100755 index 32d193a..53ddf12 --- a/template/chat.tpl +++ b/template/chat.tpl @@ -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 @@ {capture assign='sidebar'} -
    +