aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-10 12:08:25 +0500
committerAbyss777 <abyss@fox5.ru>2016-11-10 12:08:25 +0500
commit185a6e4b3518ea7cebac33430751507b1bb94994 (patch)
tree808c8c1c454a5e21eff261d448d700a1d5cb2afe /web/app/view
parent26ecb43bc27087ae1f7aac8a8b0ffa8421b846d9 (diff)
downloadetbsa-traccar-web-185a6e4b3518ea7cebac33430751507b1bb94994.tar.gz
etbsa-traccar-web-185a6e4b3518ea7cebac33430751507b1bb94994.tar.bz2
etbsa-traccar-web-185a6e4b3518ea7cebac33430751507b1bb94994.zip
- Implement category selector for DeviceDialog
- Fix jscs and jshint issues
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/DeviceDialog.js8
-rw-r--r--web/app/view/MapController.js12
-rw-r--r--web/app/view/ReportController.js2
3 files changed, 15 insertions, 7 deletions
diff --git a/web/app/view/DeviceDialog.js b/web/app/view/DeviceDialog.js
index dea5074..d3f964e 100644
--- a/web/app/view/DeviceDialog.js
+++ b/web/app/view/DeviceDialog.js
@@ -65,6 +65,14 @@ Ext.define('Traccar.view.DeviceDialog', {
queryMode: 'local',
displayField: 'name',
valueField: 'key',
+ listConfig: {
+ getInnerTpl: function () {
+ return '<table><tr valign="middle" ><td><div align="center" style="width:40px;height:40px;" >' +
+ '{[new XMLSerializer().serializeToString(Traccar.DeviceImages.getImageSvg(' +
+ 'Traccar.Style.mapColorOnline, false, 0, values.key))]}</div></td>' +
+ '<td>- {name}</td></tr></table>';
+ }
+ }
}]
}
});
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
index a0e2867..103d62e 100644
--- a/web/app/view/MapController.js
+++ b/web/app/view/MapController.js
@@ -71,7 +71,7 @@ Ext.define('Traccar.view.MapController', {
this.lookupReference('showReportsButton').setVisible(Traccar.app.isMobile());
},
- showReports: function() {
+ showReports: function () {
Traccar.app.showReports(true);
},
@@ -290,7 +290,7 @@ Ext.define('Traccar.view.MapController', {
color: Traccar.Style.mapTextStrokeColor,
width: Traccar.Style.mapTextStrokeWidth
}),
- offsetY: - image.getSize()[1] / 2 - Traccar.Style.mapTextOffset,
+ offsetY: -image.getSize()[1] / 2 - Traccar.Style.mapTextOffset,
font : Traccar.Style.mapTextFont
})
});
@@ -305,7 +305,7 @@ Ext.define('Traccar.view.MapController', {
if (deviceId !== undefined) {
index = deviceId % Traccar.Style.mapRouteColor.length;
}
- return this.getMarkerStyle(false, Traccar.Style.mapRouteColor[index], angle, 'route');
+ return this.getMarkerStyle(false, Traccar.Style.mapRouteColor[index], angle, 'arrow');
},
resizeMarker: function (style, zoom) {
@@ -315,13 +315,13 @@ Ext.define('Traccar.view.MapController', {
style.getImage().angle,
style.getImage().category);
text = style.getText();
- text.setOffsetY(- image.getSize()[1] / 2 - Traccar.Style.mapTextOffset);
- return newStyle = new ol.style.Style({
+ text.setOffsetY(-image.getSize()[1] / 2 - Traccar.Style.mapTextOffset);
+ return new ol.style.Style({
image: image,
text: text
});
},
-
+
rotateMarker: function (style, angle) {
var newStyle = new ol.style.Style({
image: Traccar.DeviceImages.getImageIcon(style.getImage().fill,
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index 67fcf12..50eabae 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -41,7 +41,7 @@ Ext.define('Traccar.view.ReportController', {
}
},
- hideReports: function() {
+ hideReports: function () {
Traccar.app.showReports(false);
},