diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-07-31 11:29:11 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-07-31 11:29:11 +0100 |
commit | 939c6d6de069654fcbcb82722de5d71fd8cb1622 (patch) | |
tree | 20ddeca55ef6706643e4c0a385f90bea06698ee4 /templates | |
parent | 0032b9c0dccc20593dbf66dee5512f4edf7f945d (diff) |
Revert "[fixmystreet.com] Homepage button step A/B test."
This reverts commit 838708d3127bf5bd39375b19ad13b220637c851b.
Conflicts:
web/cobrands/fixmystreet/base.scss
web/cobrands/fixmystreet/layout.scss
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/fixmystreet.com/around/postcode_form.html | 48 | ||||
-rw-r--r-- | templates/web/fixmystreet.com/header_extra.html | 20 |
2 files changed, 0 insertions, 68 deletions
diff --git a/templates/web/fixmystreet.com/around/postcode_form.html b/templates/web/fixmystreet.com/around/postcode_form.html deleted file mode 100644 index afb3b66fb..000000000 --- a/templates/web/fixmystreet.com/around/postcode_form.html +++ /dev/null @@ -1,48 +0,0 @@ -[%# Identical to parent, but with an extra div and javascript for our homepage A/B test %] - -<div id="front-main"> - <div id="front-main-container"> - [% INCLUDE 'around/intro.html' %] - - <div id="homepage-ab-test"> - <p><a id="cta-report">Report a problem</a></p> - <p><a id="cta-view">Or view problems in an area you know</a></p> - </div> - - [% - question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); - %] - <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> - <label for="pc">[% question %]:</label> - <div> - <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ā%sā or ā%sā'), c.cobrand.example_places) %]"> - <input type="submit" value="[% loc('Go') %]" id="sub"> - </div> - [% IF partial_token %] - <input type="hidden" name="partial" value="[% partial_token.token %]"> - [% END %] - </form> - </div> -</div> - -<script type="text/javascript"> -$(function(){ - $('#homepage-ab-test a').on('click', function(e){ - e.preventDefault(); - $('#homepage-ab-test').fadeOut(250, function(){ - - /* fadeIn() normal form, and focus input */ - $('#postcodeForm').fadeIn(250, function(){ - $('#pc').focus(); - }); - - /* Can't just fadeIn() because #geolocate_link - should have { display: inline-block } */ - $('#geolocate_link').css({ - opacity: 0, - display: 'inline-block' - }).animate({ opacity: 1 }, 250); - }); - }); -}); -</script> diff --git a/templates/web/fixmystreet.com/header_extra.html b/templates/web/fixmystreet.com/header_extra.html index 71c3bace5..1cce668a5 100644 --- a/templates/web/fixmystreet.com/header_extra.html +++ b/templates/web/fixmystreet.com/header_extra.html @@ -2,24 +2,4 @@ <script src="[% start %][% version('/js/jquery.cookie.min.js') %]" type="text/javascript" charset="utf-8"></script> -[%# We are conducting an A/B experiment on the homepage %] -[% IF c.req.uri.path == '/' %] -<script src="//www.google-analytics.com/cx/api.js?experiment=cX9Tbz_VRl-cZDM5WVRgTQ"></script> -<script> -var variation = cxApi.chooseVariation(), - docElement = document.documentElement, - className = docElement.className; -docElement.className = className + ' ' + 'variant' + variation; -</script> -<style> -html.variant1 #homepage-ab-test { - display: block; -} -html.variant1 #postcodeForm, -html.variant1 #front-main a#geolocate_link { - display: none; -} -</style> -[% END %] - [% INCLUDE 'tracking_code.html' %] |