Hide the unread counter until needed

master
Daniel Berteaud 11 years ago
parent 20d03ec012
commit f4ab4626e9
  1. 3
      public/css/vroom.css
  2. 4
      public/js/vroom.js

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

@ -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

Loading…
Cancel
Save