Merge branch 'hotfix/4.1.6'

This commit is contained in:
yuri
2016-06-14 11:44:55 +03:00
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -50,7 +50,9 @@ Espo.define('views/notification/badge', 'view', function (Dep) {
},
setup: function () {
this.soundPath = this.getConfig().get('notificationSound') || this.soundPath;
this.soundPath = this.getBasePath() + (this.getConfig().get('notificationSound') || this.soundPath);
this.notificationSoundsDisabled = this.getConfig().get('notificationSoundsDisabled');
this.once('remove', function () {
if (this.timeout) {
@@ -105,6 +107,8 @@ Espo.define('views/notification/badge', 'view', function (Dep) {
},
playSound: function () {
if (this.notificationSoundsDisabled) return;
var html = '' +
'<audio autoplay="autoplay">'+
'<source src="' + this.soundPath + '.mp3" type="audio/mpeg" />'+
+2
View File
@@ -48,6 +48,8 @@ Espo.define('views/popup-notification', 'view', function (Dep) {
this.notificationSoundsDisabled = this.getConfig().get('notificationSoundsDisabled');
this.soundPath = this.getBasePath() + (this.getConfig().get('popupNotificationSound') || this.soundPath);
this.on('render', function () {
$(containerSelector).remove();