diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-11 16:02:25 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-11 16:02:25 +1300 |
commit | 09ea2d1fe5a0047bc325ec1b95ce6a2d5847814f (patch) | |
tree | 5200d17c5c04ac4d40826cf3f1573c12e143e52c /web/app | |
parent | fffbc1700b4ca1c35109eddc40edbc994d01942a (diff) | |
parent | 3c74601a7702669470d5ad76a3cf8e9328ad45bc (diff) | |
download | trackermap-web-09ea2d1fe5a0047bc325ec1b95ce6a2d5847814f.tar.gz trackermap-web-09ea2d1fe5a0047bc325ec1b95ce6a2d5847814f.tar.bz2 trackermap-web-09ea2d1fe5a0047bc325ec1b95ce6a2d5847814f.zip |
Merge pull request #426 from Abyss777/group_device_fields
Group device fields
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/view/DeviceDialog.js | 98 |
1 files changed, 54 insertions, 44 deletions
diff --git a/web/app/view/DeviceDialog.js b/web/app/view/DeviceDialog.js index 705ab923..38b0c080 100644 --- a/web/app/view/DeviceDialog.js +++ b/web/app/view/DeviceDialog.js @@ -23,52 +23,62 @@ Ext.define('Traccar.view.DeviceDialog', { items: { xtype: 'form', items: [{ - xtype: 'textfield', - name: 'name', - fieldLabel: Strings.sharedName, - allowBlank: false + xtype: 'fieldset', + title: Strings.sharedRequired, + items: [{ + xtype: 'textfield', + name: 'name', + fieldLabel: Strings.sharedName, + allowBlank: false + }, { + xtype: 'textfield', + name: 'uniqueId', + fieldLabel: Strings.deviceIdentifier, + allowBlank: false + }] }, { - xtype: 'textfield', - name: 'uniqueId', - fieldLabel: Strings.deviceIdentifier, - allowBlank: false - }, { - xtype: 'combobox', - name: 'groupId', - fieldLabel: Strings.groupParent, - store: 'Groups', - queryMode: 'local', - displayField: 'name', - valueField: 'id' - }, { - xtype: 'textfield', - name: 'phone', - fieldLabel: Strings.sharedPhone - }, { - xtype: 'textfield', - name: 'model', - fieldLabel: Strings.deviceModel - }, { - xtype: 'textfield', - name: 'contact', - fieldLabel: Strings.deviceContact - }, { - xtype: 'combobox', - name: 'category', - fieldLabel: Strings.deviceCategory, - store: 'DeviceImages', - queryMode: 'local', - displayField: 'name', - valueField: 'key', - editable: false, - listConfig: { - getInnerTpl: function () { - return '<table><tr valign="middle" ><td><div align="center" style="width:40px;height:40px;" >' + - '{[new XMLSerializer().serializeToString(Traccar.DeviceImages.getImageSvg(' + - 'Traccar.Style.mapColorOnline, false, 0, values.key))]}</div></td>' + - '<td>- {name}</td></tr></table>'; + xtype: 'fieldset', + title: Strings.sharedExtra, + collapsible: true, + collapsed: true, + items: [{ + xtype: 'combobox', + name: 'groupId', + fieldLabel: Strings.groupParent, + store: 'Groups', + queryMode: 'local', + displayField: 'name', + valueField: 'id' + }, { + xtype: 'textfield', + name: 'phone', + fieldLabel: Strings.sharedPhone + }, { + xtype: 'textfield', + name: 'model', + fieldLabel: Strings.deviceModel + }, { + xtype: 'textfield', + name: 'contact', + fieldLabel: Strings.deviceContact + }, { + xtype: 'combobox', + name: 'category', + fieldLabel: Strings.deviceCategory, + store: 'DeviceImages', + queryMode: 'local', + displayField: 'name', + valueField: 'key', + editable: false, + listConfig: { + getInnerTpl: function () { + return '<table><tr valign="middle" ><td><div align="center" style="width:40px;height:40px;" >' + + '{[new XMLSerializer().serializeToString(Traccar.DeviceImages.getImageSvg(' + + 'Traccar.Style.mapColorOnline, false, 0, values.key))]}</div></td>' + + '<td>- {name}</td></tr></table>'; + } } - } + }] }] } }); |