presentationProgress() didn't work and didn't display slide numbers for a presenter

This commit is contained in:
Oleksandr Zhurbenko 2015-11-27 16:54:26 -08:00
parent ab7affc1f2
commit cb33ef7586

View File

@ -7,15 +7,6 @@
callback()
Template.whiteboard.helpers
presentationProgress: ->
currentPresentation = Meteor.Presentations.findOne({'presentation.current':true})
currentSlideNum = Meteor.Slides.findOne({'presentationId': currentPresentation?.presentation.id, 'slide.current':true})?.slide.num
totalSlideNum = Meteor.Slides.find({'presentationId': currentPresentation?.presentation.id})?.count()
console.log('slide', currentSlideNum)
if currentSlideNum isnt undefined
return "#{currentSlideNum}/#{totalSlideNum}"
else
return ''
isPollStarted: ->
if BBB.isPollGoing(getInSession('userId'))
return true
@ -83,6 +74,20 @@ Template.whiteboard.events
$('.FABTriggerButton').blur()
toggleEmojisFAB()
Template.whiteboardControls.helpers
presentationProgress: ->
console.log "test"
currentPresentation = Meteor.Presentations.findOne({'presentation.current':true})
currentSlideNum = Meteor.Slides.findOne({'presentationId': currentPresentation?.presentation.id, 'slide.current':true})?.slide.num
totalSlideNum = Meteor.Slides.find({'presentationId': currentPresentation?.presentation.id})?.count()
console.log('slide', currentSlideNum)
if currentSlideNum isnt undefined
console.log currentSlideNum
return "#{currentSlideNum}/#{totalSlideNum}"
else
console.log currentSlideNum
return ''
Template.whiteboardControls.events
'click .whiteboard-buttons-slide > .prev':(event) ->
BBB.goToPreviousPage()