aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet.js
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2014-03-17 17:34:13 +0000
committerStruan Donald <struan@exo.org.uk>2014-03-25 13:13:30 +0000
commit87f54caa2618bbf873ac87b5b7bca04f7969d603 (patch)
treebebb27506a99e63529d213ad683672b8623c224d /web/js/fixmystreet.js
parent4db84e2b69378d6e26daa6ba460437d2e2c0d498 (diff)
Allow cobrands to set their own path to pin files
New cobrand function of pin_path that sets the path to where the image files for pins are located. Defaults to /i This still means they need to use the same file names but they can at least put those in a cobrand directory rather than having to overwrite the files in /i or fudge it with pin_colour
Diffstat (limited to 'web/js/fixmystreet.js')
-rw-r--r--web/js/fixmystreet.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 838351e8b..7d75c8b65 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -17,7 +17,11 @@ $(function(){
$html.removeClass('no-js').addClass('js');
// Preload the new report pin
- document.createElement('img').src = '/i/pin-green.png';
+ if ( typeof fixmystreet !== 'undefined' && typeof fixmystreet.pin_prefix !== 'undefined' ) {
+ document.createElement('img').src = fixmystreet.pin_prefix + 'pin-green.png';
+ } else {
+ document.createElement('img').src = '/i/pin-green.png';
+ }
// Focus on postcode box on front page
$('#pc').focus();