aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/cobrands/buckinghamshire/assets.js12
-rw-r--r--web/cobrands/fixmystreet/assets.js4
2 files changed, 8 insertions, 8 deletions
diff --git a/web/cobrands/buckinghamshire/assets.js b/web/cobrands/buckinghamshire/assets.js
index e0b6f729b..7fb0f8833 100644
--- a/web/cobrands/buckinghamshire/assets.js
+++ b/web/cobrands/buckinghamshire/assets.js
@@ -104,18 +104,18 @@ var labeled_defaults = $.extend(true, {}, defaults, {
stylemap: streetlight_stylemap,
feature_code: 'feature_id',
actions: {
- asset_found: function(asset, config) {
- var id = asset.attributes[config.feature_code] || '';
+ asset_found: function(asset) {
+ var id = asset.attributes[this.fixmystreet.feature_code] || '';
if (id !== '') {
var code = id.replace(/[0-9]/g, '');
- var asset_name = streetlight_code_to_type[code] || config.asset_item;
+ var asset_name = streetlight_code_to_type[code] || this.fixmystreet.asset_item;
$('.category_meta_message').html('You have selected ' + asset_name + ' <b>' + id + '</b>');
} else {
- $('.category_meta_message').html('You can pick a <b class="asset-spot">' + config.asset_item + '</b> from the map &raquo;');
+ $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map &raquo;');
}
},
- asset_not_found: function(config) {
- $('.category_meta_message').html('You can pick a <b class="asset-spot">' + config.asset_item + '</b> from the map &raquo;');
+ asset_not_found: function() {
+ $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map &raquo;');
}
}
});
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index d22db7bed..732bcb1ef 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -112,13 +112,13 @@ OpenLayers.Layer.VectorAsset = OpenLayers.Class(OpenLayers.Layer.Vector, {
asset_found: function() {
if (this.fixmystreet.actions) {
- this.fixmystreet.actions.asset_found(fixmystreet.assets.selectedFeature(), this.fixmystreet);
+ this.fixmystreet.actions.asset_found.call(this, fixmystreet.assets.selectedFeature());
}
},
asset_not_found: function() {
if (this.fixmystreet.actions) {
- this.fixmystreet.actions.asset_not_found(this.fixmystreet);
+ this.fixmystreet.actions.asset_not_found.call(this);
}
},