diff options
author | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-21 02:13:24 -0200 |
---|---|---|
committer | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-21 02:13:24 -0200 |
commit | 77cd23da84ebebcf99a97a8aef88aa9a4884ca40 (patch) | |
tree | f95fa042b4755e925be8d0c8416fcb648ea23aa3 /web | |
parent | f5a266953e53a7f1785bcb584759582621ec9de3 (diff) | |
parent | 7623704e12a3e60420c86add5cfdc18b14061752 (diff) | |
download | trackermap-server-77cd23da84ebebcf99a97a8aef88aa9a4884ca40.tar.gz trackermap-server-77cd23da84ebebcf99a97a8aef88aa9a4884ca40.tar.bz2 trackermap-server-77cd23da84ebebcf99a97a8aef88aa9a4884ca40.zip |
Merge tananaev/master
Diffstat (limited to 'web')
-rw-r--r-- | web/app.css | 48 | ||||
-rw-r--r-- | web/app/Style.js | 10 | ||||
-rw-r--r-- | web/app/controller/Root.js | 29 | ||||
-rw-r--r-- | web/app/model/Device.js | 6 | ||||
-rw-r--r-- | web/app/view/Devices.js | 29 | ||||
-rw-r--r-- | web/app/view/Login.js | 2 | ||||
-rw-r--r-- | web/app/view/Main.js | 5 | ||||
-rw-r--r-- | web/app/view/Map.js | 32 | ||||
-rw-r--r-- | web/app/view/MapController.js | 79 | ||||
-rw-r--r-- | web/blank.html | 0 | ||||
-rw-r--r-- | web/debug.html | 7 | ||||
-rw-r--r-- | web/l10n/en.json | 2 | ||||
-rw-r--r-- | web/l10n/hu.json | 1 | ||||
-rw-r--r-- | web/l10n/no.json | 79 | ||||
-rw-r--r-- | web/l10n/ro.json | 80 | ||||
-rw-r--r-- | web/l10n/si.json | 16 | ||||
-rw-r--r-- | web/locale.js | 2 | ||||
-rw-r--r-- | web/release.html | 7 | ||||
-rw-r--r-- | web/tests.html | 11 | ||||
-rw-r--r-- | web/tests/010_sanity.t.js | 2 | ||||
-rw-r--r-- | web/tests/index.js | 6 |
21 files changed, 394 insertions, 59 deletions
diff --git a/web/app.css b/web/app.css index 897fd0cbc..eb0fdf136 100644 --- a/web/app.css +++ b/web/app.css @@ -1,3 +1,13 @@ +.status-color-online { + background-color: rgba(77, 250, 144, 0.3); +} +.status-color-unknown { + background-color: rgba(250, 190, 77, 0.3); +} +.status-color-offline { + background-color: rgba(255, 84, 104, 0.3); +} + .state-indicator { position: absolute; top: -999em; @@ -12,8 +22,44 @@ } #attribution { - position: fixed; + position: absolute; bottom: 10px; right: 15px; font-size: x-small; } + +#spinner { + position: absolute; + top: 50%; + left: 50%; + height: 60px; + width: 60px; + margin-top: -30px; + margin-left: -30px; + -webkit-animation: rotation .8s infinite linear; + -moz-animation: rotation .8s infinite linear; + -o-animation: rotation .8s infinite linear; + animation: rotation .8s infinite linear; + border-left: 6px solid rgba(56, 146, 212, .15); + border-right: 6px solid rgba(56, 146, 212, .15); + border-bottom: 6px solid rgba(56, 146, 212, .15); + border-top: 6px solid rgba(56, 146, 212, .8); + border-radius: 100%; +} + +@-webkit-keyframes rotation { + from { -webkit-transform: rotate(0deg); } + to { -webkit-transform: rotate(359deg); } +} +@-moz-keyframes rotation { + from { -moz-transform: rotate(0deg); } + to { -moz-transform: rotate(359deg); } +} +@-o-keyframes rotation { + from { -o-transform: rotate(0deg); } + to { -o-transform: rotate(359deg); } +} +@keyframes rotation { + from { transform: rotate(0deg); } + to { transform: rotate(359deg); } +} diff --git a/web/app/Style.js b/web/app/Style.js index 58ab059ad..5202a3fb2 100644 --- a/web/app/Style.js +++ b/web/app/Style.js @@ -48,13 +48,13 @@ Ext.define('Traccar.Style', { mapTextOffset: 10, mapTextFont: 'bold 12px sans-serif', - mapColorOnline: '#4DFA90', - mapColorUnknown: '#FABE4D', - mapColorOffline: '#FF5468', + mapColorOnline: 'rgba(77, 250, 144, 1.0)', + mapColorUnknown: 'rgba(250, 190, 77, 1.0)', + mapColorOffline: 'rgba(255, 84, 104, 1.0)', mapColorReport: 'rgba(21, 127, 204, 1.0)', - mapRadiusNormal: 10, - mapRadiusSelected: 15, + mapRadiusNormal: 9, + mapRadiusSelected: 14, mapMaxZoom: 19, mapDelay: 500 diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 79827b8a6..733055cdf 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -40,6 +40,7 @@ Ext.define('Traccar.controller.Root', { onServerReturn: function (options, success, response) { var result; + Ext.get('spinner').remove(); if (Traccar.ErrorManager.check(success, response)) { result = Ext.decode(response.responseText); if (result.success) { @@ -96,19 +97,35 @@ Ext.define('Traccar.controller.Root', { first: first }, callback: Traccar.app.getErrorHandler(this, function (options, success, response) { - var i, store, data, position; + var i, deviceStore, positionStore, data, devices, positions, device, position; if (success) { - store = Ext.getStore('LatestPositions'); + deviceStore = Ext.getStore('Devices'); + positionStore = Ext.getStore('LatestPositions'); data = Ext.decode(response.responseText).data; + devices = data.devices; + positions = data.positions; - for (i = 0; i < data.length; i++) { - position = store.findRecord('deviceId', data[i].deviceId, 0, false, false, true); + for (i = 0; i < devices.length; i++) { + device = deviceStore.findRecord('id', devices[i].id, 0, false, false, true); + if (device) { + device.set({ + status: devices[i].status, + lastUpdate: devices[i].lastUpdate + }, { + dirty: false + }); + } + } + + for (i = 0; i < positions.length; i++) { + position = positionStore.findRecord('deviceId', positions[i].deviceId, 0, false, false, true); if (position) { - position.set(data[i]); + position.set(positions[i]); } else { - store.add(Ext.create('Traccar.model.Position', data[i])); + positionStore.add(Ext.create('Traccar.model.Position', positions[i])); } } + this.asyncUpdate(false); } }) diff --git a/web/app/model/Device.js b/web/app/model/Device.js index e9ed1f680..983e3e62e 100644 --- a/web/app/model/Device.js +++ b/web/app/model/Device.js @@ -27,5 +27,11 @@ Ext.define('Traccar.model.Device', { }, { name: 'uniqueId', type: 'string' + }, { + name: 'status', + type: 'string' + }, { + name: 'lastUpdate', + type: 'date' }] }); diff --git a/web/app/view/Devices.js b/web/app/view/Devices.js index 9dcd76a55..21bea6980 100644 --- a/web/app/view/Devices.js +++ b/web/app/view/Devices.js @@ -42,6 +42,12 @@ Ext.define('Traccar.view.Devices', { }, { xtype: 'tbfill' }, { + id:'deviceFollowButton', + glyph: 'xf05b@FontAwesome', + tooltip: Strings.deviceFollow, + tooltipType: 'title', + enableToggle: true + }, { xtype: 'settingsMenu' }] }, @@ -52,10 +58,27 @@ Ext.define('Traccar.view.Devices', { columns: [{ text: Strings.deviceName, - dataIndex: 'name', flex: 1 + dataIndex: 'name', + flex: 1 }, { - text: Strings.deviceIdentifier, - dataIndex: 'uniqueId', flex: 1 + text: Strings.deviceLastUpdate, + dataIndex: 'lastUpdate', + flex: 1, + renderer: function (value, metaData, record) { + var status = record.get('status'); + switch (status) { + case 'online': + metaData.tdCls = 'status-color-online'; + break; + case 'offline': + metaData.tdCls = 'status-color-offline'; + break; + default: + metaData.tdCls = 'status-color-unknown'; + break; + } + return Ext.Date.format(value, Traccar.Style.dateTimeFormat); + } }] }); diff --git a/web/app/view/Login.js b/web/app/view/Login.js index 14a3fa41f..9c8187ed6 100644 --- a/web/app/view/Login.js +++ b/web/app/view/Login.js @@ -35,7 +35,7 @@ Ext.define('Traccar.view.Login', { autoEl: { tag: 'form', method: 'GET', - action: 'favicon.ico', + action: 'blank.html', target: 'submitTarget' }, diff --git a/web/app/view/Main.js b/web/app/view/Main.js index 3bd7256f7..6b4daf138 100644 --- a/web/app/view/Main.js +++ b/web/app/view/Main.js @@ -54,7 +54,10 @@ Ext.define('Traccar.view.Main', { }, { region: 'south', xtype: 'reportView', - height: Traccar.Style.reportHeight + height: Traccar.Style.reportHeight, + collapsed: true, + titleCollapse: true, + floatable: false }, { region: 'center', xtype: 'mapView', diff --git a/web/app/view/Map.js b/web/app/view/Map.js index 7d81699a3..b8c0d8dc5 100644 --- a/web/app/view/Map.js +++ b/web/app/view/Map.js @@ -35,13 +35,21 @@ Ext.define('Traccar.view.Map', { return this.mapView; }, - getVectorSource: function () { - return this.vectorSource; + getLatestSource: function () { + return this.latestSource; + }, + + getRouteSource: function () { + return this.routeSource; + }, + + getReportSource: function () { + return this.reportSource; }, listeners: { afterrender: function () { - var user, server, layer, type, bingKey, vectorLayer, lat, lon, zoom, target; + var user, server, layer, type, bingKey, latestLayer, routeLayer, reportLayer, lat, lon, zoom, target; user = Traccar.app.getUser(); server = Traccar.app.getServer(); @@ -78,9 +86,19 @@ Ext.define('Traccar.view.Map', { }); } - this.vectorSource = new ol.source.Vector({}); - vectorLayer = new ol.layer.Vector({ - source: this.vectorSource + this.latestSource = new ol.source.Vector({}); + latestLayer = new ol.layer.Vector({ + source: this.latestSource + }); + + this.routeSource = new ol.source.Vector({}); + routeLayer = new ol.layer.Vector({ + source: this.routeSource + }); + + this.reportSource = new ol.source.Vector({}); + reportLayer = new ol.layer.Vector({ + source: this.reportSource }); lat = user.get('latitude') || server.get('latitude') || Traccar.Style.mapDefaultLat; @@ -95,7 +113,7 @@ Ext.define('Traccar.view.Map', { this.map = new ol.Map({ target: this.body.dom.id, - layers: [layer, vectorLayer], + layers: [layer, routeLayer, reportLayer, latestLayer], view: this.mapView }); diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js index c153ebd45..e4ce53b57 100644 --- a/web/app/view/MapController.js +++ b/web/app/view/MapController.js @@ -27,6 +27,10 @@ Ext.define('Traccar.view.MapController', { } }, store: { + '#Devices': { + add: 'updateDevice', + update: 'updateDevice' + }, '#LatestPositions': { add: 'updateLatest', update: 'updateLatest' @@ -49,6 +53,54 @@ Ext.define('Traccar.view.MapController', { this.reportMarkers = {}; }, + getDeviceColor: function (device) { + switch (device.get('status')) { + case 'online': + return Traccar.Style.mapColorOnline; + case 'offline': + return Traccar.Style.mapColorOffline; + default: + return Traccar.Style.mapColorUnknown; + } + }, + + changeMarkerColor: function (style, color) { + return new ol.style.Style({ + image: new ol.style.Arrow({ + radius: style.getImage().getRadius(), + fill: new ol.style.Fill({ + color: color + }), + stroke: style.getImage().getStroke(), + rotation: style.getImage().getRotation() + }), + text: style.getText() + }); + }, + + updateDevice: function (store, data) { + var i, device, deviceId; + + if (!Ext.isArray(data)) { + data = [data]; + } + + for (i = 0; i < data.length; i++) { + device = data[i]; + deviceId = device.get('id'); + + if (deviceId in this.latestMarkers) { + marker = this.latestMarkers[deviceId]; + marker.setStyle( + this.changeMarkerColor(marker.getStyle(), this.getDeviceColor(device))); + } + } + }, + + followSelected: function () { + return Ext.getCmp('deviceFollowButton') && Ext.getCmp('deviceFollowButton').pressed; + }, + updateLatest: function (store, data) { var i, position, geometry, device, deviceId, marker, style; @@ -73,14 +125,18 @@ Ext.define('Traccar.view.MapController', { marker = new ol.Feature(geometry); marker.set('record', device); this.latestMarkers[deviceId] = marker; - this.getView().getVectorSource().addFeature(marker); + this.getView().getLatestSource().addFeature(marker); - style = this.getLatestMarker(); + style = this.getLatestMarker(this.getDeviceColor(device)); style.getText().setText(device.get('name')); marker.setStyle(style); } marker.getStyle().getImage().setRotation(position.get('course') * Math.PI / 180); + + if (marker === this.selectedMarker && this.followSelected()) { + this.getView().getMapView().setCenter(marker.getGeometry().getCoordinates()); + } } }, @@ -93,7 +149,7 @@ Ext.define('Traccar.view.MapController', { geometry: new ol.geom.LineString([]) }); this.reportRoute.setStyle(this.getRouteStyle()); - this.getView().getVectorSource().addFeature(this.reportRoute); + this.getView().getRouteSource().addFeature(this.reportRoute); for (i = 0; i < data.length; i++) { position = data[i]; @@ -107,12 +163,12 @@ Ext.define('Traccar.view.MapController', { marker = new ol.Feature(geometry); marker.set('record', position); this.reportMarkers[position.get('id')] = marker; - this.getView().getVectorSource().addFeature(marker); + this.getView().getReportSource().addFeature(marker); style = this.getReportMarker(); style.getImage().setRotation(position.get('course') * Math.PI / 180); - style.getText().setText( - Ext.Date.format(position.get('fixTime'), Traccar.Style.dateTimeFormat)); + /*style.getText().setText( + Ext.Date.format(position.get('fixTime'), Traccar.Style.dateTimeFormat));*/ marker.setStyle(style); @@ -121,18 +177,17 @@ Ext.define('Traccar.view.MapController', { }, clearReport: function (store) { - var vectorSource, key; - vectorSource = this.getView().getVectorSource(); + var key; if (this.reportRoute) { - vectorSource.removeFeature(this.reportRoute); + this.getView().getRouteSource().removeFeature(this.reportRoute); this.reportRoute = null; } if (this.reportMarkers) { for (key in this.reportMarkers) { if (this.reportMarkers.hasOwnProperty(key)) { - vectorSource.removeFeature(this.reportMarkers[key]); + this.getView().getReportSource().removeFeature(this.reportMarkers[key]); } } this.reportMarkers = {}; @@ -175,9 +230,9 @@ Ext.define('Traccar.view.MapController', { }); }, - getLatestMarker: function () { + getLatestMarker: function (color) { return this.getMarkerStyle( - Traccar.Style.mapRadiusNormal, Traccar.Style.mapColorUnknown); + Traccar.Style.mapRadiusNormal, color); }, getReportMarker: function () { diff --git a/web/blank.html b/web/blank.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/web/blank.html diff --git a/web/debug.html b/web/debug.html index de63d32a2..c4340af97 100644 --- a/web/debug.html +++ b/web/debug.html @@ -8,14 +8,15 @@ <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.11.1/ol.css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css"> <link rel="stylesheet" href="app.css"> +</head> +<body> +<div id="spinner"></div> +<div id="attribution">Powered by <a href="https://www.traccar.org/">Traccar GPS Tracking System</a></div> <script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all-debug.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/theme-neptune.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.11.1/ol-debug.js"></script> <script src="arrowstyle.js"></script> <script src="locale.js"></script> <script src="app.js"></script> -</head> -<body> -<div id="attribution">Powered by <a href="https://www.traccar.org/">Traccar GPS Tracking System</a></div> </body> </html> diff --git a/web/l10n/en.json b/web/l10n/en.json index a3489fbe1..d70e97a07 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -31,7 +31,9 @@ "deviceTitle": "Devices", "deviceName": "Name", "deviceIdentifier": "Identifier", + "deviceLastUpdate": "Last Update", "deviceCommand": "Command", + "deviceFollow": "Follow", "settingsTitle": "Settings", "settingsUser": "Account", "settingsServer": "Server", diff --git a/web/l10n/hu.json b/web/l10n/hu.json index 8fb48a830..56ba28ae9 100644 --- a/web/l10n/hu.json +++ b/web/l10n/hu.json @@ -31,6 +31,7 @@ "deviceTitle": "Eszközök", "deviceName": "Eszköznév", "deviceIdentifier": "Azonosító", + "deviceLastUpdate": "Utolsó frissítés", "deviceCommand": "Parancs", "settingsTitle": "Beállítások", "settingsUser": "Fiók", diff --git a/web/l10n/no.json b/web/l10n/no.json new file mode 100644 index 000000000..8a53e1213 --- /dev/null +++ b/web/l10n/no.json @@ -0,0 +1,79 @@ +{ + "sharedLoading": "Laster...", + "sharedSave": "Lagre", + "sharedCancel": "Avbryte", + "sharedAdd": "Legg til", + "sharedEdit": "Endre", + "sharedRemove": "Fjerne", + "sharedRemoveConfirm": "Fjerne element?", + "sharedKm": "km", + "sharedMi": "mi", + "sharedKmh": "km/t", + "sharedMph": "mph", + "sharedHour": "Time", + "sharedMinute": "Minutt", + "sharedSecond": "Sekund", + "errorTitle": "Feil", + "errorUnknown": "Ukjent feil", + "errorConnection": "Forbindelse feilet", + "userName": "Navn", + "userEmail": "Epost", + "userPassword": "Passord", + "userAdmin": "Admin", + "loginTitle": "Logg inn", + "loginLanguage": "Språk", + "loginRegister": "Registrere", + "loginLogin": "Logg inn", + "loginFailed": "Feil epost eller passord", + "loginCreated": "Ny bruker har blitt registrert", + "loginLogout": "Logg ut", + "deviceDialog": "Enhet", + "deviceTitle": "Enheter", + "deviceName": "Navn", + "deviceIdentifier": "Identitet", + "deviceCommand": "Kommando", + "settingsTitle": "Innstillinger", + "settingsUser": "Konto", + "settingsServer": "Server", + "settingsUsers": "Brukere", + "settingsDistanceUnit": "Avstand", + "settingsSpeedUnit": "Hastighet", + "reportTitle": "Rapporter", + "reportDevice": "Enhet", + "reportFrom": "Fra", + "reportTo": "Til", + "reportShow": "Vis", + "reportClear": "Nullstille", + "positionFixTime": "Tid", + "positionValid": "Gyldig", + "positionLatitude": "Latitude", + "positionLongitude": "Longitude", + "positionAltitude": "Altitude", + "positionSpeed": "Hastighet", + "positionCourse": "Retning", + "positionAddress": "Adresse", + "positionProtocol": "Protokoll", + "serverTitle": "Server Instillinger", + "serverZoom": "Zoom", + "serverRegistration": "Registere", + "mapTitle": "Kart", + "mapLayer": "Kart Lag", + "mapCustom": "Egendefinert Kart", + "mapOsm": "Open Street Kart", + "mapBingKey": "Bing Maps Nøkkel", + "mapBingRoad": "Bing Maps Vei", + "mapBingAerial": "Bing Maps Fly", + "stateTitle": "Stat", + "stateName": "Egenskap", + "stateValue": "Verdi", + "commandTitle": "Kommando", + "commandSend": "Sende", + "commandType": "Type", + "commandSent": "Kommando har blitt sendt", + "commandPositionPeriodic": "Periodisk Rapportering", + "commandPositionStop": "Stoppe Rapportering", + "commandEngineStop": "Motor Stop", + "commandEngineResume": "Motor Restarte", + "commandFrequency": "Frekvens", + "commandUnit": "Enhet" +}
\ No newline at end of file diff --git a/web/l10n/ro.json b/web/l10n/ro.json new file mode 100644 index 000000000..ba1d4b0a6 --- /dev/null +++ b/web/l10n/ro.json @@ -0,0 +1,80 @@ +{ + "sharedLoading": "Încărcare...", + "sharedSave": "Salvare", + "sharedCancel": "Anulare", + "sharedAdd": "Adăuga", + "sharedEdit": "Edita", + "sharedRemove": "Elimina", + "sharedRemoveConfirm": "Eliminati?", + "sharedKm": "km", + "sharedMi": "mi", + "sharedKmh": "km/h", + "sharedMph": "mph", + "sharedHour": "Oră", + "sharedMinute": "Minut", + "sharedSecond": "Secundă", + "errorTitle": "Eroare", + "errorUnknown": "Eroare necunoscută", + "errorConnection": "Eroare de conexiune", + "userName": "Nume", + "userEmail": "Email", + "userPassword": "Parolă", + "userAdmin": "Admin", + "loginTitle": "Intră in cont", + "loginLanguage": "Limbă", + "loginRegister": "Înregistrare", + "loginLogin": "Intră in cont", + "loginFailed": "E-mail sau parolă incorectă", + "loginCreated": "Nou utilizator a fost înregistrată", + "loginLogout": "Deconectare", + "deviceDialog": "Dispozitiv", + "deviceTitle": "Dispozitive", + "deviceName": "Nume", + "deviceIdentifier": "Identifier", + "deviceLastUpdate": "Ultima modificare", + "deviceCommand": "Comandă", + "settingsTitle": "Setări", + "settingsUser": "Cont", + "settingsServer": "Server", + "settingsUsers": "Utilizatori", + "settingsDistanceUnit": "Distanţă", + "settingsSpeedUnit": "Viteză", + "reportTitle": "Rapoarte", + "reportDevice": "Dispozitiv", + "reportFrom": "De la ", + "reportTo": "Până la", + "reportShow": "Arată", + "reportClear": "șterge", + "positionFixTime": "Timp", + "positionValid": "Valabil", + "positionLatitude": "Latitudine", + "positionLongitude": "Longitudine", + "positionAltitude": "Altitudine", + "positionSpeed": "Viteză", + "positionCourse": "Curs", + "positionAddress": "Adresă", + "positionProtocol": "Protocol", + "serverTitle": "Setări server", + "serverZoom": "Zoom", + "serverRegistration": "Înregistrare", + "mapTitle": "Hartă", + "mapLayer": "Stratul de Hartă", + "mapCustom": "Hartă Editare", + "mapOsm": "Open Street Map", + "mapBingKey": "Bing Maps Key", + "mapBingRoad": "Bing Maps Road", + "mapBingAerial": "Bing Maps aeriene", + "stateTitle": "Stare", + "stateName": "Proprietate", + "stateValue": "Valoare", + "commandTitle": "Comandă", + "commandSend": "Trimite", + "commandType": "Tip", + "commandSent": "Comandă a fost trimis", + "commandPositionPeriodic": "Raportarea Periodică", + "commandPositionStop": "Oprire de raportare", + "commandEngineStop": "Oprire Motor", + "commandEngineResume": "Motor Continuă", + "commandFrequency": "Frecvenţă", + "commandUnit": "Unitate" +}
\ No newline at end of file diff --git a/web/l10n/si.json b/web/l10n/si.json index 8e565423b..db6381586 100644 --- a/web/l10n/si.json +++ b/web/l10n/si.json @@ -1,5 +1,5 @@ { - "sharedLoading": "පූරණය ...", + "sharedLoading": "පූරණය කරමින් ...", "sharedSave": "සුරකින්න", "sharedCancel": "අවලංගු කරන්න", "sharedAdd": "එක් කරන්න", @@ -13,19 +13,19 @@ "sharedHour": "පැය", "sharedMinute": "මිනිත්තු", "sharedSecond": "තත්පර", - "errorTitle": "දෝෂයක්", - "errorUnknown": "නොදන්නා දෝෂයක්", - "errorConnection": "සම්බන්ධතා දෝෂයක්", + "errorTitle": "දෝෂයක් ", + "errorUnknown": "නොදන්නා දෝෂයක් !", + "errorConnection": "සම්බන්ධතා දෝෂයක් !", "userName": "නම", "userEmail": "විද්යුත් තැපෑල", "userPassword": "මුරපදය", "userAdmin": "පරිපාලක", - "loginTitle": "පිවිසුම", + "loginTitle": "පිවිසුම් ගිණුම", "loginLanguage": "භාෂාව", "loginRegister": "ලියාපදිංචි කරන්න", "loginLogin": "පිවිසුම", - "loginFailed": "ඊ-මේල් ලිපිනය හෝ මුරපදය වැරදිය", - "loginCreated": "නව පරිශීලක ලියාපදිංචි කරන ලදි", + "loginFailed": "ඊ-මේල් ලිපිනය හෝ මුරපදය වැරදිය !", + "loginCreated": "නව පරිශීලක ලියාපදිංචි කරන ලදි !", "loginLogout": "ඉවත්වන්න", "deviceDialog": "උපාංගය", "deviceTitle": "උපාංග", @@ -69,7 +69,7 @@ "commandTitle": "විධානය", "commandSend": "යවන්න", "commandType": "වර්ගය", - "commandSent": "අණ යවා ඇත", + "commandSent": "විධානය යවා ඇත", "commandPositionPeriodic": "ආවර්තිතව වාර්තා කරන්න", "commandPositionStop": "වාර්තා කිරීම නවත්වන්න", "commandEngineStop": "එන්ජිම නවත්වන්න", diff --git a/web/locale.js b/web/locale.js index a5acb0ad3..a4bc9918d 100644 --- a/web/locale.js +++ b/web/locale.js @@ -33,9 +33,11 @@ Locale.languages = { 'hu': { name: 'Magyar', code: 'hu' }, 'lt': { name: 'Lietuvių', code: 'lt' }, 'nl': { name: 'Nederlands', code: 'nl' }, + 'no': { name: 'Norsk', code: 'no_NB' }, 'pl': { name: 'Polski', code: 'pl' }, 'pt': { name: 'Português', code: 'pt' }, 'pt_BR': { name: 'Português (Brasil)', code: 'pt_BR' }, + 'ro': { name: 'Română', code: 'ro' }, 'ru': { name: 'Русский', code: 'ru' }, 'si': { name: 'සිංහල', code: 'en' }, 'sk': { name: 'Slovenčina', code: 'sk' }, diff --git a/web/release.html b/web/release.html index 27200b142..100849130 100644 --- a/web/release.html +++ b/web/release.html @@ -8,6 +8,10 @@ <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.11.1/ol.min.css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css"> <link rel="stylesheet" href="app.css"> +</head> +<body> +<div id="spinner"></div> +<div id="attribution">Powered by <a href="https://www.traccar.org/">Traccar GPS Tracking System</a></div> <script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/theme-neptune.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.11.1/ol-debug.min.js"></script> @@ -16,8 +20,5 @@ <script type="text/javascript"> Ext.Loader.loadScript('app.min.js'); </script> -</head> -<body> -<div id="attribution">Powered by <a href="https://www.traccar.org/">Traccar GPS Tracking System</a></div> </body> </html> diff --git a/web/tests.html b/web/tests.html index 2e89e5e58..5df01347d 100644 --- a/web/tests.html +++ b/web/tests.html @@ -1,11 +1,12 @@ <!DOCTYPE html> <html> <head> -<link rel="stylesheet" type="text/css" href="//cdn.sencha.com/ext/gpl/5.1.0/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css" /> -<link rel="stylesheet" type="text/css" href="//cdn.traccar.org/siesta/siesta-3.1.0-lite/resources/css/siesta-all.css"> -<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/ext-all.js"></script> -<script type="text/javascript" src="//cdn.traccar.org/siesta/siesta-3.1.0-lite/siesta-all.js"></script> -<script type="text/javascript" src="tests/index.js"></script> +<link rel="stylesheet" type="text/css" href="http://bryntum.com/examples/extjs-6.0.1/build/classic/theme-triton/resources/theme-triton-all.css"> +<link rel="stylesheet" type="text/css" href="//cdn.traccar.org/siesta/siesta-4.0.0-lite/resources/css/siesta-all.css"> +<script src="http://bryntum.com/examples/extjs-6.0.1/build/classic/theme-triton/theme-triton.js" type="text/javascript"></script> +<script src="http://bryntum.com/examples/extjs-6.0.1/build/ext-all.js" type="text/javascript"></script> +<script src="//cdn.traccar.org/siesta/siesta-4.0.0-lite/siesta-all.js"></script> +<script src="tests/index.js"></script> </head> <body> </body> diff --git a/web/tests/010_sanity.t.js b/web/tests/010_sanity.t.js index b2773ee19..a7c732c20 100644 --- a/web/tests/010_sanity.t.js +++ b/web/tests/010_sanity.t.js @@ -8,7 +8,7 @@ StartTest(function (t) { t.ok(Traccar.Application, 'Traccar.Application is defined'); t.ok(Strings, 'Strings are defined'); - t.ok(Traccar.Styles, 'Traccar.Styles are defined'); + t.ok(Traccar.Style, 'Traccar.Style are defined'); t.done(); }); diff --git a/web/tests/index.js b/web/tests/index.js index a75d6e4df..8e502c269 100644 --- a/web/tests/index.js +++ b/web/tests/index.js @@ -1,6 +1,6 @@ -var Harness = Siesta.Harness.Browser.ExtJS; +var harness = new Siesta.Harness.Browser.ExtJS(); -Harness.configure({ +harness.configure({ title: 'Traccar Test Suite', preload: [ '//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js', @@ -9,6 +9,6 @@ Harness.configure({ ] }); -Harness.start( +harness.start( 'tests/010_sanity.t.js' ); |