Commit 8325efdcfe078982094699469221b7bfe6ce0eed

Authored by Rodrigo Souto
1 parent cd6baa93

chat: fix open/toggle chat window

Showing 1 changed file with 8 additions and 2 deletions   Show diff stats
public/javascripts/application.js
... ... @@ -567,11 +567,17 @@ function display_notice(message) {
567 567 setTimeout(function() { $noticeBox.fadeOut('fast'); }, 5000);
568 568 }
569 569  
570   -function toggle_chat_window(self_link, anchor) {
  570 +function open_chat_window(self_link, anchor) {
  571 + jQuery('#chat').addClass('opened');
  572 + jQuery('#chat-label').removeClass('opened');
  573 + jQuery("#chat" ).trigger('opengroup', anchor);
  574 + return false;
  575 +}
  576 +
  577 +function toggle_chat_window(self_link) {
571 578 if(jQuery('#conversations .conversation').length == 0) jQuery('.buddies a').first().click();
572 579 jQuery('#chat').toggleClass('opened');
573 580 jQuery('#chat-label').toggleClass('opened');
574   - if(anchor) jQuery("#chat" ).trigger('opengroup', anchor);
575 581 return false;
576 582 }
577 583  
... ...