From 8325efdcfe078982094699469221b7bfe6ce0eed Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Sat, 17 Jan 2015 04:36:55 +0000 Subject: [PATCH] chat: fix open/toggle chat window --- public/javascripts/application.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/javascripts/application.js b/public/javascripts/application.js index f206c69..2a8120d 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -567,11 +567,17 @@ function display_notice(message) { setTimeout(function() { $noticeBox.fadeOut('fast'); }, 5000); } -function toggle_chat_window(self_link, anchor) { +function open_chat_window(self_link, anchor) { + jQuery('#chat').addClass('opened'); + jQuery('#chat-label').removeClass('opened'); + jQuery("#chat" ).trigger('opengroup', anchor); + return false; +} + +function toggle_chat_window(self_link) { if(jQuery('#conversations .conversation').length == 0) jQuery('.buddies a').first().click(); jQuery('#chat').toggleClass('opened'); jQuery('#chat-label').toggleClass('opened'); - if(anchor) jQuery("#chat" ).trigger('opengroup', anchor); return false; } -- libgit2 0.21.2