diff options
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/GeofenceConverter.js | 4 | ||||
-rw-r--r-- | web/app/view/AttributesController.js | 4 | ||||
-rw-r--r-- | web/app/view/GroupsController.js | 1 | ||||
-rw-r--r-- | web/app/view/Notifications.js | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/web/app/GeofenceConverter.js b/web/app/GeofenceConverter.js index ebe121385..339f09615 100644 --- a/web/app/GeofenceConverter.js +++ b/web/app/GeofenceConverter.js @@ -20,7 +20,7 @@ Ext.define('Traccar.GeofenceConverter', { wktToGeometry: function (mapView, wkt) { var geometry, projection, resolutionAtEquator, pointResolution, resolutionFactor, points = [], center, radius, content, i, lat, lon, coordinates; - if (wkt.startsWith('POLYGON')) { + if (wkt.lastIndexOf('POLYGON', 0) === 0) { content = wkt.match(/\([^\(\)]+\)/); if (content !== null) { coordinates = content[0].match(/-?\d+\.?\d*/g); @@ -34,7 +34,7 @@ Ext.define('Traccar.GeofenceConverter', { geometry = new ol.geom.Polygon([points]); } } - } else if (wkt.startsWith('CIRCLE')) { + } else if (wkt.lastIndexOf('CIRCLE', 0) === 0) { content = wkt.match(/\([^\(\)]+\)/); if (content !== null) { coordinates = content[0].match(/-?\d+\.?\d*/g); diff --git a/web/app/view/AttributesController.js b/web/app/view/AttributesController.js index 2a9e71849..8e6ab82a4 100644 --- a/web/app/view/AttributesController.js +++ b/web/app/view/AttributesController.js @@ -38,6 +38,7 @@ Ext.define('Traccar.view.AttributesController', { } } store.addListener('add', function (store, records, index, eOpts) { + var i; for (i = 0; i < records.length; i++) { this.getView().record.get('attributes')[records[i].get('name')] = records[i].get('value'); } @@ -53,7 +54,8 @@ Ext.define('Traccar.view.AttributesController', { } }, this); store.addListener('remove', function (store, records, index, isMove, eOpts) { - for (var i = 0; i < records.length; i++) { + var i; + for (i = 0; i < records.length; i++) { delete this.getView().record.get('attributes')[records[i].get('name')]; } this.getView().record.dirty = true; diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js index 1764423d7..4cf1459a6 100644 --- a/web/app/view/GroupsController.js +++ b/web/app/view/GroupsController.js @@ -19,6 +19,7 @@ Ext.define('Traccar.view.GroupsController', { alias: 'controller.groups', requires: [ + 'Traccar.view.GroupDialog', 'Traccar.view.GroupGeofences' ], diff --git a/web/app/view/Notifications.js b/web/app/view/Notifications.js index 996ce3748..5ff5f061f 100644 --- a/web/app/view/Notifications.js +++ b/web/app/view/Notifications.js @@ -30,7 +30,7 @@ Ext.define('Traccar.view.Notifications', { }, viewConfig: { - markDirty:false + markDirty: false }, columns: [{ |