diff --git a/labs/meteor-client/client/globals.coffee b/labs/meteor-client/client/globals.coffee index 2718430d47..293c95d9f5 100755 --- a/labs/meteor-client/client/globals.coffee +++ b/labs/meteor-client/client/globals.coffee @@ -108,7 +108,7 @@ Handlebars.registerHelper "isUserSharingAudio", (u) -> if u? then u.voiceUser?.joined 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 # the user's userId @userLogout = (meeting, user) -> diff --git a/labs/meteor-client/client/main.coffee b/labs/meteor-client/client/main.coffee index d664952661..83034fc122 100755 --- a/labs/meteor-client/client/main.coffee +++ b/labs/meteor-client/client/main.coffee @@ -45,6 +45,8 @@ Template.header.events toggleNavbar() "click .settingsIcon": (event) -> alert "settings" + "click .raiseHand": (event) -> + Meteor.call('userRaiseHand', @id) # Gets called last in main template, just an easy place to print stuff out Handlebars.registerHelper "doFinalStuff", -> diff --git a/labs/meteor-client/client/main.html b/labs/meteor-client/client/main.html index b9167995d0..4815b65acd 100755 --- a/labs/meteor-client/client/main.html +++ b/labs/meteor-client/client/main.html @@ -38,16 +38,16 @@ {{> makeButton id=user.externUserId btn_class="videoFeedIcon navbar-brand" i_class="stop" sharingVideo=false _id=_id}} {{/if}} - + {{{Join/hang up audio call}}} {{#if isUserSharingAudio user}} {{> makeButton id=user.externUserId btn_class="navbarIconToggleActive audioFeedIcon navbar-brand" i_class="headphones" sharingAudio=true _id=_id}} {{else}} {{> makeButton id=user.externUserId btn_class="audioFeedIcon navbar-brand" i_class="volume-off" sharingAudio=false _id=_id}} {{/if}} - + {{{Mute/unmute 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}}} {{#if isUserTalking user}} {{> makeButton id=user.externUserId btn_class="navbarIconToggleActive muteIcon navbar-brand" i_class="volume-up" sharingAudio=true _id=_id}} {{else}} @@ -55,13 +55,19 @@ {{/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="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"}} {{/with}} {{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.}}} {{> makeButton id="" btn_class="hideNavbarIcon pull-right navbar-brand" i_class="chevron-down"}} {{/if}} diff --git a/labs/meteor-client/client/views/users/user_item.coffee b/labs/meteor-client/client/views/users/user_item.coffee index 2140a37e63..c75f3d252f 100755 --- a/labs/meteor-client/client/views/users/user_item.coffee +++ b/labs/meteor-client/client/views/users/user_item.coffee @@ -4,8 +4,6 @@ Template.userItem.helpers u1 is u2 Template.userItem.events - "click .raiseHand": (event) -> #Meteor.call('userRaiseHand', @_id) - "click .disableCam": (event) -> #Meteor.call('userToggleCam', @_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 .lowerHand": (event) -> #Meteor.call('userLowerHand', @_id) - "click .setPresenter": (event) -> #do nothing if user is already presenter unless @isPresenter diff --git a/labs/meteor-client/collections/users.coffee b/labs/meteor-client/collections/users.coffee index e9fe951d15..002e1d1fad 100755 --- a/labs/meteor-client/collections/users.coffee +++ b/labs/meteor-client/collections/users.coffee @@ -70,3 +70,7 @@ Meteor.methods 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.joined':false}}) + + userRaiseHand: (userId) -> + if userId? + Meteor.Users.update({userId:userId}, {$set: {'user.raise_hand':true}})