User raise hand ability since html5 client will be for students/viewers

This commit is contained in:
perroned 2014-07-29 07:20:51 -07:00
parent 248b90f3bb
commit 30d96b8229
5 changed files with 17 additions and 9 deletions

View File

@ -108,7 +108,7 @@ Handlebars.registerHelper "isUserSharingAudio", (u) ->
if u? then u.voiceUser?.joined if u? then u.voiceUser?.joined
else return false else return false
# Starts the entire logout procedure. Can be called for signout out # Starts the entire logout procedure.
# meeting: the meeting the user is in # meeting: the meeting the user is in
# the user's userId # the user's userId
@userLogout = (meeting, user) -> @userLogout = (meeting, user) ->

View File

@ -45,6 +45,8 @@ Template.header.events
toggleNavbar() toggleNavbar()
"click .settingsIcon": (event) -> "click .settingsIcon": (event) ->
alert "settings" alert "settings"
"click .raiseHand": (event) ->
Meteor.call('userRaiseHand', @id)
# Gets called last in main template, just an easy place to print stuff out # Gets called last in main template, just an easy place to print stuff out
Handlebars.registerHelper "doFinalStuff", -> Handlebars.registerHelper "doFinalStuff", ->

View File

@ -38,16 +38,16 @@
{{> makeButton id=user.externUserId btn_class="videoFeedIcon navbar-brand" i_class="stop" sharingVideo=false _id=_id}} {{> makeButton id=user.externUserId btn_class="videoFeedIcon navbar-brand" i_class="stop" sharingVideo=false _id=_id}}
{{/if}} {{/if}}
<!-- Join/hang up audio call --> {{{Join/hang up audio call}}}
{{#if isUserSharingAudio user}} {{#if isUserSharingAudio user}}
{{> makeButton id=user.externUserId btn_class="navbarIconToggleActive audioFeedIcon navbar-brand" i_class="headphones" sharingAudio=true _id=_id}} {{> makeButton id=user.externUserId btn_class="navbarIconToggleActive audioFeedIcon navbar-brand" i_class="headphones" sharingAudio=true _id=_id}}
{{else}} {{else}}
{{> makeButton id=user.externUserId btn_class="audioFeedIcon navbar-brand" i_class="volume-off" sharingAudio=false _id=_id}} {{> makeButton id=user.externUserId btn_class="audioFeedIcon navbar-brand" i_class="volume-off" sharingAudio=false _id=_id}}
{{/if}} {{/if}}
<!-- Mute/unmute user --> {{{Mute/unmute user}}}
{{#if isUserSharingAudio user}} {{#if isUserSharingAudio user}}
<!-- Should use much more noticeable icons than just bootstrap's volume-up & volume-down to differentiate talking but it is good for now --> {{{Should use much more noticeable icons than just bootstrap's volume-up & volume-down to differentiate talking but it is good for now}}}
{{#if isUserTalking user}} {{#if isUserTalking user}}
{{> makeButton id=user.externUserId btn_class="navbarIconToggleActive muteIcon navbar-brand" i_class="volume-up" sharingAudio=true _id=_id}} {{> makeButton id=user.externUserId btn_class="navbarIconToggleActive muteIcon navbar-brand" i_class="volume-up" sharingAudio=true _id=_id}}
{{else}} {{else}}
@ -55,13 +55,19 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if user.raise_hand}}
{{> makeButton id=userId btn_class="navbarIconToggleActive navbar-brand" i_class="hand-up" isDisabled="disabled"}}
{{else}}
{{> makeButton id=userId btn_class="raiseHand navbar-brand" i_class="hand-up"}}
{{/if}}
{{> makeButton id="" btn_class="hideNavbarIcon pull-right navbar-brand" i_class="chevron-up"}} {{> makeButton id="" btn_class="hideNavbarIcon pull-right navbar-brand" i_class="chevron-up"}}
{{> makeButton id="user.externUserId" btn_class="signOutIcon pull-right navbar-brand" i_class="log-out"}} {{> makeButton id="user.externUserId" btn_class="signOutIcon pull-right navbar-brand" i_class="log-out"}}
{{> makeButton id="user.externUserId" btn_class="settingsIcon pull-right navbar-brand" i_class="cog"}} {{> makeButton id="user.externUserId" btn_class="settingsIcon pull-right navbar-brand" i_class="cog"}}
{{/with}} {{/with}}
</div> </div>
{{else}} {{else}}
<!-- User wants to hide navbar. The button for bringing the navbar back needs to still be available. Perhaps it should appear/disappear in the future on hover? Something to add later. --> {{{User wants to hide navbar. The button for bringing the navbar back needs to still be available. Perhaps it should appear/disappear in the future on hover? Something to add later.}}}
{{> makeButton id="" btn_class="hideNavbarIcon pull-right navbar-brand" i_class="chevron-down"}} {{> makeButton id="" btn_class="hideNavbarIcon pull-right navbar-brand" i_class="chevron-down"}}
{{/if}} {{/if}}
</template> </template>

View File

@ -4,8 +4,6 @@ Template.userItem.helpers
u1 is u2 u1 is u2
Template.userItem.events Template.userItem.events
"click .raiseHand": (event) -> #Meteor.call('userRaiseHand', @_id)
"click .disableCam": (event) -> #Meteor.call('userToggleCam', @_id, false) "click .disableCam": (event) -> #Meteor.call('userToggleCam', @_id, false)
"click .disableMic": (event) -> #Meteor.call('userToggleMic', @_id, false) "click .disableMic": (event) -> #Meteor.call('userToggleMic', @_id, false)
@ -14,8 +12,6 @@ Template.userItem.events
"click .enableCam": (event) -> #Meteor.call('userToggleCam', @_id, true) "click .enableCam": (event) -> #Meteor.call('userToggleCam', @_id, true)
"click .lowerHand": (event) -> #Meteor.call('userLowerHand', @_id)
"click .setPresenter": (event) -> "click .setPresenter": (event) ->
#do nothing if user is already presenter #do nothing if user is already presenter
unless @isPresenter unless @isPresenter

View File

@ -70,3 +70,7 @@ Meteor.methods
if meetingId? and userId? if meetingId? and userId?
Meteor.Users.update({meetingId: meetingId, userId: userId}, {$set:{'user.voiceUser.talking':false}}) Meteor.Users.update({meetingId: meetingId, userId: userId}, {$set:{'user.voiceUser.talking':false}})
Meteor.Users.update({meetingId: meetingId, userId: userId}, {$set:{'user.voiceUser.joined':false}}) Meteor.Users.update({meetingId: meetingId, userId: userId}, {$set:{'user.voiceUser.joined':false}})
userRaiseHand: (userId) ->
if userId?
Meteor.Users.update({userId:userId}, {$set: {'user.raise_hand':true}})