diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-07-17 12:28:15 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-08-03 13:31:08 +0100 |
commit | f0a20065e8129f9da5d48a8f29a37755de61e4bb (patch) | |
tree | 0888de2357f3d48652f6870a8ff2dd7afb6deb57 /web | |
parent | 43d6b2e5fe9932c05865bde239db916aad380243 (diff) |
[UK] A few IE8-compatible JS fixes.
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/bathnes/js.js | 4 | ||||
-rw-r--r-- | web/cobrands/buckinghamshire/js.js | 4 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/assets.js | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/web/cobrands/bathnes/js.js b/web/cobrands/bathnes/js.js index 71077ed43..86b835d3d 100644 --- a/web/cobrands/bathnes/js.js +++ b/web/cobrands/bathnes/js.js @@ -114,14 +114,14 @@ function include_feature(f) { return f && f.attributes && f.attributes.ownername && - exclude_ownernames.indexOf(f.attributes.ownername) == -1; + OpenLayers.Util.indexOf(exclude_ownernames, f.attributes.ownername) == -1; } function banes_owns_feature(f) { return f && f.attributes && f.attributes.ownername && - banes_ownernames.indexOf(f.attributes.ownername) > -1 && + OpenLayers.Util.indexOf(banes_ownernames, f.attributes.ownername) > -1 && include_feature(f); } diff --git a/web/cobrands/buckinghamshire/js.js b/web/cobrands/buckinghamshire/js.js index a4cf46141..9094fdb8e 100644 --- a/web/cobrands/buckinghamshire/js.js +++ b/web/cobrands/buckinghamshire/js.js @@ -103,7 +103,7 @@ function bucks_owns_feature(f) { return f && f.attributes && f.attributes.feature_ty && - bucks_types.indexOf(f.attributes.feature_ty) > -1; + OpenLayers.Util.indexOf(bucks_types, f.attributes.feature_ty) > -1; } function bucks_does_not_own_feature(f) { @@ -167,7 +167,7 @@ fixmystreet.assets.add($.extend(true, {}, defaults, { if (fixmystreet.assets.selectedFeature()) { hide_responsibility_errors(); enable_report_form(); - } else if (bucks_types.indexOf(feature.attributes.feature_ty) != -1) { + } else if (OpenLayers.Util.indexOf(bucks_types, feature.attributes.feature_ty) != -1) { hide_responsibility_errors(); enable_report_form(); } else { diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js index 77522fc6c..7ce12cbe3 100644 --- a/web/cobrands/fixmystreet/assets.js +++ b/web/cobrands/fixmystreet/assets.js @@ -284,7 +284,7 @@ function check_zoom_message_visibility() { } } else { - this.fixmystreet.asset_category.forEach( function(c) { + $.each(this.fixmystreet.asset_category, function(i, c) { var prefix = c.replace(/[^a-z]/gi, ''), id = "category_meta_message_" + prefix, $p = $('#' + id); @@ -490,7 +490,7 @@ fixmystreet.assets = { layer_options.filter = new OpenLayers.Filter.FeatureId({ type: OpenLayers.Filter.Function, evaluate: function(f) { - return options.filter_value.indexOf(f.attributes[options.filter_key]) != -1; + return OpenLayers.Util.indexOf(options.filter_value, f.attributes[options.filter_key]) != -1; } }); layer_options.strategies.push(new OpenLayers.Strategy.Filter({filter: layer_options.filter})); |