aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-11-01 16:56:44 +1300
committerGitHub <noreply@github.com>2017-11-01 16:56:44 +1300
commitb36bb685ff31b06c7f50e660aebd3a69db5de5d7 (patch)
treed9c80566060b7f61cd6acc683dac8efd7f3109e8 /web
parent2fd7c0f03ec9a4a3734a0aba38d56f59fddc6e48 (diff)
parent48631f90b2e4718bf7c2ab8312424647b63f4925 (diff)
downloadetbsa-traccar-web-b36bb685ff31b06c7f50e660aebd3a69db5de5d7.tar.gz
etbsa-traccar-web-b36bb685ff31b06c7f50e660aebd3a69db5de5d7.tar.bz2
etbsa-traccar-web-b36bb685ff31b06c7f50e660aebd3a69db5de5d7.zip
Merge pull request #615 from Abyss777/disable_events
Add attribute to hide Events panel
Diffstat (limited to 'web')
-rw-r--r--web/app/store/CommonUserAttributes.js4
-rw-r--r--web/app/view/Main.js1
-rw-r--r--web/app/view/MainController.js1
-rw-r--r--web/app/view/map/MapController.js3
-rw-r--r--web/l10n/en.json1
5 files changed, 9 insertions, 1 deletions
diff --git a/web/app/store/CommonUserAttributes.js b/web/app/store/CommonUserAttributes.js
index eadb1c5..c2c2942 100644
--- a/web/app/store/CommonUserAttributes.js
+++ b/web/app/store/CommonUserAttributes.js
@@ -43,6 +43,10 @@ Ext.define('Traccar.store.CommonUserAttributes', {
name: Strings.attributeUiDisableReport,
valueType: 'boolean'
}, {
+ key: 'ui.disableEvents',
+ name: Strings.attributeUiDisableEvents,
+ valueType: 'boolean'
+ }, {
key: 'ui.disableVehicleFetures',
name: Strings.attributeUiDisableVehicleFetures,
valueType: 'boolean'
diff --git a/web/app/view/Main.js b/web/app/view/Main.js
index 2d251a5..0504245 100644
--- a/web/app/view/Main.js
+++ b/web/app/view/Main.js
@@ -75,6 +75,7 @@ Ext.define('Traccar.view.Main', {
}, {
region: 'east',
xtype: 'eventsView',
+ reference: 'eventsView',
width: Traccar.Style.deviceWidth,
collapsed: true,
titleCollapse: true,
diff --git a/web/app/view/MainController.js b/web/app/view/MainController.js
index 126d9af..7cd0305 100644
--- a/web/app/view/MainController.js
+++ b/web/app/view/MainController.js
@@ -21,5 +21,6 @@ Ext.define('Traccar.view.MainController', {
init: function () {
this.lookupReference('reportView').setHidden(Traccar.app.getBooleanAttributePreference('ui.disableReport'));
+ this.lookupReference('eventsView').setHidden(Traccar.app.getBooleanAttributePreference('ui.disableEvents'));
}
});
diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js
index 75796f9..38b2340 100644
--- a/web/app/view/map/MapController.js
+++ b/web/app/view/map/MapController.js
@@ -46,7 +46,8 @@ Ext.define('Traccar.view.map.MapController', {
this.callParent();
this.lookupReference('showReportsButton').setVisible(
Traccar.app.isMobile() && !Traccar.app.getBooleanAttributePreference('ui.disableReport'));
- this.lookupReference('showEventsButton').setVisible(Traccar.app.isMobile());
+ this.lookupReference('showEventsButton').setVisible(
+ Traccar.app.isMobile() && !Traccar.app.getBooleanAttributePreference('ui.disableEvents'));
},
showReports: function () {
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 29a0da5..0744a7d 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -95,6 +95,7 @@
"attributeMailSmtpUsername": "Mail: SMTP Username",
"attributeMailSmtpPassword": "Mail: SMTP Password",
"attributeUiDisableReport": "UI: Disable Report",
+ "attributeUiDisableEvents": "UI: Disable Events",
"attributeUiDisableVehicleFetures": "UI: Disable Vehicle Fetures",
"attributeUiDisableDrivers": "UI: Disable Drivers",
"attributeUiDisableComputedAttributes": "UI: Disable Computed Attributes",