aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/State.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-09-23 12:07:40 +0500
committerAbyss777 <abyss@fox5.ru>2016-09-23 12:07:40 +0500
commitffae2a37db0a28159e28525a1f9108e95f388f5e (patch)
tree2a20d92979ce746d0825eb16669006835f297b50 /web/app/view/State.js
parentc781f6b095edf8a3cc3dadc48b79e015660b4092 (diff)
downloadetbsa-traccar-web-ffae2a37db0a28159e28525a1f9108e95f388f5e.tar.gz
etbsa-traccar-web-ffae2a37db0a28159e28525a1f9108e95f388f5e.tar.bz2
etbsa-traccar-web-ffae2a37db0a28159e28525a1f9108e95f388f5e.zip
Implement attributes aliases
Diffstat (limited to 'web/app/view/State.js')
-rw-r--r--web/app/view/State.js26
1 files changed, 24 insertions, 2 deletions
diff --git a/web/app/view/State.js b/web/app/view/State.js
index 2974367..ddb9c0e 100644
--- a/web/app/view/State.js
+++ b/web/app/view/State.js
@@ -26,12 +26,34 @@ Ext.define('Traccar.view.State', {
controller: 'state',
store: 'Attributes',
- title: Strings.stateTitle,
+ header: {
+ xtype: 'header',
+ title: Strings.stateTitle,
+ items: [{
+ xtype: 'tbfill'
+ }, {
+ xtype: 'button',
+ disabled: true,
+ handler: 'onAliasEditClick',
+ reference: 'aliasEditButton',
+ glyph: 'xf040@FontAwesome',
+ tooltip: Strings.sharedEdit,
+ tooltipType: 'title'
+ }]
+ },
+
+ listeners: {
+ selectionchange: 'onSelectionChange'
+ },
columns: [{
text: Strings.stateName,
dataIndex: 'name',
- flex: 1
+ flex: 1,
+ renderer: function (value, metaData, record) {
+ var alias = record.get('alias');
+ return alias !== '' ? alias : value;
+ }
}, {
text: Strings.stateValue,
dataIndex: 'value',