diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-27 17:06:57 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-27 17:06:57 +1200 |
commit | 7e1ed7fee9ec411df0d198d10dc1a7f8e0e6eaf9 (patch) | |
tree | 8bb2e2bcf0f16223b3feb031dc537507f3f4ae3f /web/app | |
parent | bc4913524b5202b0244fe636d6d59b269fef2e1d (diff) | |
download | etbsa-traccar-web-7e1ed7fee9ec411df0d198d10dc1a7f8e0e6eaf9.tar.gz etbsa-traccar-web-7e1ed7fee9ec411df0d198d10dc1a7f8e0e6eaf9.tar.bz2 etbsa-traccar-web-7e1ed7fee9ec411df0d198d10dc1a7f8e0e6eaf9.zip |
Rename admin to administrator
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/model/User.js | 2 | ||||
-rw-r--r-- | web/app/view/DeviceMenuController.js | 2 | ||||
-rw-r--r-- | web/app/view/SettingsMenuController.js | 2 | ||||
-rw-r--r-- | web/app/view/StateController.js | 2 | ||||
-rw-r--r-- | web/app/view/dialog/DeviceController.js | 2 | ||||
-rw-r--r-- | web/app/view/dialog/User.js | 2 | ||||
-rw-r--r-- | web/app/view/dialog/UserController.js | 4 | ||||
-rw-r--r-- | web/app/view/edit/DevicesController.js | 8 | ||||
-rw-r--r-- | web/app/view/edit/Users.js | 4 | ||||
-rw-r--r-- | web/app/view/edit/UsersController.js | 4 |
10 files changed, 16 insertions, 16 deletions
diff --git a/web/app/model/User.js b/web/app/model/User.js index 5232c9f..76f2a36 100644 --- a/web/app/model/User.js +++ b/web/app/model/User.js @@ -41,7 +41,7 @@ Ext.define('Traccar.model.User', { name: 'readonly', type: 'boolean' }, { - name: 'admin', + name: 'administrator', type: 'boolean' }, { name: 'map', diff --git a/web/app/view/DeviceMenuController.js b/web/app/view/DeviceMenuController.js index e50b0e0..f191756 100644 --- a/web/app/view/DeviceMenuController.js +++ b/web/app/view/DeviceMenuController.js @@ -37,7 +37,7 @@ Ext.define('Traccar.view.DeviceMenuController', { Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes')); this.lookupReference('menuCommandsButton').setHidden(Traccar.app.getPreference('limitCommands', false)); this.lookupReference('menuDeviceDistanceButton').setHidden( - !Traccar.app.getUser().get('admin') && Traccar.app.getUser().get('userLimit') === 0 || Traccar.app.getVehicleFeaturesDisabled()); + !Traccar.app.getUser().get('administrator') && Traccar.app.getUser().get('userLimit') === 0 || Traccar.app.getVehicleFeaturesDisabled()); this.lookupReference('menuMaintenancesButton').setHidden( Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableMaintenances')); }, diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js index 56d9cf8..59f62c2 100644 --- a/web/app/view/SettingsMenuController.js +++ b/web/app/view/SettingsMenuController.js @@ -39,7 +39,7 @@ Ext.define('Traccar.view.SettingsMenuController', { init: function () { var admin, manager, readonly, deviceReadonly; - admin = Traccar.app.getUser().get('admin'); + admin = Traccar.app.getUser().get('administrator'); manager = Traccar.app.getUser().get('userLimit') !== 0; readonly = Traccar.app.getPreference('readonly', false); deviceReadonly = Traccar.app.getUser().get('deviceReadonly'); diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index 44b0138..6363fc9 100644 --- a/web/app/view/StateController.js +++ b/web/app/view/StateController.js @@ -53,7 +53,7 @@ Ext.define('Traccar.view.StateController', { init: function () { var i, hideAttributesPreference, attributesList; - if (Traccar.app.getUser().get('admin') || + if (Traccar.app.getUser().get('administrator') || !Traccar.app.getUser().get('deviceReadonly') && !Traccar.app.getPreference('readonly', false)) { this.lookupReference('computedAttributesButton').setDisabled( Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes')); diff --git a/web/app/view/dialog/DeviceController.js b/web/app/view/dialog/DeviceController.js index d6ddc58..d7a4493 100644 --- a/web/app/view/dialog/DeviceController.js +++ b/web/app/view/dialog/DeviceController.js @@ -21,7 +21,7 @@ Ext.define('Traccar.view.dialog.DeviceController', { alias: 'controller.device', init: function () { - if (Traccar.app.getUser().get('admin')) { + if (Traccar.app.getUser().get('administrator')) { this.lookupReference('disabledField').setHidden(false); } } diff --git a/web/app/view/dialog/User.js b/web/app/view/dialog/User.js index 69bbd70..86f9167 100644 --- a/web/app/view/dialog/User.js +++ b/web/app/view/dialog/User.js @@ -115,7 +115,7 @@ Ext.define('Traccar.view.dialog.User', { xtype: 'checkboxfield', inputValue: true, uncheckedValue: false, - name: 'admin', + name: 'administrator', fieldLabel: Strings.userAdmin, disabled: true, reference: 'adminField' diff --git a/web/app/view/dialog/UserController.js b/web/app/view/dialog/UserController.js index 953093e..7383f9e 100644 --- a/web/app/view/dialog/UserController.js +++ b/web/app/view/dialog/UserController.js @@ -20,12 +20,12 @@ Ext.define('Traccar.view.dialog.UserController', { alias: 'controller.user', init: function () { - if (Traccar.app.getUser().get('admin')) { + if (Traccar.app.getUser().get('administrator')) { this.lookupReference('adminField').setDisabled(false); this.lookupReference('deviceLimitField').setDisabled(false); this.lookupReference('userLimitField').setDisabled(false); } - if (Traccar.app.getUser().get('admin') || !this.getView().selfEdit) { + if (Traccar.app.getUser().get('administrator') || !this.getView().selfEdit) { this.lookupReference('readonlyField').setDisabled(false); this.lookupReference('disabledField').setDisabled(false); this.lookupReference('expirationTimeField').setDisabled(false); diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js index a0bf9dc..2b4ff14 100644 --- a/web/app/view/edit/DevicesController.js +++ b/web/app/view/edit/DevicesController.js @@ -59,8 +59,8 @@ Ext.define('Traccar.view.edit.DevicesController', { init: function () { var self = this, readonly, deviceReadonly; - deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('admin'); - readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('admin'); + deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('administrator'); + readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('administrator'); this.lookupReference('toolbarAddButton').setDisabled(readonly || deviceReadonly); this.lookupReference('toolbarDeviceMenu').setHidden(readonly || deviceReadonly); @@ -98,8 +98,8 @@ Ext.define('Traccar.view.edit.DevicesController', { updateButtons: function (selected) { var readonly, deviceReadonly, empty, deviceMenu; - deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('admin'); - readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('admin'); + deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('administrator'); + readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('administrator'); empty = selected.length === 0; this.lookupReference('toolbarEditButton').setDisabled(empty || readonly || deviceReadonly); this.lookupReference('toolbarRemoveButton').setDisabled(empty || readonly || deviceReadonly); diff --git a/web/app/view/edit/Users.js b/web/app/view/edit/Users.js index 3629e82..e2dd9aa 100644 --- a/web/app/view/edit/Users.js +++ b/web/app/view/edit/Users.js @@ -125,8 +125,8 @@ Ext.define('Traccar.view.edit.Users', { filter: 'string' }, { text: Strings.userAdmin, - dataIndex: 'admin', - renderer: Traccar.AttributeFormatter.getFormatter('admin'), + dataIndex: 'administrator', + renderer: Traccar.AttributeFormatter.getFormatter('administrator'), filter: 'boolean' }, { text: Strings.serverReadonly, diff --git a/web/app/view/edit/UsersController.js b/web/app/view/edit/UsersController.js index f3154b1..9d99816 100644 --- a/web/app/view/edit/UsersController.js +++ b/web/app/view/edit/UsersController.js @@ -42,7 +42,7 @@ Ext.define('Traccar.view.edit.UsersController', { init: function () { Ext.getStore('Users').load(); - this.lookupReference('userUsersButton').setHidden(!Traccar.app.getUser().get('admin')); + this.lookupReference('userUsersButton').setHidden(!Traccar.app.getUser().get('administrator')); this.lookupReference('userDriversButton').setHidden( Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers')); this.lookupReference('userAttributesButton').setHidden( @@ -66,7 +66,7 @@ Ext.define('Traccar.view.edit.UsersController', { onAddClick: function () { var user, dialog; user = Ext.create('Traccar.model.User'); - if (Traccar.app.getUser().get('admin')) { + if (Traccar.app.getUser().get('administrator')) { user.set('deviceLimit', -1); } if (Traccar.app.getUser().get('expirationTime')) { |