diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-05 18:47:24 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-05 18:47:24 +1200 |
commit | c2afe93f1443181bc7bcce2df708a88c331b8800 (patch) | |
tree | 808dc50805ee76a882d299142ee0201bafc5a90c /web/app/view/admin | |
parent | 35ae7fbd26180fa56072095ef47d6c54a4e22393 (diff) | |
download | trackermap-server-c2afe93f1443181bc7bcce2df708a88c331b8800.tar.gz trackermap-server-c2afe93f1443181bc7bcce2df708a88c331b8800.tar.bz2 trackermap-server-c2afe93f1443181bc7bcce2df708a88c331b8800.zip |
Implement server settings
Diffstat (limited to 'web/app/view/admin')
-rw-r--r-- | web/app/view/admin/ServerDialog.js | 12 | ||||
-rw-r--r-- | web/app/view/admin/ServerDialogController.js | 12 |
2 files changed, 13 insertions, 11 deletions
diff --git a/web/app/view/admin/ServerDialog.js b/web/app/view/admin/ServerDialog.js index e654c9048..d3cbc3492 100644 --- a/web/app/view/admin/ServerDialog.js +++ b/web/app/view/admin/ServerDialog.js @@ -36,6 +36,18 @@ Ext.define('Traccar.view.admin.ServerDialog', { name: 'registration', fieldLabel: strings.server_registration, allowBlank: false + }, { + xtype: 'numberfield', + name: 'latitude', + fieldLabel: strings.server_latitude + }, { + xtype: 'numberfield', + name: 'longitude', + fieldLabel: strings.server_longitude + }, { + xtype: 'numberfield', + name: 'zoom', + fieldLabel: strings.server_zoom }] }, diff --git a/web/app/view/admin/ServerDialogController.js b/web/app/view/admin/ServerDialogController.js index 8e0910b3c..bbb98d3a0 100644 --- a/web/app/view/admin/ServerDialogController.js +++ b/web/app/view/admin/ServerDialogController.js @@ -21,17 +21,7 @@ Ext.define('Traccar.view.admin.ServerDialogController', { onSaveClick: function(button) { var dialog = button.up('window').down('form'); dialog.updateRecord(); - var store = Ext.getStore('Devices'); - var device = dialog.getRecord(); - if (device.phantom) { - store.add(device); - } - store.sync({ - failure: function(batch) { - store.rejectChanges(); // TODO - Traccar.ErrorManager.check(true, batch.exceptions[0].getResponse()); - } - }); + dialog.getRecord().save(); button.up('window').close(); }, |