From b7403aaadd130bf1496b97c07667842813d99550 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 5 Sep 2016 14:27:30 +0500 Subject: Implement retrieving map center from current map --- web/app/view/ServerDialog.js | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'web/app/view/ServerDialog.js') diff --git a/web/app/view/ServerDialog.js b/web/app/view/ServerDialog.js index dd4579168..0f8dbd2eb 100644 --- a/web/app/view/ServerDialog.js +++ b/web/app/view/ServerDialog.js @@ -18,10 +18,10 @@ Ext.define('Traccar.view.ServerDialog', { extend: 'Traccar.view.BaseEditDialog', requires: [ - 'Traccar.view.BaseEditDialogController' + 'Traccar.view.ServerDialogController' ], - controller: 'baseEditDialog', + controller: 'serverEditDialog', title: Strings.serverTitle, items: { @@ -66,19 +66,28 @@ Ext.define('Traccar.view.ServerDialog', { displayField: 'name', valueField: 'key' }, { - xtype: 'numberfield', - name: 'latitude', - fieldLabel: Strings.positionLatitude, - decimalPrecision: Traccar.Style.coordinatePrecision - }, { - xtype: 'numberfield', - name: 'longitude', - fieldLabel: Strings.positionLongitude, - decimalPrecision: Traccar.Style.coordinatePrecision - }, { - xtype: 'numberfield', - name: 'zoom', - fieldLabel: Strings.serverZoom + xtype: 'fieldset', + reference: 'mapCenter', + title: Strings.sharedMapCenter, + defaultType: 'numberfield', + items: [{ + name: 'latitude', + fieldLabel: Strings.positionLatitude, + decimalPrecision: Traccar.Style.coordinatePrecision + }, { + name: 'longitude', + fieldLabel: Strings.positionLongitude, + decimalPrecision: Traccar.Style.coordinatePrecision + }, { + name: 'zoom', + fieldLabel: Strings.serverZoom + }, { + xtype: 'button', + margin: Traccar.Style.inFormButtonMargin, + enableToggle: false, + text: Strings.sharedGetFromMap, + handler: 'getFromMap' + }] }, { xtype: 'checkboxfield', name: 'twelveHourFormat', -- cgit v1.2.3