Skip to content

Commit

Permalink
Removal of bell number 0 when there are no notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardolauryel committed Apr 4, 2019
1 parent 0ed5657 commit c791e71
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/notify/assets/public/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ function timerAuths() {
success: function(number) {
if(number>0) $("#not_number").removeClass("label-primary").addClass("label-warning");
else $("#not_number").removeClass("label-warning").addClass("label-primary");
$("#not_number").html(number);
if(number != 0)
$("#not_number").html(number);
t = setTimeout(function() {
timerAuths()
}, 60000);
Expand Down Expand Up @@ -44,8 +45,8 @@ $(document).ready(function() {
url: baseUrl + '/notify/service/get-count',
success: function(number) {
if(number>0) $("#not_number").removeClass("label-primary").addClass("label-warning");
else $("#not_number").removeClass("label-warning").addClass("label-primary");
$("#not_number").html(number);
else $("#not_number").removeClass("label-warning");
$("#not_number").html("");
}
});

Expand Down

0 comments on commit c791e71

Please sign in to comment.