Tidy up, more chat UI, log out user info to check for duplicates'

This commit is contained in:
perroned 2014-06-25 11:51:16 -07:00
parent efb2177b2b
commit 7ac36b1cf6
6 changed files with 35 additions and 12 deletions

View File

@ -5,13 +5,9 @@ Handlebars.registerHelper "getInSession", (k) -> Session.get k
@setInSession = (k, v) -> Session.set k, v
@getInSession = (k) -> Session.get k
# retrieve account for selected user, or the first mod account if nothing is selected
# global function
# retrieve account for selected user
@getCurrentUserFromSession = ->
id = Session.get("userId")
u = Meteor.Users.findOne("userId": id)
#console.log Meteor.Users
u
Meteor.Users.findOne("userId": Session.get("userId"))
# retrieve account for selected user
Handlebars.registerHelper "getCurrentUser", =>

View File

@ -24,3 +24,8 @@ Template.header.events
"click .settingsIcon": (event) ->
alert "settings"
Handlebars.registerHelper "doFinalStuff", ->
console.log "-----Doing Final Stuff-----"
userFields = ("Username: #{entry.user.name} - _id: #{entry._id}" for entry in Meteor.Users.find().fetch()) # comprehension is awesome!
console.log entry for entry in userFields
console.log "---------------------------"

View File

@ -9,6 +9,7 @@
{{> whiteboard}}
</div>
</body>
{{doFinalStuff}}
</template>
<template name="header">

View File

@ -122,3 +122,18 @@
text-decoration: underline;
}
}
.private-chat-user-entry :hover {
font-size:12px;
}
.private-chat-user-entry :hover {
background: #0099FF;
font-style:italic;
}
.private-chat-user-box {
border: solid 1px grey;
width: 90%;
padding: 5px;
}

View File

@ -40,6 +40,17 @@
<template name="optionsBar">
<div>
<p>Select a person to chat with privately</p>
<div class="private-chat-user-box">
<table class="table table-hover">
<tbody class="private-chat-user-entry">
{{#each getUsersInMeeting}}
<tr>
{{user.name}}
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
</template>

View File

@ -4,12 +4,7 @@ Template.usersList.helpers
getMeeting: ->
m = Meetings.findOne {meetingName: Session.get("meetingId")}
if m?
#console.log m
m
else
#console.log "nothing"
null
if m? then m else null
getMeetingSize: ->
m = Meteor.Users.find({meetingId: Session.get("meetingId")}).fetch()