Skip to content

Commit

Permalink
Alert audio, checking DOM ready
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeriolino authored Feb 15, 2019
1 parent 014963c commit f5f0fbb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Resources/public/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ var App = App || {};
if (self.atendimentos.length > 0) {
document.title = "(" + self.atendimentos.length + ") " + defaultTitle;
if (estavaVazio) {
document.getElementById("alert").play();
var audio = document.getElementById("alert");
if (audio) {
audio.play();
}
App.Notification.show('Atendimento', 'Novo atendimento na fila');
}
}
Expand Down

0 comments on commit f5f0fbb

Please sign in to comment.