aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/model/Server.js2
-rw-r--r--web/app/store/MapTypes.js3
-rw-r--r--web/app/view/admin/ServerDialog.js8
-rw-r--r--web/app/view/map/Map.js12
-rw-r--r--web/app/view/map/MapController.js5
-rw-r--r--web/app/view/state/StateController.js12
-rw-r--r--web/l10n/en.js2
-rw-r--r--web/l10n/sk.js86
-rw-r--r--web/l10n/sr.js86
-rw-r--r--web/locale.js2
10 files changed, 208 insertions, 10 deletions
diff --git a/web/app/model/Server.js b/web/app/model/Server.js
index 9e4ab1eec..b21f28299 100644
--- a/web/app/model/Server.js
+++ b/web/app/model/Server.js
@@ -22,6 +22,8 @@ Ext.define('Traccar.model.Server', {
{ name: 'id', type: 'int' },
{ name: 'registration', type: 'boolean' },
{ name: 'map', type: 'string' },
+ { name: 'bingKey', type: 'string' },
+ { name: 'mapUrl', type: 'string' },
{ name: 'language', type: 'string' },
{ name: 'distanceUnit', type: 'string' },
{ name: 'speedUnit', type: 'string' },
diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js
index ebc45cc8d..fbdc49acc 100644
--- a/web/app/store/MapTypes.js
+++ b/web/app/store/MapTypes.js
@@ -20,6 +20,7 @@ Ext.define('Traccar.store.MapTypes', {
data: [
{'key': 'osm', 'name': strings.mapOsm},
{'key': 'bingRoad', 'name': strings.mapBingRoad},
- {'key': 'bingAerial', 'name': strings.mapBingAerial}
+ {'key': 'bingAerial', 'name': strings.mapBingAerial},
+ {'key': 'custom', 'name': strings.mapCustom},
]
});
diff --git a/web/app/view/admin/ServerDialog.js b/web/app/view/admin/ServerDialog.js
index 37bb498a0..080e2fcc4 100644
--- a/web/app/view/admin/ServerDialog.js
+++ b/web/app/view/admin/ServerDialog.js
@@ -43,6 +43,14 @@ Ext.define('Traccar.view.admin.ServerDialog', {
displayField: 'name',
valueField: 'key'
}, {
+ xtype: 'textfield',
+ name: 'bingKey',
+ fieldLabel: strings.mapBingKey
+ }, {
+ xtype: 'textfield',
+ name: 'mapUrl',
+ fieldLabel: strings.mapCustom
+ }, {
xtype: 'combobox',
name: 'distanceUnit',
fieldLabel: strings.settingsDistanceUnit,
diff --git a/web/app/view/map/Map.js b/web/app/view/map/Map.js
index 9d9a92886..cdb46342b 100644
--- a/web/app/view/map/Map.js
+++ b/web/app/view/map/Map.js
@@ -36,16 +36,20 @@ Ext.define('Traccar.view.map.Map', {
var layer;
var mapLayer = user.get('map') || server.get('map');
- var bindKey = 'AseEs0DLJhLlTNoxbNXu7DGsnnH4UoWuGue7-irwKkE3fffaClwc9q_Mr6AyHY8F';
+ var bingKey = server.get('bingKey');
- if (mapLayer === 'bingRoad') {
+ if (mapLayer === 'custom') {
+ layer = new ol.layer.Tile({ source: new ol.source.XYZ({
+ url: server.get('mapUrl')
+ })});
+ } else if (mapLayer === 'bingRoad') {
layer = new ol.layer.Tile({ source: new ol.source.BingMaps({
- key: bindKey,
+ key: bingKey,
imagerySet: 'Road'
})});
} else if (mapLayer === 'bingAerial') {
layer = new ol.layer.Tile({ source: new ol.source.BingMaps({
- key: bindKey,
+ key: bingKey,
imagerySet: 'Aerial'
})});
} else {
diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js
index 98922a307..0aab71725 100644
--- a/web/app/view/map/MapController.js
+++ b/web/app/view/map/MapController.js
@@ -128,9 +128,8 @@ Ext.define('Traccar.view.map.MapController', {
var vectorSource = this.getView().vectorSource;
- var data = Ext.getStore('Positions').getData().clone();
- data.sort('fixTime');
-
+ var data = Ext.getStore('Positions').getData();
+
var index;
var positions = [];
this.reportRoutePoints = {};
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js
index 58bc5c55c..73dc28b50 100644
--- a/web/app/view/state/StateController.js
+++ b/web/app/view/state/StateController.js
@@ -73,6 +73,14 @@ Ext.define('Traccar.view.state.StateController', {
}
},
+ formatValue: function(value) {
+ if (typeof(id) === 'number') {
+ return +value.toFixed(2);
+ } else {
+ return value;
+ }
+ },
+
updatePosition: function(position) {
var other;
@@ -93,7 +101,7 @@ Ext.define('Traccar.view.state.StateController', {
store.add(Ext.create('Traccar.model.Parameter', {
priority: this.keys[key].priority,
name: this.keys[key].name,
- value: value
+ value: this.formatValue(value)
}));
}
}
@@ -119,7 +127,7 @@ Ext.define('Traccar.view.state.StateController', {
name: key.replace(/^./, function (match) {
return match.toUpperCase();
}),
- value: value
+ value: this.formatValue(value)
}));
}
}
diff --git a/web/l10n/en.js b/web/l10n/en.js
index 33c494a54..4c1e0f233 100644
--- a/web/l10n/en.js
+++ b/web/l10n/en.js
@@ -66,7 +66,9 @@ var strings = {
mapTitle: 'Map',
mapLayer: 'Map Layer',
+ mapCustom: 'Custom Map',
mapOsm: 'Open Street Map',
+ mapBingKey: 'Bing Maps Key',
mapBingRoad: 'Bing Maps Road',
mapBingAerial: 'Bing Maps Aerial',
diff --git a/web/l10n/sk.js b/web/l10n/sk.js
new file mode 100644
index 000000000..0c0fa77c3
--- /dev/null
+++ b/web/l10n/sk.js
@@ -0,0 +1,86 @@
+var strings = {
+ sharedLoading: 'Načítava...',
+ sharedSave: 'Uloženie',
+ sharedCancel: 'Zrušenie',
+ sharedAdd: 'Pridať',
+ sharedEdit: 'Úprava',
+ sharedRemove: 'Odstrániť',
+ sharedRemoveConfirm: 'Odstrániť položku?',
+ sharedKm: 'Km',
+ sharedMi: 'mi',
+ sharedKmh: 'Km/h',
+ sharedMph: 'mph',
+ sharedHour: 'Hodina',
+ sharedMinute: 'Minúta',
+ sharedSecond: 'Druhý',
+
+ errorTitle: 'Chyba',
+ errorUnknown: 'Neznáma chyba',
+
+ userName: 'Meno',
+ userEmail: 'E-mail',
+ userPassword: 'Heslo',
+ userAdmin: 'Admin',
+
+ loginTitle: 'Prihlásenie',
+ loginLanguage: 'Jazyk',
+ loginRegister: 'Registrovať',
+ loginLogin: 'Prihlásenie',
+ loginFailed: 'Nesprávna e-mailová adresa alebo heslo',
+ loginCreated: 'Nový užívateľ sa zaregistroval',
+ loginLogout: 'Odhlásiť',
+
+ deviceDialog: 'Zariadenie',
+ deviceTitle: 'Zariadena',
+ deviceName: 'Meno',
+ deviceIdentifier: 'Identifikátor',
+ deviceCommand: 'Príkaz',
+
+ settingsTitle: 'Nastavenia',
+ settingsUser: 'Účet',
+ settingsServer: 'Server',
+ settingsUsers: 'Užívatelia',
+ settingsDistanceUnit: 'Vzdialenosť',
+ settingsSpeedUnit: 'Rýchlosť jazdy',
+
+ reportTitle: 'Správy',
+ reportDevice: 'Zariadenie',
+ reportFrom: 'Z',
+ reportTo: 'do',
+ reportShow: 'Zobraziť',
+ reportClear: 'Vyčistiť',
+
+ positionTime: 'Čas',
+ positionValid: 'Platný',
+ positionLatitude: 'Šírka',
+ positionLongitude: 'Dĺžka',
+ positionAltitude: 'Výška',
+ positionSpeed: 'Rýchlosť jazdy',
+ positionCourse: 'Kurz',
+ positionAddress: 'Adresa',
+ positionProtocol: 'Protokol',
+
+ serverTitle: 'Nastavenie servera',
+ serverZoom: 'Zoom',
+ serverRegistration: 'Registrácia',
+
+ mapTitle: 'Mapa',
+ mapLayer: 'Mapové vrstvy',
+ mapOsm: 'Open Street Map',
+ mapBingRoad: 'Bing Maps Road',
+ mapBingAerial: 'Bing Maps Arial',
+
+ stateTitle: 'Štát',
+ stateName: 'Parameter',
+ stateValue: 'Hodnota',
+
+ commandTitle: 'Príkaz',
+ commandSend: 'Odoslať',
+ commandType: 'Typ',
+ commandPositionPeriodic: 'Pravidelné podávanie správ',
+ commandPositionStop: 'Zastavte podávanie správ',
+ commandEngineStop: 'Zastavenie motora',
+ commandEngineResume: 'Spustenie motora',
+ commandFrequency: 'Frekvencia',
+ commandUnit: 'Unit'
+};
diff --git a/web/l10n/sr.js b/web/l10n/sr.js
new file mode 100644
index 000000000..8bfe6f104
--- /dev/null
+++ b/web/l10n/sr.js
@@ -0,0 +1,86 @@
+var strings = {
+ sharedLoading: 'Učitava...',
+ sharedSave: 'Sačuvaj',
+ sharedCancel: 'Odustani',
+ sharedAdd: 'Dodaj',
+ sharedEdit: 'Podesi',
+ sharedRemove: 'Ukloni',
+ sharedRemoveConfirm: 'Ukloniti jedinicu?',
+ sharedKm: 'km',
+ sharedMi: 'mi',
+ sharedKmh: 'km/h',
+ sharedMph: 'mph',
+ sharedHour: 'Čas',
+ sharedMinute: 'Minut',
+ sharedSecond: 'Sekunda',
+
+ errorTitle: 'Greška',
+ errorUnknown: 'Nepoznata greška',
+
+ userName: 'Ime',
+ userEmail: 'Email',
+ userPassword: 'Lozinka',
+ userAdmin: 'Admin',
+
+ loginTitle: 'Prijava',
+ loginLanguage: 'Jezik',
+ loginRegister: 'Registruj se',
+ loginLogin: 'Prijava',
+ loginFailed: 'Neispravna email adresa ili lozinka',
+ loginCreated: 'Novi korisnik je registrovan',
+ loginLogout: 'Odjava',
+
+ deviceDialog: 'Uređaj',
+ deviceTitle: 'Uređaji',
+ deviceName: 'Ime',
+ deviceIdentifier: 'Identifikator',
+ deviceCommand: 'Komanda',
+
+ settingsTitle: 'Podešavanja',
+ settingsUser: 'Nalog',
+ settingsServer: 'Server',
+ settingsUsers: 'Korisnici',
+ settingsDistanceUnit: 'Udaljenost',
+ settingsSpeedUnit: 'Brzina',
+
+ reportTitle: 'Izveštaji',
+ reportDevice: 'Uređaj',
+ reportFrom: 'Od',
+ reportTo: 'Do',
+ reportShow: 'Prikaži',
+ reportClear: 'Izbriši',
+
+ positionTime: 'Vreme',
+ positionValid: 'Ispravno',
+ positionLatitude: 'Geografska širina',
+ positionLongitude: 'Geografska dužina',
+ positionAltitude: 'Visina',
+ positionSpeed: 'Brzina',
+ positionCourse: 'Pravac',
+ positionAddress: 'Adresa',
+ positionProtocol: 'Protokol',
+
+ serverTitle: 'Podešavanja Servera',
+ serverZoom: 'Zumiranje',
+ serverRegistration: 'Registracija',
+
+ mapTitle: 'Mapa',
+ mapLayer: 'Vrsta Mape',
+ mapOsm: 'Open Street Map',
+ mapBingRoad: 'Bing Maps Road',
+ mapBingAerial: 'Bing Maps Aerial',
+
+ stateTitle: 'Stanje',
+ stateName: 'Parametar',
+ stateValue: 'Vrednost',
+
+ commandTitle: 'Komanda',
+ commandSend: 'Pošalji',
+ commandType: 'Tip',
+ commandPositionPeriodic: 'Periodično izveštavanje',
+ commandPositionStop: 'Prekini izveštavanja',
+ commandEngineStop: 'Zaustavi motor',
+ commandEngineResume: 'Pokreni motor',
+ commandFrequency: 'Frekvencija',
+ commandUnit: 'Jedinica'
+};
diff --git a/web/locale.js b/web/locale.js
index 497b6ab2e..c5aca40cd 100644
--- a/web/locale.js
+++ b/web/locale.js
@@ -28,6 +28,8 @@ var availableLanguages = {
'pl': { name: 'Polski', code: 'pl' },
'pt': { name: 'Português', code: 'pt' },
'ru': { name: 'Русский', code: 'ru' },
+ 'sk': { name: 'Slovenčina', code: 'sk' },
+ 'sr': { name: 'Srpski', code: 'sr' },
'th': { name: 'ไทย', code: 'th' },
'zh': { name: '中文', code: 'zh_CN' },
'lt': { name: 'Lietuvių', code: 'lt' }