aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 14:24:10 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 14:24:10 +1300
commit30f1a770f867de05a89ee6073dc002137d5e4512 (patch)
treee43a6d66f1124a161b4398f92be75b45a31839b5 /web
parent2c71e521f5e2f60627d0c3df4b6649751dea1035 (diff)
downloadtrackermap-server-30f1a770f867de05a89ee6073dc002137d5e4512.tar.gz
trackermap-server-30f1a770f867de05a89ee6073dc002137d5e4512.tar.bz2
trackermap-server-30f1a770f867de05a89ee6073dc002137d5e4512.zip
Fix JavaScript jshint issues
Diffstat (limited to 'web')
-rw-r--r--web/.jshintignore1
-rw-r--r--web/app/Application.js6
-rw-r--r--web/app/view/Map.js2
-rw-r--r--web/app/view/MapController.js4
-rw-r--r--web/app/view/UserDevicesController.js12
5 files changed, 10 insertions, 15 deletions
diff --git a/web/.jshintignore b/web/.jshintignore
index d057f1b54..1c48d68e2 100644
--- a/web/.jshintignore
+++ b/web/.jshintignore
@@ -1,3 +1,4 @@
l10n/**
tests/**
locale.js
+arrowstyle.js
diff --git a/web/app/Application.js b/web/app/Application.js
index 83ca9e860..9a7afc3b9 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -86,7 +86,9 @@ Ext.define('Traccar.Application', {
if (!result.success) {
Ext.Msg.alert(Strings.errorTitle, result.error);
}
- handler.call(scope, options, success, response);
+ if (handler) {
+ handler.call(scope, options, success, response);
+ }
} else {
if (response.statusText) {
Ext.Msg.alert(Strings.errorTitle, response.statusText);
@@ -94,6 +96,6 @@ Ext.define('Traccar.Application', {
Ext.Msg.alert(Strings.errorTitle, response.status.toString()); // TODO: text message
}
}
- }
+ };
}
});
diff --git a/web/app/view/Map.js b/web/app/view/Map.js
index b6c8cf815..4358b64ac 100644
--- a/web/app/view/Map.js
+++ b/web/app/view/Map.js
@@ -96,7 +96,7 @@ Ext.define('Traccar.view.Map', {
view: this.mapView
});
- this.map.on("click", function(e) {
+ this.map.on('click', function(e) {
this.map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
this.fireEvent('selectFeature', feature);
}, this);
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
index 263587877..aa27aff74 100644
--- a/web/app/view/MapController.js
+++ b/web/app/view/MapController.js
@@ -50,7 +50,7 @@ Ext.define('Traccar.view.MapController', {
},
updateLatest: function (store, data) {
- var i, position, geometry, device, deviceId, name, marker, style;
+ var i, position, geometry, device, deviceId, marker, style;
if (!Ext.isArray(data)) {
data = [data];
@@ -84,7 +84,7 @@ Ext.define('Traccar.view.MapController', {
},
loadReport: function (store, data) {
- var i, position, point, points, geometry, deviceId, name, marker, style;
+ var i, position, point, geometry, marker, style;
this.clearReport(store);
diff --git a/web/app/view/UserDevicesController.js b/web/app/view/UserDevicesController.js
index a50ab8c80..aeb99c21c 100644
--- a/web/app/view/UserDevicesController.js
+++ b/web/app/view/UserDevicesController.js
@@ -52,11 +52,7 @@ Ext.define('Traccar.view.UserDevicesController', {
userId: this.userId,
deviceId: record.getData().id
},
- callback: Traccar.app.getErrorHandler(this, function (options, success, response) {
- if (!success) {
- // TODO deselect again
- }
- })
+ callback: Traccar.app.getErrorHandler()
});
},
@@ -68,11 +64,7 @@ Ext.define('Traccar.view.UserDevicesController', {
userId: this.userId,
deviceId: record.getData().id
},
- callback: Traccar.app.getErrorHandler(this, function (options, success, response) {
- if (!success) {
- // TODO select again
- }
- })
+ callback: Traccar.app.getErrorHandler()
});
}
});