2014-09-24 04:40:59 +08:00
|
|
|
Template.displayUserIcons.events
|
2014-11-06 23:27:43 +08:00
|
|
|
'click .muteIcon': (event) ->
|
|
|
|
toggleMic @
|
|
|
|
|
2014-09-24 04:40:59 +08:00
|
|
|
'click .raisedHandIcon': (event) ->
|
2014-09-25 03:55:55 +08:00
|
|
|
# the function to call 'userLowerHand'
|
|
|
|
# the meeting id
|
|
|
|
# the _id of the person whose land is to be lowered
|
|
|
|
# the userId of the person who is lowering the hand
|
2015-05-06 04:15:33 +08:00
|
|
|
BBB.lowerHand(getInSession("meetingId"), @userId, getInSession("userId"), getInSession("authToken"))
|
2015-04-24 02:02:56 +08:00
|
|
|
|
|
|
|
Template.displayUserIcons.helpers
|
|
|
|
userLockedIconApplicable: (userId) ->
|
|
|
|
# the lock settings affect the user (and requiire a lock icon) if
|
|
|
|
# the user is set to be locked and there is a relevant lock in place
|
|
|
|
locked = BBB.getUser(userId)?.user.locked
|
|
|
|
settings = Meteor.Meetings.findOne()?.roomLockSettings
|
|
|
|
lockInAction = settings.disablePrivChat or
|
|
|
|
settings.disableCam or
|
|
|
|
settings.disableMic or
|
|
|
|
settings.lockedLayout or
|
|
|
|
settings.disablePubChat
|
|
|
|
return locked and lockInAction
|
2015-05-08 10:52:36 +08:00
|
|
|
|
2015-05-21 22:41:58 +08:00
|
|
|
# Opens a private chat tab when a username from the userlist is clicked
|
2015-05-08 10:52:36 +08:00
|
|
|
Template.usernameEntry.events
|
2015-05-15 06:47:31 +08:00
|
|
|
'click .usernameEntry': (event) ->
|
2015-05-08 10:52:36 +08:00
|
|
|
userIdSelected = @.userId
|
2015-06-16 04:19:55 +08:00
|
|
|
unless userIdSelected is null
|
|
|
|
if userIdSelected is BBB.getCurrentUser()?.userId
|
|
|
|
setInSession "inChatWith", "PUBLIC_CHAT"
|
|
|
|
else
|
|
|
|
setInSession "inChatWith", userIdSelected
|
|
|
|
if isLandscape()
|
|
|
|
$("#newMessageInput").focus()
|
|
|
|
if isPortrait() or isPortraitMobile()
|
|
|
|
toggleUsersList()
|
|
|
|
$("#newMessageInput").focus()
|
2015-06-25 08:21:50 +08:00
|
|
|
|
|
|
|
'click .gotUnreadMail': (event) ->
|
|
|
|
_this = @
|
2015-07-09 01:09:29 +08:00
|
|
|
chats = getInSession('chats')
|
|
|
|
if chats isnt undefined
|
|
|
|
for chat in chats
|
|
|
|
if chat.userId is _this.userId
|
|
|
|
chat.gotMail = false
|
|
|
|
break
|
|
|
|
setInSession 'chats', chats
|
2015-06-25 08:21:50 +08:00
|
|
|
|
2015-06-27 06:58:23 +08:00
|
|
|
'click .gotUnreadPublic': (event) ->
|
2015-07-09 01:09:29 +08:00
|
|
|
chats = getInSession('chats')
|
|
|
|
if chats isnt undefined
|
|
|
|
for chat in chats
|
|
|
|
if chat.userId is 'PUBLIC_CHAT'
|
|
|
|
chat.gotMail = false
|
|
|
|
break
|
|
|
|
setInSession 'chats', chats
|
2015-06-27 06:58:23 +08:00
|
|
|
|
2015-06-25 08:21:50 +08:00
|
|
|
Template.usernameEntry.helpers
|
|
|
|
hasGotUnreadMailClass: (userId) ->
|
2015-07-09 01:09:29 +08:00
|
|
|
chats = getInSession('chats')
|
2015-07-08 00:25:29 +08:00
|
|
|
if chats isnt undefined
|
2015-07-09 01:09:29 +08:00
|
|
|
for chat in chats
|
|
|
|
if chat.userId is userId and chat.gotMail
|
|
|
|
return true
|
|
|
|
return false
|