Added toggle for whiteboard visibility
This commit is contained in:
parent
aff1b175f6
commit
d5ab7d1009
@ -57,7 +57,10 @@ Handlebars.registerHelper "getCurrentUser", =>
|
||||
setInSession "display_navbar", !getInSession "display_navbar"
|
||||
|
||||
@toggleChatbar = ->
|
||||
setInSession "display_chatbar", !getInSession "display_chatbar"
|
||||
setInSession "display_chatbar", !getInSession "display_chatbar"
|
||||
|
||||
@toggleWhiteBoard = ->
|
||||
setInSession "display_whiteboard", !getInSession "display_whiteboard"
|
||||
|
||||
Meteor.methods
|
||||
sendMeetingInfoToClient: (meetingId, userId) ->
|
||||
|
@ -16,7 +16,7 @@ Meteor.startup ->
|
||||
SessionAmplify.set "display_usersList", true
|
||||
SessionAmplify.set "display_navbar", true
|
||||
SessionAmplify.set "display_chatbar", true
|
||||
SessionAmplify.set "display_whiteboard", false
|
||||
SessionAmplify.set "display_whiteboard", true
|
||||
SessionAmplify.set "display_chatPane", true
|
||||
SessionAmplify.set 'inChatWith', "PUBLIC_CHAT"
|
||||
SessionAmplify.set "joinedAt", getTime()
|
||||
@ -49,6 +49,8 @@ Template.header.events
|
||||
alert "settings"
|
||||
"click .raiseHand": (event) ->
|
||||
Meteor.call('userRaiseHand', @id)
|
||||
"click .whiteboardIcon": (event) ->
|
||||
toggleWhiteBoard()
|
||||
|
||||
Template.makeButton.rendered = ->
|
||||
$('button[rel=tooltip]').tooltip()
|
||||
|
@ -56,6 +56,13 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<!-- whiteboard toggle -->
|
||||
{{#if getInSession "display_whiteboard"}}
|
||||
{{> makeButton btn_class="navbarIconToggleActive whiteboardIcon navbar-brand" i_class="pencil" _id=_id rel="tooltip" data_placement="bottom" title="Hide Whiteboard"}}
|
||||
{{else}}
|
||||
{{> makeButton id=userId btn_class="whiteboardIcon navbar-brand" i_class="pencil" _id=_id rel="tooltip" data_placement="bottom" title="Show Whiteboard"}}
|
||||
{{/if}}
|
||||
|
||||
{{#if user.raise_hand}}
|
||||
{{> makeButton id=userId btn_class="navbarIconToggleActive navbar-brand" i_class="hand-up" isDisabled="disabled" rel="tooltip" data_placement="bottom" title="Your hand is raised"}}
|
||||
{{else}}
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template name="whiteboard">
|
||||
{{#if getInSession "display_whiteboard"}}
|
||||
<p>The whiteboard</p>
|
||||
{{/if}}
|
||||
<div id="whiteboard-paper" style="position: fixed; top: 10%; left: 30%;">
|
||||
<p>
|
||||
{{png}}
|
||||
</p>
|
||||
</div>
|
||||
<p>The whiteboard</p>
|
||||
<div id="whiteboard-paper" style="position: fixed; top: 10%; left: 30%;">
|
||||
<p>
|
||||
{{png}}
|
||||
</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
|
@ -345,7 +345,7 @@ class @WhiteboardPaperModel
|
||||
# Updated a shape `shape` with the data in `data`.
|
||||
# TODO: check if the objects exist before calling update, if they don't they should be created
|
||||
updateShape: (shape, data) ->
|
||||
alert "updating a " + shape
|
||||
# alert "updating a " + shape
|
||||
switch shape
|
||||
when "line"
|
||||
@currentLine.update(data)
|
||||
@ -362,7 +362,7 @@ class @WhiteboardPaperModel
|
||||
|
||||
# Make a shape `shape` with the data in `data`.
|
||||
makeShape: (shape, data) ->
|
||||
alert "making a " + shape
|
||||
# alert "making a " + shape
|
||||
tool = null
|
||||
switch shape
|
||||
when "path", "line"
|
||||
|
Loading…
Reference in New Issue
Block a user