diff options
author | Chris Mytton <self@hecticjeff.net> | 2013-08-12 12:23:24 +0100 |
---|---|---|
committer | Chris Mytton <self@hecticjeff.net> | 2013-08-12 12:23:24 +0100 |
commit | 8dcf4567636cabee3178ab0b601930bb286d2067 (patch) | |
tree | 325e86f68a54a3bb1256cac5e92df80fb254d3b6 | |
parent | e36270119f2b7e1f6cbb00123005f2f5cfd53db7 (diff) |
Don't rely on the url to determine the cobrand
-rw-r--r-- | templates/web/default/common_header_tags.html | 2 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/templates/web/default/common_header_tags.html b/templates/web/default/common_header_tags.html index 346d53693..378265655 100644 --- a/templates/web/default/common_header_tags.html +++ b/templates/web/default/common_header_tags.html @@ -1,6 +1,8 @@ [% USE date %][% USE Math %] <meta http-equiv="content-type" content="text/html; charset=utf-8"> +<meta name="cobrand" content="[% c.cobrand.moniker %]"> + <script type="text/javascript" src="/js/validation_rules.js?[% Math.int( date.now / 3600 ) %]"></script> <script type="text/javascript" src="/js/translation_strings.[% lang_code %].js?[% Math.int( date.now / 3600 ) %]"></script> diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index b490c6177..5c914e3a8 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -53,16 +53,10 @@ function tabs(elem, indirect) { $(function(){ var $html = $('html'); - var cobrand; + var cobrand = $('meta[name="cobrand"]').attr('content'); var is_small_map = false; - if (window.location.href.indexOf('bromley') != -1) { - cobrand = 'bromley'; + if (cobrand === 'bromley' || cobrand === 'oxfordshire') { is_small_map = true; - } else if (window.location.href.indexOf('oxfordshire') != -1) { - cobrand = 'oxfordshire'; - is_small_map = true; - } else if (window.location.href.indexOf('zurich') != -1 || window.location.href.indexOf('zueri') != -1) { - cobrand = 'zurich'; } // Deal with switching between mobile and desktop versions on resize |