Hide the unread counter until needed

This commit is contained in:
Daniel Berteaud 2014-05-23 14:01:05 +02:00
parent 20d03ec012
commit f4ab4626e9
2 changed files with 5 additions and 2 deletions

View File

@ -109,6 +109,9 @@
top: 0px;
display: none;
}
#unreadMsg {
display: none;
}
.actionMute:before{
font-family: 'Glyphicons Halflings';
content: "\e036";

View File

@ -702,7 +702,7 @@ function initVroom(room) {
if ($('#chatDropdown').hasClass('collapsed')){
$('#chatDropdown').addClass('btn-danger');
playSound('newmsg.mp3');
$('#unreadMsg').text(parseInt($('#unreadMsg').text())+1);
$('#unreadMsg').text(parseInt($('#unreadMsg').text())+1).show(1000);
}
newChatMessage(peer.id,data.payload);
}
@ -1411,7 +1411,7 @@ function initVroom(room) {
// and reset the unread msg counter
$('#chatDropdown').click(function (){
$('#chatDropdown').removeClass('btn-danger');
$('#unreadMsg').text('0');
$('#unreadMsg').text('0').hide(1000);
});
// The input is a textarea, trigger a submit
// when the user hit enter, unless shift is pressed