Merge branch 'creating-better-templates' of github.com:perroned/bigbluebutton into merging-html5-with-master

This commit is contained in:
Anton Georgiev 2014-09-04 15:04:42 +00:00
commit 206a2e23ea
8 changed files with 74 additions and 55 deletions

View File

@ -89,19 +89,38 @@ Handlebars.registerHelper "isCurrentUser", (id) ->
Handlebars.registerHelper "meetingIsRecording", ->
Meteor.Meetings.findOne()?.recorded # Should only ever have one meeting, so we dont need any filter and can trust result #1
Handlebars.registerHelper "isCurrentUserMuted", ->
getInSession "isMuted"
Handlebars.registerHelper "isCurrentUserRaisingHand", ->
user = Meteor.Users.findOne({userId:getInSession("userId")})
user?.user?.raise_hand
Handlebars.registerHelper "isCurrentUserSharingAudio", ->
user = Meteor.Users.findOne({userId:getInSession("userId")})
user?.user?.voiceUser?.joined
Handlebars.registerHelper "isCurrentUserSharingVideo", ->
user = Meteor.Users.findOne({userId:getInSession("userId")})
user?.user?.webcam_stream?.length isnt 0
Handlebars.registerHelper "isCurrentUserTalking", ->
user = Meteor.Users.findOne({userId:getInSession("userId")})
user?.user?.voiceUser?.talking
Handlebars.registerHelper "isUserSharingAudio", (u) ->
if u?
user = Meteor.Users.findOne({userId:u.userid})
user.user.voiceUser?.joined
user?.user?.voiceUser?.joined
else return false
Handlebars.registerHelper "isUserSharingVideo", (u) ->
u.webcam_stream.length isnt 0
u.webcam_stream?.length isnt 0
Handlebars.registerHelper "isUserTalking", (u) ->
if u?
user = Meteor.Users.findOne({userId:u.userid})
user.user.voiceUser?.talking
user.user?.voiceUser?.talking
else return false
Handlebars.registerHelper "isUserMuted", (u) ->
@ -171,6 +190,7 @@ Meteor.methods
# format: meetingId, userId, requesterId, mutedBoolean
# TODO: insert the requesterId - the user who requested the muting of userId (might be a moderator)
Meteor.call('publishMuteRequest', u.meetingId, u.userId, u.userId, not u.user.voiceUser.muted)
setInSession "isMuted", not u.user.voiceUser.muted
@toggleNavbar = ->
setInSession "display_navbar", !getInSession "display_navbar"
@ -190,7 +210,8 @@ Meteor.methods
else
# create voice call params
username = "#{getInSession("userId")}-bbbID-#{getUsersName()}"
# voiceBridge = "70827"
# voicePin = Meteor.Meetings.findOne()?.voiceConf
# voiceBridge = if voicePin? then voicePin else "0"
voiceBridge = "70827"
server = null
joinCallback = (message) ->

View File

@ -27,11 +27,11 @@ Template.header.events
# "click .settingsIcon": (event) ->
# alert "settings"
"click .raiseHand": (event) ->
Meteor.call('userRaiseHand', getInSession("meetingId"), @id)
Meteor.call('userRaiseHand', getInSession("meetingId"), getInSession("userId"))
"click .lowerHand": (event) ->
# loweredBy = @id # TODO! this must be the userid of the person lowering the hand - instructor/student
loweredBy = getInSession("userId")
Meteor.call('userLowerHand', getInSession("meetingId"), @id, loweredBy)
Meteor.call('userLowerHand', getInSession("meetingId"), getInSession("userId"), loweredBy)
"click .whiteboardIcon": (event) ->
toggleWhiteBoard()
@ -70,3 +70,4 @@ Meteor.startup ->
setInSession "isSharingAudio", false
setInSession "inChatWith", 'PUBLIC_CHAT'
setInSession "messageFontSize", 12
setInSession "isMuted", false

View File

