From 2b1ce5eed629128d220ba8cc625f5fad05949e70 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Sat, 11 Mar 2017 09:08:49 +0500 Subject: Group fields in Server dialog --- web/app/view/ServerDialog.js | 190 +++++++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 90 deletions(-) (limited to 'web/app') diff --git a/web/app/view/ServerDialog.js b/web/app/view/ServerDialog.js index 770ead7..e5021b5 100644 --- a/web/app/view/ServerDialog.js +++ b/web/app/view/ServerDialog.js @@ -28,97 +28,107 @@ Ext.define('Traccar.view.ServerDialog', { items: { xtype: 'form', items: [{ - xtype: 'checkboxfield', - inputValue: true, - uncheckedValue: false, - name: 'registration', - fieldLabel: Strings.serverRegistration, - allowBlank: false + xtype: 'fieldset', + title: Strings.sharedPreferences, + items: [{ + xtype: 'combobox', + name: 'map', + fieldLabel: Strings.mapLayer, + store: 'MapTypes', + displayField: 'name', + valueField: 'key', + editable: false + }, { + xtype: 'textfield', + name: 'bingKey', + fieldLabel: Strings.mapBingKey + }, { + xtype: 'textfield', + name: 'mapUrl', + fieldLabel: Strings.mapCustom + }, { + xtype: 'combobox', + name: 'distanceUnit', + fieldLabel: Strings.sharedDistance, + store: 'DistanceUnits', + displayField: 'name', + valueField: 'key', + editable: false + }, { + xtype: 'combobox', + name: 'speedUnit', + fieldLabel: Strings.settingsSpeedUnit, + store: 'SpeedUnits', + displayField: 'name', + valueField: 'key', + editable: false + }, { + xtype: 'numberfield', + reference: 'latitude', + name: 'latitude', + fieldLabel: Strings.positionLatitude, + decimalPrecision: Traccar.Style.coordinatePrecision + }, { + xtype: 'numberfield', + reference: 'longitude', + name: 'longitude', + fieldLabel: Strings.positionLongitude, + decimalPrecision: Traccar.Style.coordinatePrecision + }, { + xtype: 'numberfield', + reference: 'zoom', + name: 'zoom', + fieldLabel: Strings.serverZoom + }, { + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'twelveHourFormat', + fieldLabel: Strings.settingsTwelveHourFormat, + allowBlank: false + }, { + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'forceSettings', + fieldLabel: Strings.serverForceSettings, + allowBlank: false + }, { + xtype: 'combobox', + name: 'coordinateFormat', + fieldLabel: Strings.settingsCoordinateFormat, + store: 'CoordinateFormats', + displayField: 'name', + valueField: 'key', + editable: false + }] }, { - xtype: 'checkboxfield', - inputValue: true, - uncheckedValue: false, - name: 'readonly', - fieldLabel: Strings.serverReadonly, - allowBlank: false - }, { - xtype: 'checkboxfield', - inputValue: true, - uncheckedValue: false, - name: 'deviceReadonly', - fieldLabel: Strings.userDeviceReadonly, - allowBlank: false - }, { - xtype: 'combobox', - name: 'map', - fieldLabel: Strings.mapLayer, - store: 'MapTypes', - displayField: 'name', - valueField: 'key', - editable: false - }, { - xtype: 'textfield', - name: 'bingKey', - fieldLabel: Strings.mapBingKey - }, { - xtype: 'textfield', - name: 'mapUrl', - fieldLabel: Strings.mapCustom - }, { - xtype: 'combobox', - name: 'distanceUnit', - fieldLabel: Strings.sharedDistance, - store: 'DistanceUnits', - displayField: 'name', - valueField: 'key', - editable: false - }, { - xtype: 'combobox', - name: 'speedUnit', - fieldLabel: Strings.settingsSpeedUnit, - store: 'SpeedUnits', - displayField: 'name', - valueField: 'key', - editable: false - }, { - xtype: 'numberfield', - reference: 'latitude', - name: 'latitude', - fieldLabel: Strings.positionLatitude, - decimalPrecision: Traccar.Style.coordinatePrecision - }, { - xtype: 'numberfield', - reference: 'longitude', - name: 'longitude', - fieldLabel: Strings.positionLongitude, - decimalPrecision: Traccar.Style.coordinatePrecision - }, { - xtype: 'numberfield', - reference: 'zoom', - name: 'zoom', - fieldLabel: Strings.serverZoom - }, { - xtype: 'checkboxfield', - inputValue: true, - uncheckedValue: false, - name: 'twelveHourFormat', - fieldLabel: Strings.settingsTwelveHourFormat, - allowBlank: false - }, { - xtype: 'checkboxfield', - inputValue: true, - uncheckedValue: false, - name: 'forceSettings', - fieldLabel: Strings.serverForceSettings, - allowBlank: false - }, { - xtype: 'combobox', - name: 'coordinateFormat', - fieldLabel: Strings.settingsCoordinateFormat, - store: 'CoordinateFormats', - displayField: 'name', - valueField: 'key', - editable: false + xtype: 'fieldset', + title: Strings.sharedPermissions, + collapsible: true, + collapsed: true, + items: [{ + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'registration', + fieldLabel: Strings.serverRegistration, + allowBlank: false + }, { + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'readonly', + fieldLabel: Strings.serverReadonly, + allowBlank: false + }, { + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'deviceReadonly', + fieldLabel: Strings.userDeviceReadonly, + allowBlank: false + }] }] }, -- cgit v1.2.3