Commit 8325efdcfe078982094699469221b7bfe6ce0eed
1 parent
cd6baa93
Exists in
master
and in
27 other branches
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,11 +567,17 @@ function display_notice(message) { | ||
| 567 | setTimeout(function() { $noticeBox.fadeOut('fast'); }, 5000); | 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 | if(jQuery('#conversations .conversation').length == 0) jQuery('.buddies a').first().click(); | 578 | if(jQuery('#conversations .conversation').length == 0) jQuery('.buddies a').first().click(); |
| 572 | jQuery('#chat').toggleClass('opened'); | 579 | jQuery('#chat').toggleClass('opened'); |
| 573 | jQuery('#chat-label').toggleClass('opened'); | 580 | jQuery('#chat-label').toggleClass('opened'); |
| 574 | - if(anchor) jQuery("#chat" ).trigger('opengroup', anchor); | ||
| 575 | return false; | 581 | return false; |
| 576 | } | 582 | } |
| 577 | 583 |