aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/hounslow/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/cobrands/hounslow/js.js')
-rw-r--r--web/cobrands/hounslow/js.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/web/cobrands/hounslow/js.js b/web/cobrands/hounslow/js.js
index e8772b691..7bd9fb91c 100644
--- a/web/cobrands/hounslow/js.js
+++ b/web/cobrands/hounslow/js.js
@@ -20,11 +20,14 @@ if (fixmystreet.cobrand == 'hounslow') {
// as the destination for reports in the "Public details" section.
// This is OK because the cobranded site only shows categories which
// Hounslow Highways actually handle.
- // Replacing this function with a no-op stops the changes made
- // to the cobranded councils_text_all.html from being clobbered and
- // the 'correct' (according to bodies set up within FMS) body names
- // being shown.
- fixmystreet.update_public_councils_text = function() {};
+ // To achieve this we ignore the passed list of bodies and always
+ // use "Hounslow Highways" when calling the original function.
+ // NB calling the original function is required so that private categories
+ // cause the correct text to be shown in the UI.
+ var original_update_public_councils_text = fixmystreet.update_public_councils_text;
+ fixmystreet.update_public_councils_text = function(text, bodies) {
+ original_update_public_councils_text.call(this, text, ['Hounslow Highways']);
+ };
}
})();