diff options
author | Abyss777 <abyss@fox5.ru> | 2017-08-18 15:40:39 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-08-18 15:40:39 +0500 |
commit | f26159a40b3b23fbd63de312f121b1fe1bf64bd1 (patch) | |
tree | e11eb5ae16c18feaa24844aae8305de472e140b1 /web/app/store | |
parent | d1d7d230a0262d9f6ae05f1c4c6718699edb8de3 (diff) | |
download | trackermap-web-f26159a40b3b23fbd63de312f121b1fe1bf64bd1.tar.gz trackermap-web-f26159a40b3b23fbd63de312f121b1fe1bf64bd1.tar.bz2 trackermap-web-f26159a40b3b23fbd63de312f121b1fe1bf64bd1.zip |
- Detach common known attributes
- Rename function
Diffstat (limited to 'web/app/store')
-rw-r--r-- | web/app/store/CommonDeviceAttributes.js | 42 | ||||
-rw-r--r-- | web/app/store/CommonUserAttributes.js | 55 | ||||
-rw-r--r-- | web/app/store/DeviceAttributes.js | 20 | ||||
-rw-r--r-- | web/app/store/GroupAttributes.js | 20 | ||||
-rw-r--r-- | web/app/store/ServerAttributes.js | 50 | ||||
-rw-r--r-- | web/app/store/UserAttributes.js | 33 |
6 files changed, 98 insertions, 122 deletions
diff --git a/web/app/store/CommonDeviceAttributes.js b/web/app/store/CommonDeviceAttributes.js new file mode 100644 index 00000000..83dd4114 --- /dev/null +++ b/web/app/store/CommonDeviceAttributes.js @@ -0,0 +1,42 @@ +/* + * Copyright 2017 Anton Tananaev (anton@traccar.org) + * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +Ext.define('Traccar.store.CommonDeviceAttributes', { + extend: 'Ext.data.Store', + model: 'Traccar.model.KnownAttribute', + + data: [{ + key: 'speedLimit', + name: Strings.attributeSpeedLimit, + valueType: 'number', + dataType: 'speed' + }, { + key: 'report.ignoreOdometer', + name: Strings.attributeReportIgnoreOdometer, + valueType: 'boolean' + }, { + key: 'maintenance.start', + name: Strings.attributeMaintenanceStart, + valueType: 'number', + dataType: 'distance' + }, { + key: 'maintenance.interval', + name: Strings.attributeMaintenanceInterval, + valueType: 'number', + dataType: 'distance' + }] +}); diff --git a/web/app/store/CommonUserAttributes.js b/web/app/store/CommonUserAttributes.js new file mode 100644 index 00000000..85d652df --- /dev/null +++ b/web/app/store/CommonUserAttributes.js @@ -0,0 +1,55 @@ +/* + * Copyright 2017 Anton Tananaev (anton@traccar.org) + * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +Ext.define('Traccar.store.CommonUserAttributes', { + extend: 'Ext.data.Store', + model: 'Traccar.model.KnownAttribute', + + data: [{ + key: 'web.liveRouteLength', + name: Strings.attributeWebLiveRouteLength, + valueType: 'number', + allowDecimals: false + }, { + key: 'web.selectZoom', + name: Strings.attributeWebSelectZoom, + valueType: 'number', + allowDecimals: false, + minValue: Traccar.Style.mapDefaultZoom, + maxValue: Traccar.Style.mapMaxZoom + }, { + key: 'ui.disableReport', + name: Strings.attributeUiDisableReport, + valueType: 'boolean' + }, { + key: 'ui.disableVehicleFetures', + name: Strings.attributeUiDisableVehicleFetures, + valueType: 'boolean' + }, { + key: 'ui.disableDrivers', + name: Strings.attributeUiDisableDrivers, + valueType: 'boolean' + }, { + key: 'ui.disableComputedAttributes', + name: Strings.attributeUiDisableComputedAttributes, + valueType: 'boolean' + }, { + key: 'ui.disableCalendars', + name: Strings.attributeUiDisableCalendars, + valueType: 'boolean' + }] +}); diff --git a/web/app/store/DeviceAttributes.js b/web/app/store/DeviceAttributes.js index 220f9a5b..4b1d9204 100644 --- a/web/app/store/DeviceAttributes.js +++ b/web/app/store/DeviceAttributes.js @@ -18,28 +18,8 @@ Ext.define('Traccar.store.DeviceAttributes', { extend: 'Ext.data.Store', model: 'Traccar.model.KnownAttribute', - proxy: 'memory', data: [{ - key: 'speedLimit', - name: Strings.attributeSpeedLimit, - valueType: 'number', - dataType: 'speed' - }, { - key: 'report.ignoreOdometer', - name: Strings.attributeReportIgnoreOdometer, - valueType: 'boolean' - }, { - key: 'maintenance.start', - name: Strings.attributeMaintenanceStart, - valueType: 'number', - dataType: 'distance' - }, { - key: 'maintenance.interval', - name: Strings.attributeMaintenanceInterval, - valueType: 'number', - dataType: 'distance' - }, { key: 'web.reportColor', name: Strings.attributeWebReportColor, valueType: 'color' diff --git a/web/app/store/GroupAttributes.js b/web/app/store/GroupAttributes.js index 2a2765f5..9389db1c 100644 --- a/web/app/store/GroupAttributes.js +++ b/web/app/store/GroupAttributes.js @@ -18,28 +18,8 @@ Ext.define('Traccar.store.GroupAttributes', { extend: 'Ext.data.Store', model: 'Traccar.model.KnownAttribute', - proxy: 'memory', data: [{ - key: 'speedLimit', - name: Strings.attributeSpeedLimit, - valueType: 'number', - dataType: 'speed' - }, { - key: 'report.ignoreOdometer', - name: Strings.attributeReportIgnoreOdometer, - valueType: 'boolean' - }, { - key: 'maintenance.start', - name: Strings.attributeMaintenanceStart, - valueType: 'number', - dataType: 'distance' - }, { - key: 'maintenance.interval', - name: Strings.attributeMaintenanceInterval, - valueType: 'number', - dataType: 'distance' - }, { key: 'processing.copyAttributes', name: Strings.attributeProcessingCopyAttributes, valueType: 'string' diff --git a/web/app/store/ServerAttributes.js b/web/app/store/ServerAttributes.js index 109b09e0..204f885b 100644 --- a/web/app/store/ServerAttributes.js +++ b/web/app/store/ServerAttributes.js @@ -18,54 +18,6 @@ Ext.define('Traccar.store.ServerAttributes', { extend: 'Ext.data.Store', model: 'Traccar.model.KnownAttribute', - proxy: 'memory', - data: [{ - key: 'speedLimit', - name: Strings.attributeSpeedLimit, - valueType: 'number', - dataType: 'speed' - }, { - key: 'maintenance.start', - name: Strings.attributeMaintenanceStart, - valueType: 'number', - dataType: 'distance' - }, { - key: 'maintenance.interval', - name: Strings.attributeMaintenanceInterval, - valueType: 'number', - dataType: 'distance' - }, { - key: 'web.liveRouteLength', - name: Strings.attributeWebLiveRouteLength, - valueType: 'number', - allowDecimals: false - }, { - key: 'web.selectZoom', - name: Strings.attributeWebSelectZoom, - valueType: 'number', - allowDecimals: false, - minValue: Traccar.Style.mapDefaultZoom, - maxValue: Traccar.Style.mapMaxZoom - }, { - key: 'ui.disableReport', - name: Strings.attributeUiDisableReport, - valueType: 'boolean' - }, { - key: 'ui.disableVehicleFetures', - name: Strings.attributeUiDisableVehicleFetures, - valueType: 'boolean' - }, { - key: 'ui.disableDrivers', - name: Strings.attributeUiDisableDrivers, - valueType: 'boolean' - }, { - key: 'ui.disableComputedAttributes', - name: Strings.attributeUiDisableComputedAttributes, - valueType: 'boolean' - }, { - key: 'ui.disableCalendars', - name: Strings.attributeUiDisableCalendars, - valueType: 'boolean' - }] + data: [] }); diff --git a/web/app/store/UserAttributes.js b/web/app/store/UserAttributes.js index a004a54d..dfe69421 100644 --- a/web/app/store/UserAttributes.js +++ b/web/app/store/UserAttributes.js @@ -18,7 +18,6 @@ Ext.define('Traccar.store.UserAttributes', { extend: 'Ext.data.Store', model: 'Traccar.model.KnownAttribute', - proxy: 'memory', data: [{ key: 'mail.smtp.host', @@ -67,37 +66,5 @@ Ext.define('Traccar.store.UserAttributes', { key: 'mail.smtp.password', name: Strings.attributeMailSmtpPassword, valueType: 'string' - }, { - key: 'web.liveRouteLength', - name: Strings.attributeWebLiveRouteLength, - valueType: 'number', - allowDecimals: false - }, { - key: 'web.selectZoom', - name: Strings.attributeWebSelectZoom, - valueType: 'number', - allowDecimals: false, - minValue: Traccar.Style.mapDefaultZoom, - maxValue: Traccar.Style.mapMaxZoom - }, { - key: 'ui.disableReport', - name: Strings.attributeUiDisableReport, - valueType: 'boolean' - }, { - key: 'ui.disableVehicleFetures', - name: Strings.attributeUiDisableVehicleFetures, - valueType: 'boolean' - }, { - key: 'ui.disableDrivers', - name: Strings.attributeUiDisableDrivers, - valueType: 'boolean' - }, { - key: 'ui.disableComputedAttributes', - name: Strings.attributeUiDisableComputedAttributes, - valueType: 'boolean' - }, { - key: 'ui.disableCalendars', - name: Strings.attributeUiDisableCalendars, - valueType: 'boolean' }] }); |