mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Allow the user to open a privat channel
This commit is contained in:
parent
8279759294
commit
476954fe8d
@ -490,6 +490,7 @@ Rebuild the userlist based on the given `users`.
|
||||
foundUsers = { }
|
||||
|
||||
for user in users
|
||||
do (user) ->
|
||||
id = "timsChatUser#{user.userID}"
|
||||
|
||||
Move the user to the new position if he was found in the old list.
|
||||
@ -532,15 +533,18 @@ Build HTML of the user and insert it into the list, if the users was not found i
|
||||
li.append v.userTemplate.fetch user
|
||||
|
||||
menu = $ '<ul></ul>'
|
||||
menu.addClass 'dropdownMenu'
|
||||
menu.append $ "<li><a>#{WCF.Language.get('chat.general.query')}</a></li>"
|
||||
unless user.userID is WCF.User.userID
|
||||
menu.append $("<li><a>#{WCF.Language.get('chat.general.query')}</a></li>").click -> openPrivateChannel user.userID
|
||||
menu.append $ "<li><a>#{WCF.Language.get('chat.general.kick')}</a></li>"
|
||||
menu.append $ "<li><a>#{WCF.Language.get('chat.general.ban')}</a></li>"
|
||||
menu.append $ """<li><a href="#{user.link}">#{WCF.Language.get('chat.general.profile')}</a></li>"""
|
||||
|
||||
events.userMenu.fire user, menu
|
||||
|
||||
if menu.find('li').length
|
||||
li.append menu
|
||||
menu.addClass 'dropdownMenu'
|
||||
|
||||
li.appendTo $ '#timsChatUserList > ul'
|
||||
|
||||
foundUsers[id] = true
|
||||
|
Loading…
Reference in New Issue
Block a user