[Git][noosfero/noosfero][master] 2 commits: Resets notification badge when chat is opened
Rodrigo Souto
gitlab at mg.gitlab.com
Fri Jan 26 11:56:29 BRST 2018
Rodrigo Souto pushed to branch master at Noosfero / noosfero
Commits:
8d6fadb2 by Gabriel Silva at 2018-01-24T15:44:21-02:00
Resets notification badge when chat is opened
Signed-off-by: Gabriel Silva <gabriel93.silva at gmail.com>
- - - - -
c8b8b461 by Rodrigo Souto at 2018-01-26T13:56:09+00:00
Merge branch 'chat_badge' into 'master'
Resets notification badge when chat is opened
See merge request noosfero/noosfero!1383
- - - - -
1 changed file:
- public/javascripts/chat.js
Changes:
=====================================
public/javascripts/chat.js
=====================================
--- a/public/javascripts/chat.js
+++ b/public/javascripts/chat.js
@@ -924,6 +924,12 @@ jQuery(function($) {
}
}
+ function resetNotificationCounter() {
+ Jabber.favico.reset();
+ Jabber.notification_counter = 0;
+ document.title = Jabber.window_title;
+ }
+
$('.title-bar a').click(function() {
$(this).parents('.status-group').find('.buddies').toggle('fast');
return false;
@@ -972,6 +978,7 @@ jQuery(function($) {
$('#chat-label').click(function(){
toggle_chat_window();
+ resetNotificationCounter();
$.post('/chat/toggle');
});
@@ -992,12 +999,10 @@ jQuery(function($) {
});
window.onfocus = function() {
- Jabber.window_visibility = true
- Jabber.favico.reset();
- Jabber.notification_counter = 0;
- document.title = Jabber.window_title;
+ Jabber.window_visibility = true;
+ resetNotificationCounter();
};
- window.onblur = function() {Jabber.window_visibility = false};
+ window.onblur = function() { Jabber.window_visibility = false };
//FIXME Workaround to solve availability problems
function updateAvailabilities() {
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/d29855c7a12ed57415fbc529900fd9972ae838ad...c8b8b46146bf14960b3a88c86c99bbe02fdb5af9
---
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/d29855c7a12ed57415fbc529900fd9972ae838ad...c8b8b46146bf14960b3a88c86c99bbe02fdb5af9
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180126/1cf6a646/attachment-0001.html>
More information about the Noosfero-dev
mailing list