aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-25 08:40:40 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-25 08:40:40 +0500
commit97ea2529c8911d389ee1a26cc6ae43ae7dbc54fb (patch)
tree871b9371a514e2dc5d6798ca9dc13c1b3ba462be /web
parent37c1c6a786e4ca385e373c645654663e38701e7c (diff)
downloadtrackermap-web-97ea2529c8911d389ee1a26cc6ae43ae7dbc54fb.tar.gz
trackermap-web-97ea2529c8911d389ee1a26cc6ae43ae7dbc54fb.tar.bz2
trackermap-web-97ea2529c8911d389ee1a26cc6ae43ae7dbc54fb.zip
Change "Mute" logic
Diffstat (limited to 'web')
-rw-r--r--web/app/controller/Root.js8
-rw-r--r--web/app/view/Map.js21
-rw-r--r--web/l10n/en.json2
3 files changed, 9 insertions, 22 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index e8d4f0ff..673f7fb3 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -114,9 +114,9 @@ Ext.define('Traccar.controller.Root', {
this.beepSound.play();
},
- mutePressed: function () {
- var muteButton = Ext.getCmp('muteButton');
- return muteButton && !muteButton.pressed;
+ soundPressed: function () {
+ var soundButton = Ext.getCmp('soundButton');
+ return soundButton && soundButton.pressed;
},
removeUrlParameter: function (param) {
@@ -231,7 +231,7 @@ Ext.define('Traccar.controller.Root', {
}
device = Ext.getStore('Devices').getById(array[i].deviceId);
if (device) {
- if (this.mutePressed()) {
+ if (this.soundPressed()) {
this.beep();
}
Ext.toast(text, device.get('name'), 'br');
diff --git a/web/app/view/Map.js b/web/app/view/Map.js
index f9bb6250..a3879ab9 100644
--- a/web/app/view/Map.js
+++ b/web/app/view/Map.js
@@ -71,23 +71,10 @@ Ext.define('Traccar.view.Map', {
stateId: 'device-follow-button',
toggleHandler: 'onFollowClick'
}, {
- id: 'muteButton',
- glyph: 'xf1f7@FontAwesome',
- tooltip: Strings.sharedMute,
- pressed: true,
- stateId: 'mute-button',
- listeners: {
- toggle: function (button, pressed) {
- if (pressed) {
- button.setGlyph('xf1f7@FontAwesome');
- } else {
- button.setGlyph('xf0a2@FontAwesome');
- }
- }
- },
- applyState: function (state) {
- this.toggle(state.pressed);
- }
+ id: 'soundButton',
+ glyph: 'xf0a2@FontAwesome',
+ tooltip: Strings.sharedSound,
+ stateId: 'sound-button'
}, {
xtype: 'settingsMenu',
enableToggle: false
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 107f970d..c8f8d273 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -29,7 +29,7 @@
"sharedAttributes": "Attributes",
"sharedAttribute": "Attribute",
"sharedArea": "Area",
- "sharedMute": "Mute",
+ "sharedSound": "Play Sound",
"sharedType": "Type",
"sharedDistance": "Distance",
"sharedHourAbbreviation": "h",