From 1e39c3dbf2078dbe9a99bdf25b944fbe05b8a40d Mon Sep 17 00:00:00 2001 From: ninioe Date: Sun, 24 Jul 2016 12:14:40 +0300 Subject: turn the toggle button into mute button default is muted --- web/app/controller/Root.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'web/app/controller') diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index c8e708c09..7070c48b0 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -99,8 +99,9 @@ Ext.define('Traccar.controller.Root', { this.beepSound.play(); }, - showNotificationsSelected: function () { - return Ext.getCmp('showNotificationsButton') && Ext.getCmp('showNotificationsButton').pressed; + mutePressed: function () { + var muteButton = Ext.getCmp('nuteButton'); + return muteButton && !muteButton.pressed; }, asyncUpdate: function (first) { @@ -192,10 +193,10 @@ Ext.define('Traccar.controller.Root', { } device = Ext.getStore('Devices').getById(array[i].deviceId); if (typeof device !== 'undefined') { - if (self.showNotificationsSelected()) { + if (self.mutePressed()) { self.beep(); - Ext.toast(text, device.get('name')); } + Ext.toast(text, device.get('name')); } } } -- cgit v1.2.3