diff options
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(); }, |