diff options
author | Abyss777 <abyss@fox5.ru> | 2016-09-23 12:07:40 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-09-23 12:07:40 +0500 |
commit | ffae2a37db0a28159e28525a1f9108e95f388f5e (patch) | |
tree | 2a20d92979ce746d0825eb16669006835f297b50 /web/app/view/State.js | |
parent | c781f6b095edf8a3cc3dadc48b79e015660b4092 (diff) | |
download | trackermap-web-ffae2a37db0a28159e28525a1f9108e95f388f5e.tar.gz trackermap-web-ffae2a37db0a28159e28525a1f9108e95f388f5e.tar.bz2 trackermap-web-ffae2a37db0a28159e28525a1f9108e95f388f5e.zip |
Implement attributes aliases
Diffstat (limited to 'web/app/view/State.js')
-rw-r--r-- | web/app/view/State.js | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/web/app/view/State.js b/web/app/view/State.js index 2974367e..ddb9c0ea 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', |