Skip to content

Commit

Permalink
[IoW] Message fixing.
Browse files Browse the repository at this point in the history
Add to asset config:
         construct_selected_asset_message: fixmystreet.assets.isleofwight.construct_message
          asset_item_message: 'Please select an item or a road/pavement/path on the map »'
  • Loading branch information
dracos committed Feb 14, 2025
1 parent f94bf09 commit 8fee359
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions web/cobrands/fixmystreet-uk-councils/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -814,35 +814,35 @@ fixmystreet.assets.isleofwight.streets_stylemap = new OpenLayers.StyleMap({
});

fixmystreet.assets.isleofwight.not_found_msg_update = function() {
$('.category_meta_message').html('Please select an item or a road/pavement/path on the map »');
$('.category_meta_message').removeClass('meta-highlight');
$("input[name=asset_details]").val('');
fixmystreet.assets.named_select_action_not_found.call(this);

Check warning on line 818 in web/cobrands/fixmystreet-uk-councils/assets.js

View check run for this annotation

Codecov / codecov/patch

web/cobrands/fixmystreet-uk-councils/assets.js#L818

Added line #L818 was not covered by tests
};

fixmystreet.assets.isleofwight.found_item = function(asset) {
var id = asset.attributes.central_asset_id || '';
if (id !== '') {
var attrib = asset.attributes;
var asset_name = attrib.feature_type_name + '; ' + attrib.site_name + '; ' + attrib.feature_location;
$('.category_meta_message').html('You have selected ' + asset_name);
$('.category_meta_message').addClass('meta-highlight');
$("input[name=asset_details]").val(asset_name);
} else {
fixmystreet.assets.isleofwight.not_found_msg_update();
}
fixmystreet.assets.named_select_action_found.call(this, asset);

Check warning on line 822 in web/cobrands/fixmystreet-uk-councils/assets.js

View check run for this annotation

Codecov / codecov/patch

web/cobrands/fixmystreet-uk-councils/assets.js#L822

Added line #L822 was not covered by tests
};

fixmystreet.assets.isleofwight.construct_message = function(asset) {
var id = asset.attributes.central_asset_id || '';
if (id !== '') {
var attrib = asset.attributes;
var asset_name = attrib.feature_type_name + '; ' + attrib.site_name + '; ' + attrib.feature_location;
$("input[name=asset_details]").val(asset_name);
return 'You have selected ' + asset_name;

Check warning on line 831 in web/cobrands/fixmystreet-uk-councils/assets.js

View check run for this annotation

Codecov / codecov/patch

web/cobrands/fixmystreet-uk-councils/assets.js#L826-L831

Added lines #L826 - L831 were not covered by tests
}
};

fixmystreet.assets.isleofwight.line_found_item = function(layer, feature) {
if ( fixmystreet.assets.selectedFeature() ) {
return;
}
fixmystreet.assets.isleofwight.found_item(feature);
fixmystreet.assets.isleofwight.found_item.call(layer, feature);

Check warning on line 839 in web/cobrands/fixmystreet-uk-councils/assets.js

View check run for this annotation

Codecov / codecov/patch

web/cobrands/fixmystreet-uk-councils/assets.js#L839

Added line #L839 was not covered by tests
};
fixmystreet.assets.isleofwight.line_not_found_msg_update = function(layer) {
if ( fixmystreet.assets.selectedFeature() ) {
return;
}
fixmystreet.assets.isleofwight.not_found_msg_update();
fixmystreet.assets.isleofwight.not_found_msg_update.call(layer);

Check warning on line 845 in web/cobrands/fixmystreet-uk-councils/assets.js

View check run for this annotation

Codecov / codecov/patch

web/cobrands/fixmystreet-uk-councils/assets.js#L845

Added line #L845 was not covered by tests
};

/* Lincolnshire */
Expand Down

0 comments on commit 8fee359

Please sign in to comment.