diff options
Diffstat (limited to 'web/app/store')
-rw-r--r-- | web/app/store/CommandTypes.js | 2 | ||||
-rw-r--r-- | web/app/store/DistanceUnits.js | 2 | ||||
-rw-r--r-- | web/app/store/Languages.js | 32 | ||||
-rw-r--r-- | web/app/store/MapTypes.js | 2 | ||||
-rw-r--r-- | web/app/store/SpeedUnits.js | 2 | ||||
-rw-r--r-- | web/app/store/TimeUnits.js | 2 |
6 files changed, 37 insertions, 5 deletions
diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js index 3906eb9a1..bb5a4d024 100644 --- a/web/app/store/CommandTypes.js +++ b/web/app/store/CommandTypes.js @@ -17,7 +17,7 @@ Ext.define('Traccar.store.CommandTypes', { extend: 'Ext.data.Store', fields: ['key', 'name'], - data : [ + data: [ {'key': 'positionStop', 'name': strings.command_position_stop}, {'key': 'positionFix', 'name': strings.command_position_fix}, {'key': 'engineStop', 'name': strings.command_engine_stop}, diff --git a/web/app/store/DistanceUnits.js b/web/app/store/DistanceUnits.js index b3d342fc6..be17466ec 100644 --- a/web/app/store/DistanceUnits.js +++ b/web/app/store/DistanceUnits.js @@ -17,7 +17,7 @@ Ext.define('Traccar.store.DistanceUnits', { extend: 'Ext.data.Store', fields: ['key', 'name'], - data : [ + data: [ {'key': 'km', 'name': strings.shared_km}, {'key': 'mi', 'name': strings.shared_mi} ] diff --git a/web/app/store/Languages.js b/web/app/store/Languages.js new file mode 100644 index 000000000..8d1a98552 --- /dev/null +++ b/web/app/store/Languages.js @@ -0,0 +1,32 @@ +/* + * 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.Languages', { + extend: 'Ext.data.Store', + fields: ['code', 'name'], + data: function() { + var data = []; + for (var code in availableLanguages) { + if (availableLanguages.hasOwnProperty(code)) { + data.push({ + 'code': code, + 'name': availableLanguages[code] + }); + } + } + return data; + }() +}); diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js index ef63fd92b..4d37e133d 100644 --- a/web/app/store/MapTypes.js +++ b/web/app/store/MapTypes.js @@ -17,7 +17,7 @@ Ext.define('Traccar.store.MapTypes', { extend: 'Ext.data.Store', fields: ['key', 'name'], - data : [ + data: [ {'key': 'osm', 'name': strings.map_osm}, {'key': 'bingRoad', 'name': strings.map_bing_road}, {'key': 'bingAerial', 'name': strings.map_bing_aerial} diff --git a/web/app/store/SpeedUnits.js b/web/app/store/SpeedUnits.js index f4d4b8266..95c7fbc3b 100644 --- a/web/app/store/SpeedUnits.js +++ b/web/app/store/SpeedUnits.js @@ -17,7 +17,7 @@ Ext.define('Traccar.store.SpeedUnits', { extend: 'Ext.data.Store', fields: ['key', 'name'], - data : [ + data: [ {'key': 'kph', 'name': strings.shared_kph}, {'key': 'mph', 'name': strings.shared_mph} ], diff --git a/web/app/store/TimeUnits.js b/web/app/store/TimeUnits.js index e8cda7b26..f41ee5e2f 100644 --- a/web/app/store/TimeUnits.js +++ b/web/app/store/TimeUnits.js @@ -17,7 +17,7 @@ Ext.define('Traccar.store.TimeUnits', { extend: 'Ext.data.Store', fields: ['multiplier', 'name'], - data : [ + data: [ {'multiplier': 1, 'name': strings.shared_second}, {'multiplier': 60, 'name': strings.shared_minute}, {'multiplier': 3600, 'name': strings.shared_hour} |