diff --git a/labs/meteor-client/.gitignore b/labs/meteor-client/.gitignore index f9ced93c2fe69c848c5eab7e324546ae6dd604f6..dd1f16948459ab3ceb74e42ccfdc79253c6f541e 100644 --- a/labs/meteor-client/.gitignore +++ b/labs/meteor-client/.gitignore @@ -1 +1,5 @@ packages +build +npm-debug.log +../node_modules/hiredis/ +../node_modules/redis/ diff --git a/labs/meteor-client/client/main.coffee b/labs/meteor-client/client/main.coffee index 03cfe1f43854619ea868d620328513aaac2fdd76..1ec3a7367040f4760d623ef39018b31edd22dfc9 100755 --- a/labs/meteor-client/client/main.coffee +++ b/labs/meteor-client/client/main.coffee @@ -9,6 +9,12 @@ Meteor.startup -> Session.setDefault "joinedAt", getTime() Session.setDefault "isSharingAudio", false +Template.main.events + 'click': (event) -> + console.log "clicking" + height = $('#chatScrollWindow')[0].scrollHeight + $('#chatScrollWindow').scrollTop(height) + Template.header.events "click .usersListIcon": (event) -> toggleUsersList() diff --git a/labs/meteor-client/client/views/chat/chat_bar.coffee b/labs/meteor-client/client/views/chat/chat_bar.coffee index 6a9a2129cd213e1b54fc47aeb053f14c7653a504..c4a79d2a76877b3565556b075380f0099ced2de7 100755 --- a/labs/meteor-client/client/views/chat/chat_bar.coffee +++ b/labs/meteor-client/client/views/chat/chat_bar.coffee @@ -15,18 +15,12 @@ Template.messageBar.helpers }) isUserInPrivateChat: -> # true if user is in public chat - Session.get('inChatWith') isnt "PUBLIC_CHAT" - -# Must be be called when template is finished rendering or will not work -Template.messageBar.rendered = -> # Scroll down the messages box the amount of its height, which places it at the bottom - height = $('#chatScrollWindow').height() - $('#chatScrollWindow').scrollTop(height) + not Session.equals('inChatWith', "PUBLIC_CHAT") Template.tabButtons.events 'click .tab': (event) -> # $('.tab').removeClass('active') - 'click .publicChatTab': (event) -> Session.set 'display_chatPane', true Session.set 'inChatWith', 'PUBLIC_CHAT' @@ -59,7 +53,6 @@ Template.tabButtons.events Meteor.ChatTabs.update({_id: toUpdate._id}, {$set: 'isActive':true}) event.stopPropogation() - Template.chatInput.events 'keypress #newMessageInput': (event) -> # user pressed a button inside the chatbox if event.which is 13 # Check for pressing enter to submit message @@ -112,32 +105,20 @@ Template.optionsBar.events Meteor.ChatTabs.insert({belongsTo: @userId, name: getUsersName(), isActive: false, class: "privateChatTab", 'userId': currUserId}) Session.set 'display_chatPane', true Session.set "inChatWith", @userId - # $('.tab').removeClass('active') - # Todo: - # just need a way to make the newly created tab active - # don't know how to do that right here since it doesn't get created here - # once that's handled, private chat is essentially done - # $("#tabButtonContainer").append("<li>fsdfdsf| </li>") - - Template.tabButtons.helpers getChatbarTabs: -> - console.log "displaying tabs" t = Meteor.ChatTabs.find({}).fetch() # console.log JSON.stringify t t makeTabButton: -> # create tab button for private chat or other such as options - console.log "#{@name} is " + if @isActive then "active" else "not active" button = '<li ' button += 'class="' button += 'active ' if @isActive button += "#{@class} tab\"><a href=\"#\" data-toggle=\"tab\">#{@name}" button += ' <button class="close closeTab" type="button" >×</button>' if @name isnt 'Public' and @name isnt 'Options' button += '</a></li>' - console.log "and here it is the button" - console.log button button diff --git a/labs/meteor-client/packages/.gitignore b/labs/meteor-client/packages/.gitignore index 1a97b8900a65a1af46908afe8fd5c25581922f3c..d545592e9d49bc40a3177b80d2a01f1b2aa87d5a 100644 --- a/labs/meteor-client/packages/.gitignore +++ b/labs/meteor-client/packages/.gitignore @@ -1,3 +1,4 @@ /bootstrap-3 /iron-router /blaze-layout +/npm