diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/.jshintignore | 1 | ||||
-rw-r--r-- | web/app/Application.js | 6 | ||||
-rw-r--r-- | web/app/view/Map.js | 2 | ||||
-rw-r--r-- | web/app/view/MapController.js | 4 | ||||
-rw-r--r-- | web/app/view/UserDevicesController.js | 12 |
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() }); } }); |