still dealing with whitespace issues

This commit is contained in:
Anton Georgiev 2014-09-18 23:02:53 +00:00
parent 77a383f497
commit 4381b0528f

View File

@ -48,6 +48,7 @@ Template.chatbar.helpers
getFormattedMessagesForChat: () ->
friend = chattingWith = getInSession('inChatWith') # the recipient(s) of the messages
after = before = greeting = []
if chattingWith is 'PUBLIC_CHAT' # find all public messages
before = Meteor.Chat.find({'message.chat_type': chattingWith, 'message.from_time': {$lt: String(getInSession("joinedAt"))}}).fetch()
after = Meteor.Chat.find({'message.chat_type': chattingWith, 'message.from_time': {$gt: String(getInSession("joinedAt"))}}).fetch()
@ -56,7 +57,7 @@ Template.chatbar.helpers
'message':
'message': Template.chatbar.getChatGreeting(),
'from_username': 'System',
'from_time': getTime() # this should be using the time when the user entered
'from_time': getTime()
'from_color': '0x3399FF' # A nice blue in hex
]
else
@ -144,8 +145,8 @@ Template.tabButtons.helpers
tabs = makeTabs()
makeTabButton: -> # create tab button for private chat or other such as options
safeClass = @class.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
safeName = @name.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
safeClass = @class.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;')
safeName = @name.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;')
button = '<li '
button += 'class="'