diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-06-19 23:45:00 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 23:45:00 +1200 |
commit | 5a6044faac45b377efabe363655ec21790bd955b (patch) | |
tree | e5d60feb3a6d17775c4b63379920d9ff88aaa379 /web/app/view/permissions | |
parent | f3ce72afbd49ccde94178158147de7b378128a55 (diff) | |
parent | 56a5de3dc50e438884c5636c11f31e48bf19a15e (diff) | |
download | etbsa-traccar-web-5a6044faac45b377efabe363655ec21790bd955b.tar.gz etbsa-traccar-web-5a6044faac45b377efabe363655ec21790bd955b.tar.bz2 etbsa-traccar-web-5a6044faac45b377efabe363655ec21790bd955b.zip |
Merge pull request #507 from Abyss777/column_filters
Column filters to most windows
Diffstat (limited to 'web/app/view/permissions')
-rw-r--r-- | web/app/view/permissions/DeviceAttributes.js | 14 | ||||
-rw-r--r-- | web/app/view/permissions/DeviceGeofences.js | 9 | ||||
-rw-r--r-- | web/app/view/permissions/GroupAttributes.js | 12 | ||||
-rw-r--r-- | web/app/view/permissions/GroupGeofences.js | 9 | ||||
-rw-r--r-- | web/app/view/permissions/UserAttributes.js | 14 | ||||
-rw-r--r-- | web/app/view/permissions/UserCalendars.js | 9 | ||||
-rw-r--r-- | web/app/view/permissions/UserDevices.js | 46 | ||||
-rw-r--r-- | web/app/view/permissions/UserGeofences.js | 9 | ||||
-rw-r--r-- | web/app/view/permissions/UserGroups.js | 22 | ||||
-rw-r--r-- | web/app/view/permissions/UserUsers.js | 3 |
10 files changed, 136 insertions, 11 deletions
diff --git a/web/app/view/permissions/DeviceAttributes.js b/web/app/view/permissions/DeviceAttributes.js index 2ce0763..c7755f0 100644 --- a/web/app/view/permissions/DeviceAttributes.js +++ b/web/app/view/permissions/DeviceAttributes.js @@ -20,17 +20,29 @@ Ext.define('Traccar.view.permissions.DeviceAttributes', { extend: 'Traccar.view.permissions.Base', xtype: 'deviceAttributesView', + requires: [ + 'Ext.grid.filters.Filters' + ], + + plugins: 'gridfilters', + columns: { items: [{ text: Strings.sharedDescription, dataIndex: 'description', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }, { text: Strings.sharedAttribute, dataIndex: 'attribute', flex: 1, minWidth: Traccar.Style.columnWidthNormal, + filter: { + type: 'list', + labelField: 'name', + store: 'PositionAttributes' + }, renderer: function (value) { return Ext.getStore('PositionAttributes').getAttributeName(value); } diff --git a/web/app/view/permissions/DeviceGeofences.js b/web/app/view/permissions/DeviceGeofences.js index 7905b49..c16bced 100644 --- a/web/app/view/permissions/DeviceGeofences.js +++ b/web/app/view/permissions/DeviceGeofences.js @@ -19,12 +19,19 @@ Ext.define('Traccar.view.permissions.DeviceGeofences', { extend: 'Traccar.view.permissions.Base', xtype: 'deviceGeofencesView', + requires: [ + 'Ext.grid.filters.Filters' + ], + + plugins: 'gridfilters', + columns: { items: [{ text: Strings.sharedName, dataIndex: 'name', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }] } }); diff --git a/web/app/view/permissions/GroupAttributes.js b/web/app/view/permissions/GroupAttributes.js index 44089da..4db8b24 100644 --- a/web/app/view/permissions/GroupAttributes.js +++ b/web/app/view/permissions/GroupAttributes.js @@ -20,17 +20,27 @@ Ext.define('Traccar.view.permissions.GroupAttributes', { extend: 'Traccar.view.permissions.Base', xtype: 'groupAttributesView', + requires: [ + 'Ext.grid.filters.Filters' + ], + columns: { items: [{ text: Strings.sharedDescription, dataIndex: 'description', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }, { text: Strings.sharedAttribute, dataIndex: 'attribute', flex: 1, minWidth: Traccar.Style.columnWidthNormal, + filter: { + type: 'list', + labelField: 'name', + store: 'PositionAttributes' + }, renderer: function (value) { return Ext.getStore('PositionAttributes').getAttributeName(value); } diff --git a/web/app/view/permissions/GroupGeofences.js b/web/app/view/permissions/GroupGeofences.js index 84cec3c..f365e35 100644 --- a/web/app/view/permissions/GroupGeofences.js +++ b/web/app/view/permissions/GroupGeofences.js @@ -19,12 +19,19 @@ Ext.define('Traccar.view.permissions.GroupGeofences', { extend: 'Traccar.view.permissions.Base', xtype: 'groupGeofencesView', + requires: [ + 'Ext.grid.filters.Filters' + ], + + plugins: 'gridfilters', + columns: { items: [{ text: Strings.sharedName, dataIndex: 'name', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }] } }); diff --git a/web/app/view/permissions/UserAttributes.js b/web/app/view/permissions/UserAttributes.js index 7bca622..a0a385e 100644 --- a/web/app/view/permissions/UserAttributes.js +++ b/web/app/view/permissions/UserAttributes.js @@ -20,17 +20,29 @@ Ext.define('Traccar.view.permissions.UserAttributes', { extend: 'Traccar.view.permissions.Base', xtype: 'userAttributesView', + requires: [ + 'Ext.grid.filters.Filters' + ], + + plugins: 'gridfilters', + columns: { items: [{ text: Strings.sharedDescription, dataIndex: 'description', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }, { text: Strings.sharedAttribute, dataIndex: 'attribute', flex: 1, minWidth: Traccar.Style.columnWidthNormal, + filter: { + type: 'list', + labelField: 'name', + store: 'PositionAttributes' + }, renderer: function (value) { return Ext.getStore('PositionAttributes').getAttributeName(value); } diff --git a/web/app/view/permissions/UserCalendars.js b/web/app/view/permissions/UserCalendars.js index f45f777..54ecfc2 100644 --- a/web/app/view/permissions/UserCalendars.js +++ b/web/app/view/permissions/UserCalendars.js @@ -20,12 +20,19 @@ Ext.define('Traccar.view.permissions.UserCalendars', { extend: 'Traccar.view.permissions.Base', xtype: 'userCalendarsView', + requires: [ + 'Ext.grid.filters.Filters' + ], + + plugins: 'gridfilters', + columns: { items: [{ text: Strings.sharedName, dataIndex: 'name', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }] } }); diff --git a/web/app/view/permissions/UserDevices.js b/web/app/view/permissions/UserDevices.js index dd6f43d..a9bb65b 100644 --- a/web/app/view/permissions/UserDevices.js +++ b/web/app/view/permissions/UserDevices.js @@ -19,17 +19,59 @@ Ext.define('Traccar.view.permissions.UserDevices', { extend: 'Traccar.view.permissions.Base', xtype: 'userDevicesView', + requires: [ + 'Ext.grid.filters.Filters', + 'Traccar.AttributeFormatter' + ], + + plugins: 'gridfilters', + columns: { items: [{ text: Strings.sharedName, dataIndex: 'name', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }, { text: Strings.deviceIdentifier, dataIndex: 'uniqueId', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' + }, { + text: Strings.sharedPhone, + dataIndex: 'phone', + flex: 1, + minWidth: Traccar.Style.columnWidthNormal, + hidden: true, + filter: 'string' + }, { + text: Strings.deviceModel, + dataIndex: 'model', + flex: 1, + minWidth: Traccar.Style.columnWidthNormal, + hidden: true, + filter: 'string' + }, { + text: Strings.deviceContact, + dataIndex: 'contact', + flex: 1, + minWidth: Traccar.Style.columnWidthNormal, + hidden: true, + filter: 'string' + }, { + text: Strings.groupDialog, + dataIndex: 'groupId', + flex: 1, + minWidth: Traccar.Style.columnWidthNormal, + hidden: true, + filter: { + type: 'list', + labelField: 'name', + store: 'AllGroups' + }, + renderer: Traccar.AttributeFormatter.getFormatter('groupId') }] } }); diff --git a/web/app/view/permissions/UserGeofences.js b/web/app/view/permissions/UserGeofences.js index 49b94ff..436a2a6 100644 --- a/web/app/view/permissions/UserGeofences.js +++ b/web/app/view/permissions/UserGeofences.js @@ -19,12 +19,19 @@ Ext.define('Traccar.view.permissions.UserGeofences', { extend: 'Traccar.view.permissions.Base', xtype: 'userGeofencesView', + requires: [ + 'Ext.grid.filters.Filters' + ], + + plugins: 'gridfilters', + columns: { items: [{ text: Strings.sharedName, dataIndex: 'name', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }] } }); diff --git a/web/app/view/permissions/UserGroups.js b/web/app/view/permissions/UserGroups.js index 0c23713..bc24201 100644 --- a/web/app/view/permissions/UserGroups.js +++ b/web/app/view/permissions/UserGroups.js @@ -19,12 +19,32 @@ Ext.define('Traccar.view.permissions.UserGroups', { extend: 'Traccar.view.permissions.Base', xtype: 'userGroupsView', + requires: [ + 'Ext.grid.filters.Filters', + 'Traccar.AttributeFormatter' + ], + + plugins: 'gridfilters', + columns: { items: [{ text: Strings.sharedName, dataIndex: 'name', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' + }, { + text: Strings.groupDialog, + dataIndex: 'groupId', + flex: 1, + minWidth: Traccar.Style.columnWidthNormal, + hidden: true, + filter: { + type: 'list', + labelField: 'name', + store: 'AllGroups' + }, + renderer: Traccar.AttributeFormatter.getFormatter('groupId') }] } }); diff --git a/web/app/view/permissions/UserUsers.js b/web/app/view/permissions/UserUsers.js index abef700..c5980c2 100644 --- a/web/app/view/permissions/UserUsers.js +++ b/web/app/view/permissions/UserUsers.js @@ -25,7 +25,8 @@ Ext.define('Traccar.view.permissions.UserUsers', { text: Strings.sharedName, dataIndex: 'name', flex: 1, - minWidth: Traccar.Style.columnWidthNormal + minWidth: Traccar.Style.columnWidthNormal, + filter: 'string' }] } }); |