aboutsummaryrefslogtreecommitdiff
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
parent3e1e90ef327102f5942884b8ba517971a47b2673 (diff)
downloadtrackermap-server-1e39c3dbf2078dbe9a99bdf25b944fbe05b8a40d.tar.gz
trackermap-server-1e39c3dbf2078dbe9a99bdf25b944fbe05b8a40d.tar.bz2
trackermap-server-1e39c3dbf2078dbe9a99bdf25b944fbe05b8a40d.zip
turn the toggle button into mute button
default is muted
-rw-r--r--web/app/controller/Root.js9
-rw-r--r--web/app/view/Devices.js10
-rw-r--r--web/l10n/en.json2
3 files changed, 11 insertions, 10 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'));
}
}
}
diff --git a/web/app/view/Devices.js b/web/app/view/Devices.js
index 212aa7f96..63569bd95 100644
--- a/web/app/view/Devices.js
+++ b/web/app/view/Devices.js
@@ -58,18 +58,18 @@ Ext.define('Traccar.view.Devices', {
}, {
xtype: 'tbfill'
},{
- id: 'showNotificationsButton',
- glyph: 'xf0a2@FontAwesome',
- tooltip: Strings.showNotifications,
+ id: 'nuteButton',
+ glyph: 'xf1f7@FontAwesome',
+ tooltip: Strings.nuteButton,
tooltipType: 'title',
pressed : true,
enableToggle: true,
listeners: {
toggle: function (button, pressed) {
if (pressed) {
- button.setGlyph('xf0a2@FontAwesome');
- } else {
button.setGlyph('xf1f7@FontAwesome');
+ } else {
+ button.setGlyph('xf0a2@FontAwesome');
}
},
scope: this
diff --git a/web/l10n/en.json b/web/l10n/en.json
index d8dd016b5..4e0f42fe3 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -19,7 +19,7 @@
"sharedSearch": "Search",
"sharedGeofence": "Geofence",
"sharedGeofences": "Geofences",
- "showNotifications": "Show Notifications",
+ "nuteButton": "Mute",
"sharedNotifications": "Notifications",
"sharedAttributes": "Attributes",
"sharedAttribute": "Attribute",