diff options
Diffstat (limited to 'web/app/view/edit')
-rw-r--r-- | web/app/view/edit/Attributes.js | 4 | ||||
-rw-r--r-- | web/app/view/edit/Calendars.js | 6 | ||||
-rw-r--r-- | web/app/view/edit/ComputedAttributes.js | 16 | ||||
-rw-r--r-- | web/app/view/edit/Devices.js | 8 | ||||
-rw-r--r-- | web/app/view/edit/Geofences.js | 9 | ||||
-rw-r--r-- | web/app/view/edit/Groups.js | 17 | ||||
-rw-r--r-- | web/app/view/edit/Users.js | 18 | ||||
-rw-r--r-- | web/app/view/edit/UsersController.js | 1 |
8 files changed, 61 insertions, 18 deletions
diff --git a/web/app/view/edit/Attributes.js b/web/app/view/edit/Attributes.js index 66d8bb1..84cadea 100644 --- a/web/app/view/edit/Attributes.js +++ b/web/app/view/edit/Attributes.js @@ -20,10 +20,13 @@ Ext.define('Traccar.view.edit.Attributes', { xtype: 'attributesView', requires: [ + 'Ext.grid.filters.Filters', 'Traccar.view.edit.AttributesController', 'Traccar.view.edit.Toolbar' ], + plugins: 'gridfilters', + controller: 'attributes', tbar: { @@ -42,6 +45,7 @@ Ext.define('Traccar.view.edit.Attributes', { items: [{ text: Strings.sharedName, dataIndex: 'name', + filter: 'string', renderer: function (value, metaData) { var attribute; if (this.attributesStore) { diff --git a/web/app/view/edit/Calendars.js b/web/app/view/edit/Calendars.js index 92ffa06..1c4a2ec 100644 --- a/web/app/view/edit/Calendars.js +++ b/web/app/view/edit/Calendars.js @@ -21,10 +21,13 @@ Ext.define('Traccar.view.edit.Calendars', { xtype: 'calendarsView', requires: [ + 'Ext.grid.filters.Filters', 'Traccar.view.edit.CalendarsController', 'Traccar.view.edit.Toolbar' ], + plugins: 'gridfilters', + controller: 'calendars', store: 'Calendars', @@ -43,7 +46,8 @@ Ext.define('Traccar.view.edit.Calendars', { }, items: [{ text: Strings.sharedName, - dataIndex: 'name' + dataIndex: 'name', + filter: 'string' }] } }); diff --git a/web/app/view/edit/ComputedAttributes.js b/web/app/view/edit/ComputedAttributes.js index b4699e8..5d34498 100644 --- a/web/app/view/edit/ComputedAttributes.js +++ b/web/app/view/edit/ComputedAttributes.js @@ -21,10 +21,13 @@ Ext.define('Traccar.view.edit.ComputedAttributes', { xtype: 'computedAttributesView', requires: [ + 'Ext.grid.filters.Filters', 'Traccar.view.edit.ComputedAttributesController', 'Traccar.view.edit.Toolbar' ], + plugins: 'gridfilters', + controller: 'computedAttributes', store: 'ComputedAttributes', @@ -43,10 +46,16 @@ Ext.define('Traccar.view.edit.ComputedAttributes', { }, items: [{ text: Strings.sharedDescription, - dataIndex: 'description' + dataIndex: 'description', + filter: 'string' }, { text: Strings.sharedAttribute, dataIndex: 'attribute', + filter: { + type: 'list', + labelField: 'name', + store: 'PositionAttributes' + }, renderer: function (value) { return Ext.getStore('PositionAttributes').getAttributeName(value); } @@ -56,6 +65,11 @@ Ext.define('Traccar.view.edit.ComputedAttributes', { }, { text: Strings.sharedType, dataIndex: 'type', + filter: { + type: 'list', + labelField: 'name', + store: 'AttributeValueTypes' + }, renderer: function (value) { var type = Ext.getStore('AttributeValueTypes').getById(value); if (type) { diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js index 196df73..267a38b 100644 --- a/web/app/view/edit/Devices.js +++ b/web/app/view/edit/Devices.js @@ -139,13 +139,7 @@ Ext.define('Traccar.view.edit.Devices', { labelField: 'name', store: 'Groups' }, - renderer: function (value) { - var group; - if (value !== 0) { - group = Ext.getStore('Groups').getById(value); - return group ? group.get('name') : value; - } - } + renderer: Traccar.AttributeFormatter.getFormatter('groupId') }, { text: Strings.deviceStatus, dataIndex: 'status', diff --git a/web/app/view/edit/Geofences.js b/web/app/view/edit/Geofences.js index 8ca9c31..51fa768 100644 --- a/web/app/view/edit/Geofences.js +++ b/web/app/view/edit/Geofences.js @@ -20,10 +20,13 @@ Ext.define('Traccar.view.edit.Geofences', { xtype: 'geofencesView', requires: [ + 'Ext.grid.filters.Filters', 'Traccar.view.edit.GeofencesController', 'Traccar.view.edit.Toolbar' ], + plugins: 'gridfilters', + controller: 'geofences', store: 'Geofences', @@ -42,10 +45,12 @@ Ext.define('Traccar.view.edit.Geofences', { }, items: [{ text: Strings.sharedName, - dataIndex: 'name' + dataIndex: 'name', + filter: 'string' }, { text: Strings.sharedDescription, - dataIndex: 'description' + dataIndex: 'description', + filter: 'string' }] } }); diff --git a/web/app/view/edit/Groups.js b/web/app/view/edit/Groups.js index 88bbd7b..d4d0830 100644 --- a/web/app/view/edit/Groups.js +++ b/web/app/view/edit/Groups.js @@ -20,10 +20,14 @@ Ext.define('Traccar.view.edit.Groups', { xtype: 'groupsView', requires: [ + 'Ext.grid.filters.Filters', + 'Traccar.AttributeFormatter', 'Traccar.view.edit.GroupsController', 'Traccar.view.edit.Toolbar' ], + plugins: 'gridfilters', + controller: 'groups', store: 'Groups', @@ -59,7 +63,18 @@ Ext.define('Traccar.view.edit.Groups', { }, items: [{ text: Strings.sharedName, - dataIndex: 'name' + dataIndex: 'name', + filter: 'string' + }, { + text: Strings.groupDialog, + dataIndex: 'groupId', + hidden: true, + filter: { + type: 'list', + labelField: 'name', + store: 'AllGroups' + }, + renderer: Traccar.AttributeFormatter.getFormatter('groupId') }] } }); diff --git a/web/app/view/edit/Users.js b/web/app/view/edit/Users.js index 4356b16..0aafb3d 100644 --- a/web/app/view/edit/Users.js +++ b/web/app/view/edit/Users.js @@ -96,30 +96,36 @@ Ext.define('Traccar.view.edit.Users', { }, items: [{ text: Strings.sharedName, - dataIndex: 'name' + dataIndex: 'name', + filter: 'string' }, { text: Strings.userEmail, dataIndex: 'email', filter: 'string' }, { text: Strings.userAdmin, - dataIndex: 'admin' + dataIndex: 'admin', + filter: 'boolean' }, { text: Strings.serverReadonly, dataIndex: 'readonly', - hidden: true + hidden: true, + filter: 'boolean' }, { text: Strings.userDeviceReadonly, dataIndex: 'deviceReadonly', - hidden: true + hidden: true, + filter: 'boolean' }, { text: Strings.userDisabled, - dataIndex: 'disabled' + dataIndex: 'disabled', + filter: 'boolean' }, { text: Strings.userExpirationTime, dataIndex: 'expirationTime', hidden: true, - renderer: Traccar.AttributeFormatter.getFormatter('expirationTime') + renderer: Traccar.AttributeFormatter.getFormatter('expirationTime'), + filter: 'date' }] } }); diff --git a/web/app/view/edit/UsersController.js b/web/app/view/edit/UsersController.js index fe69d40..c064403 100644 --- a/web/app/view/edit/UsersController.js +++ b/web/app/view/edit/UsersController.js @@ -67,6 +67,7 @@ Ext.define('Traccar.view.edit.UsersController', { onDevicesClick: function () { var user = this.getView().getSelectionModel().getSelection()[0]; + Ext.getStore('AllGroups').load(); Ext.create('Traccar.view.BaseWindow', { title: Strings.deviceTitle, items: { |