diff options
author | Abyss777 <abyss@fox5.ru> | 2017-08-14 12:26:02 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-08-14 12:26:02 +0500 |
commit | 01af5f520e24a33d7e22523d8ed11e9f14a19516 (patch) | |
tree | bbb289a569e44b7886bb0d93adb265139a3d3884 /web | |
parent | c52d923d60815fcc6c1e9592edbcd578caf1147c (diff) | |
download | trackermap-web-01af5f520e24a33d7e22523d8ed11e9f14a19516.tar.gz trackermap-web-01af5f520e24a33d7e22523d8ed11e9f14a19516.tar.bz2 trackermap-web-01af5f520e24a33d7e22523d8ed11e9f14a19516.zip |
Implement disable Calendars
Diffstat (limited to 'web')
-rw-r--r-- | web/app/store/ServerAttributes.js | 4 | ||||
-rw-r--r-- | web/app/store/UserAttributes.js | 4 | ||||
-rw-r--r-- | web/app/view/SettingsMenuController.js | 3 | ||||
-rw-r--r-- | web/app/view/dialog/Geofence.js | 1 | ||||
-rw-r--r-- | web/app/view/dialog/GeofenceController.js | 5 | ||||
-rw-r--r-- | web/app/view/edit/UsersController.js | 2 | ||||
-rw-r--r-- | web/l10n/en.json | 1 |
7 files changed, 19 insertions, 1 deletions
diff --git a/web/app/store/ServerAttributes.js b/web/app/store/ServerAttributes.js index f4e2a848..109b09e0 100644 --- a/web/app/store/ServerAttributes.js +++ b/web/app/store/ServerAttributes.js @@ -63,5 +63,9 @@ Ext.define('Traccar.store.ServerAttributes', { key: 'ui.disableComputedAttributes', name: Strings.attributeUiDisableComputedAttributes, valueType: 'boolean' + }, { + key: 'ui.disableCalendars', + name: Strings.attributeUiDisableCalendars, + valueType: 'boolean' }] }); diff --git a/web/app/store/UserAttributes.js b/web/app/store/UserAttributes.js index dbee1ed8..a004a54d 100644 --- a/web/app/store/UserAttributes.js +++ b/web/app/store/UserAttributes.js @@ -95,5 +95,9 @@ Ext.define('Traccar.store.UserAttributes', { key: 'ui.disableComputedAttributes', name: Strings.attributeUiDisableComputedAttributes, valueType: 'boolean' + }, { + key: 'ui.disableCalendars', + name: Strings.attributeUiDisableCalendars, + valueType: 'boolean' }] }); diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js index cc17ca3a..f459da7a 100644 --- a/web/app/view/SettingsMenuController.js +++ b/web/app/view/SettingsMenuController.js @@ -55,7 +55,8 @@ Ext.define('Traccar.view.SettingsMenuController', { this.lookupReference('settingsGroupsButton').setHidden(false); this.lookupReference('settingsGeofencesButton').setHidden(false); this.lookupReference('settingsNotificationsButton').setHidden(false); - this.lookupReference('settingsCalendarsButton').setHidden(false); + this.lookupReference('settingsCalendarsButton').setHidden( + Traccar.app.getBooleanAttributePreference('ui.disableCalendars')); this.lookupReference('settingsDriversButton').setHidden(Traccar.app.isVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers')); } diff --git a/web/app/view/dialog/Geofence.js b/web/app/view/dialog/Geofence.js index 93f17de5..bed20d38 100644 --- a/web/app/view/dialog/Geofence.js +++ b/web/app/view/dialog/Geofence.js @@ -46,6 +46,7 @@ Ext.define('Traccar.view.dialog.Geofence', { fieldLabel: Strings.sharedDescription }, { xtype: 'combobox', + reference: 'calendarCombo', name: 'calendarId', store: 'Calendars', queryMode: 'local', diff --git a/web/app/view/dialog/GeofenceController.js b/web/app/view/dialog/GeofenceController.js index 9fdad61b..2f96987d 100644 --- a/web/app/view/dialog/GeofenceController.js +++ b/web/app/view/dialog/GeofenceController.js @@ -34,6 +34,11 @@ Ext.define('Traccar.view.dialog.GeofenceController', { } }, + init: function () { + this.lookupReference('calendarCombo').setHidden( + Traccar.app.getBooleanAttributePreference('ui.disableCalendars')); + }, + saveArea: function (value) { this.lookupReference('areaField').setValue(value); }, diff --git a/web/app/view/edit/UsersController.js b/web/app/view/edit/UsersController.js index 1e7238a9..42fc0cd9 100644 --- a/web/app/view/edit/UsersController.js +++ b/web/app/view/edit/UsersController.js @@ -45,6 +45,8 @@ Ext.define('Traccar.view.edit.UsersController', { Traccar.app.getBooleanAttributePreference('ui.disableDrivers')); this.lookupReference('userAttributesButton').setHidden( Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes')); + this.lookupReference('userCalendarsButton').setHidden( + Traccar.app.getBooleanAttributePreference('ui.disableCalendars')); }, onEditClick: function () { diff --git a/web/l10n/en.json b/web/l10n/en.json index 8eba834c..69df1563 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -92,6 +92,7 @@ "attributeUiDisableVehicleFetures": "UI: Disable Vehicle Fetures", "attributeUiDisableDrivers": "UI: Disable Drivers", "attributeUiDisableComputedAttributes": "UI: Disable Computed Attributes", + "attributeUiDisableCalendars": "UI: Disable Calendars", "errorTitle": "Error", "errorGeneral": "Invalid parameters or constraints violation", "errorConnection": "Connection error", |