@ -5,76 +5,71 @@
</template>
<template name="header">
{{#if getInSession "display_navbar"}}
<div id="navbar" class="myNavbar gradientBar navbar navbar-default navbar-fixed-top" role="navigation">
{{#with getCurrentUser}}
<div class="navbarUserButtons navbarSection">
<!-- display/hide users list toggle -->
{{#if getInSession "display_navbar"}}
<div id="navbar" class="myNavbar gradientBar navbar navbar-default navbar-fixed-top" role="navigation">
<div class="navbarUserButtons navbarSection">
<!-- display/hide users list toggle -->
{{#if getInSession "display_usersList"}}
{{> makeButton id=userId btn_class="navbarIconToggleActive usersListIcon navbarButton" i_class="user" _id=_id rel="tooltip" data_placement="bottom" title="Hide List of Users"}}
{{> makeButton btn_class="navbarIconToggleActive usersListIcon navbarButton" i_class="user" rel="tooltip" data_placement="bottom" title="Hide List of Users"}}
{{else}}
{{> makeButton id=userId btn_class="usersListIcon navbarButton" i_class="user" _id=_id rel="tooltip" data_placement="bottom" title="Show List of Users"}}
{{> makeButton btn_class="usersListIcon navbarButton" i_class="user" rel="tooltip" data_placement="bottom" title="Show List of Users"}}
{{/if}}
<!-- display/hide whiteboard toggle -->
{{#if getInSession "display_whiteboard"}}
{{> makeButton btn_class="navbarIconToggleActive whiteboardIcon navbarButton" i_class="pencil" _id=_id rel="tooltip" data_placement="bottom" title="Hide Whiteboard"}}
{{> makeButton btn_class="navbarIconToggleActive whiteboardIcon navbarButton" i_class="pencil" rel="tooltip" data_placement="bottom" title="Hide Whiteboard"}}
{{else}}
{{> makeButton id=userId btn_class="whiteboardIcon navbarButton" i_class="pencil" _id=_id rel="tooltip" data_placement="bottom" title="Show Whiteboard"}}
{{> makeButton btn_class="whiteboardIcon navbarButton" i_class="pencil" rel="tooltip" data_placement="bottom" title="Show Whiteboard"}}
{{/if}}
<!-- display/hide chat bar toggle -->
{{#if getInSession "display_chatbar"}}
{{> makeButton id=userId btn_class="navbarIconToggleActive chatBarIcon navbarButton" i_class="comment" _id=_id rel="tooltip" data_placement="bottom" title="Hide Message Pane"}}
{{> makeButton btn_class="navbarIconToggleActive chatBarIcon navbarButton" i_class="comment" rel="tooltip" data_placement="bottom" title="Hide Message Pane"}}
{{else}}
{{> makeButton id=userId btn_class="chatBarIcon navbarButton" i_class="comment" _id=_id rel="tooltip" data_placement="bottom" title="Show Message Pane"}}
{{> makeButton btn_class="chatBarIcon navbarButton" i_class="comment" rel="tooltip" data_placement="bottom" title="Show Message Pane"}}
{{/if}}
<!-- display/hide webcam streams toggle -->
{{#if isUserSharingVideo user}}
{{> makeButton id=userId btn_class="navbarIconToggleActive videoFeedIcon navbarButton" i_class="stop" sharingVideo=true _id=_id rel="tooltip" data_placement="bottom" title="Hide Webcams"}}
{{#if isCurrentUserSharingVideo}}
{{> makeButton btn_class="navbarIconToggleActive videoFeedIcon navbarButton" i_class="stop" sharingVideo=true rel="tooltip" data_placement="bottom" title="Hide Webcams"}}
{{else}}
{{> makeButton id=userId btn_class="videoFeedIcon navbarButton" i_class="facetime-video" sharingVideo=false _id=_id rel="tooltip" data_placement="bottom" title="Show Webcams"}}
{{> makeButton btn_class="videoFeedIcon navbarButton" i_class="facetime-video" sharingVideo=false rel="tooltip" data_placement="bottom" title="Show Webcams"}}
{{/if}}
<!-- Join/hang up audio call -->
{{#if isUserSharingAudio user}}
{{> makeButton id=userId btn_class="navbarIconToggleActive audioFeedIcon navbarButton" i_class="volume-off" sharingAudio=true _id=_id rel="tooltip" data_placement="bottom" title="Leave Audio Call"}}
{{#if isCurrentUserSharingAudio}}
{{> makeButton btn_class="navbarIconToggleActive audioFeedIcon navbarButton" i_class="volume-off" sharingAudio=true rel="tooltip" data_placement="bottom" title="Leave Audio Call"}}
{{#if isCurrentUserMuted}}
{{> makeButton btn_class="muteIcon navbarButton" i_class="volume-off" sharingAudio=true rel="tooltip" data_placement="bottom" title="Unmute"}}
{{else}}
{{#if isCurrentUserTalking}}
{{> makeButton btn_class="navbarIconToggleActive muteIcon navbarButton" i_class="volume-up" sharingAudio=true rel="tooltip" data_placement="bottom" title="Mute"}}
{{else}}
{{> makeButton btn_class="navbarIconToggleActive muteIcon navbarButton" i_class="volume-down" sharingAudio=true rel="tooltip" data_placement="bottom" title="Mute"}}
{{/if}}
{{/if}}
{{else}}
{{> makeButton id=userId btn_class="audioFeedIcon navbarButton" i_class="headphones" sharingAudio=false _id=_id rel="tooltip" data_placement="bottom" title="Join Audio Call"}}
{{> makeButton btn_class="audioFeedIcon navbarButton" i_class="headphones" sharingAudio=false rel="tooltip" data_placement="bottom" title="Join Audio Call"}}
{{/if}}
<!-- Mute/unmute user -->
{{#if isUserSharingAudio user}}
<!-- Should use much more noticeable icons than just bootstraps volume-up & volume-down to differentiate talking but it is good for now -->
{{#if isUserMuted user}}
{{> makeButton id=userid btn_class="muteIcon navbarButton" i_class="volume-off" sharingAudio=true _id=_id rel="tooltip" data_placement="bottom" title="Unmute"}}
{{else}}
{{#if isUserTalking user}}
{{> makeButton id=userid btn_class="navbarIconToggleActive muteIcon navbarButton" i_class="volume-up" sharingAudio=true _id=_id rel="tooltip" data_placement="bottom" title="Mute"}}
{{else}}
{{> makeButton id=userId btn_class="navbarIconToggleActive muteIcon navbarButton" i_class="volume-down" sharingAudio=true _id=_id rel="tooltip" data_placement="bottom" title="Mute"}}
{{/if}}
{{/if}}
{{/if}}
{{#if user.raise_hand}}
{{> makeButton id=userId btn_class="lowerHand navbarIconToggleActive navbarButton" i_class="hand-up" rel="tooltip" data_placement="bottom" title="Lower your hand"}}
{{#if isCurrentUserRaisingHand}}
{{> makeButton btn_class="lowerHand navbarIconToggleActive navbarButton" i_class="hand-up" rel="tooltip" data_placement="bottom" title="Lower your hand"}}
{{else}}
{{> makeButton id=userId btn_class="raiseHand navbarButton" i_class="hand-up" rel="tooltip" data_placement="bottom" title="Raise your hand"}}
{{> makeButton btn_class="raiseHand navbarButton" i_class="hand-up" rel="tooltip" data_placement="bottom" title="Raise your hand"}}
{{/if}}
{{> recordingStatus}}
</div>
<div class="navbarTitle navbarSection"><span>{{getMeetingName}}</span></div>
<div class="navbarSettingsButtons navbarSection">
</div>
<div class="navbarTitle navbarSection"><span>{{getMeetingName}}</span></div>
<div class="navbarSettingsButtons navbarSection">
<!-- {{> makeButton id="userId" btn_class="settingsIcon navbarButton" i_class="cog" rel="tooltip" data_placement="bottom" title="Settings"}} -->
{{> makeButton id="userId" btn_class="signOutIcon navbarButton" i_class="log-out" rel="tooltip" data_placement="bottom" title="Logout"}}
{{> makeButton id="" btn_class="hideNavbarIcon navbarButton" i_class="chevron-up" rel="tooltip" data_placement="bottom" title="Hide Navbar"}}
</div>
{{/with}}
</div>
{{else}}
{{> makeButton btn_class="signOutIcon navbarButton" i_class="log-out" rel="tooltip" data_placement="bottom" title="Logout"}}
{{> makeButton btn_class="hideNavbarIcon navbarButton" i_class="chevron-up" rel="tooltip" data_placement="bottom" title="Hide Navbar"}}
</div>
</div>
{{else}}
<div id="navbar" class="myNavbarMinimized navbar-default navbar-static-top" role="navigation">
<!-- 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 btn_class="hideNavbarIcon navbarMinimizedButton" i_class="chevron-down" rel="tooltip" data_placement="bottom" title="Display Navbar"}}

View File

@ -8,9 +8,10 @@
border: 1px solid #ccc;
float: left;
min-height:500px;
min-width:300px;
/*min-width:300px;*/
overflow: hidden;
width: 25%;
margin-right: 0.5%;
}
.chat li{
border-bottom: 1px dotted #B3A9A9;

View File

@ -5,6 +5,7 @@ body {
color: #666666;
height:100%;
left:0;
min-width: 768px;
position:absolute;
right:0;
top:0;

View File

@ -1,8 +1,8 @@
#users {
margin-left: 0.5%;
min-width:230px;
/*min-width:230px;*/
padding-bottom: 10px;
width: 12%;
width: 20%;
}
#user-contents {
padding-bottom: 10px;

View File

@ -2,7 +2,7 @@
margin-left: 0.5%;
margin-right: 0.5%;
padding: 5px;
width:61%;
width:53%;
}
#whiteboard-paper {

View File

@ -35,7 +35,7 @@ config.redis.channels.toBBBApps.whiteboard = "bigbluebutton:to-bbb-apps:whiteboa
# Logging
config.log = {}
config.log.path = if process?.env?.NODE_ENV == "production"
config.log.path = if process?.env?.NODE_ENV is "production"
"/var/log/bigbluebutton/bbbnode.log"
else
"./log/development.log"
@ -44,4 +44,4 @@ else
config.modules = null
Meteor.config = config
Meteor.config = config