aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller/Root.js
diff options
context:
space:
mode:
authorninioe <ninioe@gmail.com>2016-07-24 12:14:40 +0300
committerninioe <ninioe@gmail.com>2016-07-24 12:14:40 +0300
commit1e39c3dbf2078dbe9a99bdf25b944fbe05b8a40d (patch)
treebc1e2171b25332d58e8d2f2cca92e2eeff004ef5 /web/app/controller/Root.js
parent3e1e90ef327102f5942884b8ba517971a47b2673 (diff)
downloadtraccar-server-1e39c3dbf2078dbe9a99bdf25b944fbe05b8a40d.tar.gz
traccar-server-1e39c3dbf2078dbe9a99bdf25b944fbe05b8a40d.tar.bz2
traccar-server-1e39c3dbf2078dbe9a99bdf25b944fbe05b8a40d.zip
turn the toggle button into mute button
default is muted
Diffstat (limited to 'web/app/controller/Root.js')
-rw-r--r--web/app/controller/Root.js9
1 files changed, 5 insertions, 4 deletions
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'));
}
}
}