2014-08-09 03:30:28 +08:00
|
|
|
Template.footer.helpers
|
2014-09-24 02:27:59 +08:00
|
|
|
getFooterString: ->
|
|
|
|
# info = Meteor.call('getServerInfo')
|
2014-09-26 04:02:38 +08:00
|
|
|
dateOfBuild = getInSession 'dateOfBuild'
|
2014-09-24 02:27:59 +08:00
|
|
|
version = getInSession "bbbServerVersion"
|
|
|
|
copyrightYear = (new Date()).getFullYear()
|
|
|
|
link = "<a href='http://bigbluebutton.org/' target='_blank'>http://bigbluebutton.org</a>"
|
2014-09-26 04:02:38 +08:00
|
|
|
foot = "(c) #{copyrightYear} BigBlueButton Inc. [build #{version} - #{dateOfBuild}] - For more information visit #{link}"
|
2014-07-17 02:10:27 +08:00
|
|
|
|
2014-06-14 02:20:36 +08:00
|
|
|
Template.header.events
|
2014-09-24 02:27:59 +08:00
|
|
|
"click .usersListIcon": (event) ->
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
2014-09-24 02:27:59 +08:00
|
|
|
toggleUsersList()
|
|
|
|
"click .chatBarIcon": (event) ->
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
2014-09-24 02:27:59 +08:00
|
|
|
toggleChatbar()
|
|
|
|
"click .videoFeedIcon": (event) ->
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
|
|
|
toggleCam @
|
2014-09-24 02:27:59 +08:00
|
|
|
"click .audioFeedIcon": (event) ->
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
2014-09-24 02:27:59 +08:00
|
|
|
toggleVoiceCall @
|
|
|
|
"click .muteIcon": (event) ->
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
2014-09-24 02:27:59 +08:00
|
|
|
toggleMic @
|
|
|
|
"click .signOutIcon": (event) ->
|
2014-09-24 03:02:31 +08:00
|
|
|
response = confirm('Are you sure you want to exit?')
|
|
|
|
if response
|
|
|
|
userLogout getInSession("meetingId"), getInSession("userId"), true
|
|
|
|
|
2014-09-24 02:27:59 +08:00
|
|
|
"click .hideNavbarIcon": (event) ->
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
2014-09-24 02:27:59 +08:00
|
|
|
toggleNavbar()
|
|
|
|
# "click .settingsIcon": (event) ->
|
|
|
|
# alert "settings"
|
|
|
|
"click .raiseHand": (event) ->
|
2014-09-25 03:55:55 +08:00
|
|
|
console.log "navbar raise own hand from client"
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
2014-10-08 03:28:54 +08:00
|
|
|
Meteor.call('userRaiseHand', getInSession("meetingId"), getInSession("DBID"), getInSession("userId"), getInSession("DBID") )
|
2014-09-24 02:27:59 +08:00
|
|
|
"click .lowerHand": (event) ->
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
2014-10-08 03:28:54 +08:00
|
|
|
Meteor.call('userLowerHand', getInSession("meetingId"), getInSession("DBID"), getInSession("userId"), getInSession("DBID") )
|
2014-09-24 02:27:59 +08:00
|
|
|
"click .whiteboardIcon": (event) ->
|
2014-11-02 07:11:06 +08:00
|
|
|
$(".tooltip").hide()
|
2014-09-24 02:27:59 +08:00
|
|
|
toggleWhiteBoard()
|
|
|
|
"mouseover #navbarMinimizedButton": (event) ->
|
|
|
|
$("#navbarMinimizedButton").removeClass("navbarMinimizedButtonSmall")
|
|
|
|
$("#navbarMinimizedButton").addClass("navbarMinimizedButtonLarge")
|
|
|
|
"mouseout #navbarMinimizedButton": (event) ->
|
|
|
|
$("#navbarMinimizedButton").removeClass("navbarMinimizedButtonLarge")
|
|
|
|
$("#navbarMinimizedButton").addClass("navbarMinimizedButtonSmall")
|
2014-07-31 04:22:23 +08:00
|
|
|
|
2014-08-15 01:26:15 +08:00
|
|
|
Template.recordingStatus.rendered = ->
|
2014-09-24 02:27:59 +08:00
|
|
|
$('button[rel=tooltip]').tooltip()
|
2014-08-15 01:26:15 +08:00
|
|
|
|
2014-09-05 01:06:36 +08:00
|
|
|
Template.main.helpers
|
|
|
|
setTitle: ->
|
2014-09-12 01:37:09 +08:00
|
|
|
document.title = "BigBlueButton #{window.getMeetingName() ? 'HTML5'}"
|
2014-09-05 01:06:36 +08:00
|
|
|
|
2014-07-31 04:22:23 +08:00
|
|
|
Template.makeButton.rendered = ->
|
2014-09-24 02:27:59 +08:00
|
|
|
$('button[rel=tooltip]').tooltip()
|
2014-08-15 01:26:15 +08:00
|
|
|
|
2014-10-31 07:05:28 +08:00
|
|
|
@grabAllDBID = ->
|
|
|
|
array = []
|
|
|
|
for u in Meteor.Users.find().fetch()
|
|
|
|
array.push(u._id)
|
|
|
|
return array
|
|
|
|
|
2014-06-14 02:20:36 +08:00
|
|
|
# These settings can just be stored locally in session, created at start up
|
|
|
|
Meteor.startup ->
|
2014-09-24 02:27:59 +08:00
|
|
|
@SessionAmplify = _.extend({}, Session,
|
|
|
|
keys: _.object(_.map(amplify.store(), (value, key) ->
|
|
|
|
[
|
|
|
|
key
|
|
|
|
JSON.stringify(value)
|
|
|
|
]
|
|
|
|
))
|
|
|
|
set: (key, value) ->
|
|
|
|
Session.set.apply this, arguments
|
|
|
|
amplify.store key, value
|
|
|
|
return
|
|
|
|
)
|
2014-07-18 03:45:26 +08:00
|
|
|
|
2014-10-09 06:05:57 +08:00
|
|
|
Meteor.autorun ->
|
|
|
|
if Meteor.status().connected
|
|
|
|
console.log("connected")
|
2014-10-31 07:05:28 +08:00
|
|
|
uid = getInSession("userId")
|
|
|
|
# Obtain user info here. for testing. should be moved somewhere else later
|
2014-10-31 23:25:32 +08:00
|
|
|
Meteor.call "getMyInfo", uid, (error, result) -> #TODO should try to get rid of this?
|
2014-10-31 07:05:28 +08:00
|
|
|
if error? then console.log "error:" + error
|
|
|
|
else
|
|
|
|
Meteor.subscribe 'users', getInSession('meetingId'), getInSession("userId"), -> # callback for after users have been loaded on client
|
|
|
|
Meteor.subscribe 'chat', getInSession('meetingId'), getInSession("userId"), ->
|
|
|
|
Meteor.subscribe 'shapes', getInSession('meetingId'), ->
|
|
|
|
Meteor.subscribe 'slides', getInSession('meetingId'), ->
|
|
|
|
Meteor.subscribe 'meetings', getInSession('meetingId'), ->
|
|
|
|
Meteor.subscribe 'presentations', getInSession('meetingId'), ->
|
2014-10-31 07:46:31 +08:00
|
|
|
Meteor.call "getMyInfo", getInSession("userId"), (error, result) ->
|
2014-10-31 23:25:32 +08:00
|
|
|
console.log "managed to reconnect successfully"
|
2014-10-31 07:46:31 +08:00
|
|
|
setInSession("DBID", result.DBID)
|
|
|
|
setInSession("userName", result.name)
|
2014-10-09 06:05:57 +08:00
|
|
|
|
2014-09-24 02:27:59 +08:00
|
|
|
setInSession "display_usersList", true
|
|
|
|
setInSession "display_navbar", true
|
|
|
|
setInSession "display_chatbar", true
|
|
|
|
setInSession "display_whiteboard", true
|
|
|
|
setInSession "display_chatPane", true
|
|
|
|
setInSession "joinedAt", getTime()
|
|
|
|
setInSession "inChatWith", 'PUBLIC_CHAT'
|
|
|
|
setInSession "messageFontSize", 12
|
2014-09-26 04:02:38 +08:00
|
|
|
setInSession "dateOfBuild", Meteor.config?.dateOfBuild or "UNKNOWN DATE"
|
|
|
|
setInSession "bbbServerVersion", Meteor.config?.bbbServerVersion or "UNKNOWN VERSION"
|
2014-10-23 00:16:09 +08:00
|
|
|
setInSession "displayChatNotifications", true
|