From 24ed72ab26fd31769e334b928316b038b4d8b647 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 15 Sep 2015 13:43:31 +1200 Subject: More changes to store classes --- web/app/store/LatestPositions.js | 20 ++++++++++++++++++++ web/app/store/LiveData.js | 20 -------------------- web/app/store/TimeUnits.js | 18 ++++++++++++------ 3 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 web/app/store/LatestPositions.js delete mode 100644 web/app/store/LiveData.js (limited to 'web/app/store') diff --git a/web/app/store/LatestPositions.js b/web/app/store/LatestPositions.js new file mode 100644 index 000000000..c656bdcb8 --- /dev/null +++ b/web/app/store/LatestPositions.js @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +Ext.define('Traccar.store.LatestPositions', { + extend: 'Ext.data.Store', + model: 'Traccar.model.Position' +}); diff --git a/web/app/store/LiveData.js b/web/app/store/LiveData.js deleted file mode 100644 index 35731e339..000000000 --- a/web/app/store/LiveData.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Ext.define('Traccar.store.LiveData', { - extend: 'Ext.data.Store', - model: 'Traccar.model.Position' -}); diff --git a/web/app/store/TimeUnits.js b/web/app/store/TimeUnits.js index 5d96f3b8b..047fd6016 100644 --- a/web/app/store/TimeUnits.js +++ b/web/app/store/TimeUnits.js @@ -16,10 +16,16 @@ Ext.define('Traccar.store.TimeUnits', { extend: 'Ext.data.Store', - fields: ['multiplier', 'name'], - data: [ - {'multiplier': 1, 'name': strings.sharedSecond}, - {'multiplier': 60, 'name': strings.sharedMinute}, - {'multiplier': 3600, 'name': strings.sharedHour} - ] + fields: ['name', 'factor'], + + data: [{ + name: strings.sharedSecond, + factor: 1 + }, { + name: strings.sharedMinute, + factor: 60 + }, { + name: strings.sharedHour, + factor: 3600 + }] }); -- cgit v1.2.3