aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm4
-rw-r--r--perllib/FixMyStreet/Geocode/Bing.pm4
-rw-r--r--templates/web/bromley/header.html4
-rw-r--r--templates/web/bromley/index.html105
-rw-r--r--templates/web/bromley/report/display.html199
-rw-r--r--templates/web/bromley/report/new/fill_in_details_form.html213
-rw-r--r--templates/web/fixmystreet/report/new/councils_text_all.html4
-rw-r--r--templates/web/fixmystreet/report/new/fill_in_details_form.html2
-rw-r--r--web/cobrands/bromley/fixmystreet.js427
-rw-r--r--web/cobrands/bromley/layout.scss24
-rw-r--r--web/cobrands/fixmystreet/_base.scss5
-rw-r--r--web/cobrands/fixmystreet/_layout.scss13
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js66
-rw-r--r--web/js/map-OpenLayers.js6
14 files changed, 618 insertions, 458 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index ff0c64dc9..9baee5eb4 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -553,7 +553,7 @@ sub setup_categories_and_councils : Private {
_('-- Pick a category --'),
sort keys %{ Utils::london_categories() }
);
- $category_label = _('Category:');
+ $category_label = _('Category');
} else {
@@ -583,7 +583,7 @@ sub setup_categories_and_councils : Private {
if (@category_options) {
@category_options =
( _('-- Pick a category --'), @category_options, _('Other') );
- $category_label = _('Category:');
+ $category_label = _('Category');
}
}
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm
index 83fde0c2c..99197a5f9 100644
--- a/perllib/FixMyStreet/Geocode/Bing.pm
+++ b/perllib/FixMyStreet/Geocode/Bing.pm
@@ -64,7 +64,9 @@ sub string {
next if @valid_locations
&& $valid_locations[-1]{address}{postalCode} eq $_->{address}{postalCode}
&& ( $valid_locations[-1]{address}{locality} eq $_->{address}{adminDistrict2}
- || $valid_locations[-1]{address}{adminDistrict2} eq $_->{address}{locality} );
+ || $valid_locations[-1]{address}{adminDistrict2} eq $_->{address}{locality}
+ || $valid_locations[-1]{address}{locality} eq $_->{address}{locality}
+ );
( $latitude, $longitude ) = @{ $_->{point}->{coordinates} };
push (@$error, { address => $address, latitude => $latitude, longitude => $longitude });
diff --git a/templates/web/bromley/header.html b/templates/web/bromley/header.html
index 1b58bcccf..055bcf6a4 100644
--- a/templates/web/bromley/header.html
+++ b/templates/web/bromley/header.html
@@ -19,7 +19,7 @@
<![endif]-->
<script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
- [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/bromley/fixmystreet.js' %]
+ [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %]
<script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script>
<link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/bromley/favicon.ico">
@@ -37,7 +37,7 @@
</ul>
<div class="logo">
- <a href="http://www.bromley.gov.uk"><img src="http://www.bromley.gov.uk/site/images/bromley-logo.jpg" alt="London Borough of Bromley logo" width="159" height="114" /></a>
+ <a href="http://www.bromley.gov.uk"><img src="/cobrands/bromley/bromley-logo.jpg" alt="London Borough of Bromley logo" width="159" height="114" style="width:159px; height:114px;" /></a>
</div>
<!-- <div class="sign-in">
diff --git a/templates/web/bromley/index.html b/templates/web/bromley/index.html
new file mode 100644
index 000000000..51ec5619a
--- /dev/null
+++ b/templates/web/bromley/index.html
@@ -0,0 +1,105 @@
+[%# Assumes fixmystreet cobrand is using FMS map template - for bonus points preload all the right map elements. %]
+[% map_js = BLOCK %]
+<script>
+yepnope.addPrefix( 'preload', function ( resource ) {
+ resource.noexec = true;
+ return resource;
+});
+Modernizr.load({
+ load: [
+ "preload![% version('/js/OpenLayers.fixmystreet.js') %]",
+ "preload![% version('/js/map-OpenLayers.js') %]",
+ "preload![% version('/js/map-bing-ol.js') %]",
+ "preload![% version('/js/jquery.ba-hashchange.min.js') %]"
+ ]
+});
+</script>
+[% END %]
+
+[% INCLUDE 'header.html', title => '' , bodyclass => 'frontpage fullwidthpage' %]
+
+[% IF error %]
+ <p class="error">[% error %]</p>
+[% END %]
+
+
+<div id="front-main">
+ <div id="front-main-container">
+ <h1>Reporting a problem in Bromley&rsquo;s streets or parks</h1>
+
+ [%
+ question
+ = c.cobrand.enter_postcode_text()
+ || loc("Enter a nearby GB postcode, or street name and area");
+ %]
+
+ <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm">
+ <label for="pc">Enter a London Borough of Bromley postcode, or street name and area:</label>
+ <div>
+ <input type="text" name="pc" value="" 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="submit">
+ </div>
+ </form>
+
+ <p>This is primarily for reporting physical problems that can be fixed
+ like graffiti, fly tipping, or broken paving slabs to report other
+ kinds of problems like missed bins use our
+ <a href="http://www.bromley.gov.uk/report">online report it forms</a>.
+ </p>
+
+ </div>
+</div>
+
+<div class="tablewrapper">
+ <div id="front-howto">
+ <h2>[% loc('How to report a problem') %]</h2>
+
+ <ol class="big-numbers">
+ <li>[% question %]</li>
+ <li>[% loc('Locate the problem on a map of the area') %]</li>
+ <li>[% loc('Enter details of the problem') %]</li>
+ <li>It gets sent to the council</li>
+ </ol>
+
+ <section class="full-width">
+ [% INCLUDE "front/stats.html" %]
+ [% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %]
+ </section>
+ </div>
+
+
+ [%
+ recent_photos = c.cobrand.recent_photos(5);
+ %]
+
+ [% IF recent_photos.size %]
+ <div id="front-recently">
+ <h2>[% loc('Recently reported problems') %]</h2>
+
+ <section class="full-width">
+ <ul class="issue-list-a">
+ [% FOREACH p IN recent_photos %]
+ <li>
+ <a href="/report/[% p.id %]">
+ <div class="text">
+ <h4>[% p.title | html %]</h4>
+ <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small>
+ </div>
+ <div class="img">
+ <img alt="[% p.title | html %]" title="[% p.title | html %]" height="60" width="90" src="/photo/[% p.id %].fp.jpeg">
+ </div>
+ </a>
+ </li>
+ [% END %]
+ </ul>
+ </section>
+
+ </div>
+ [% END %]
+</div>
+
+
+<!-- [% TRY %][% INCLUDE 'front/news.html' %][% CATCH file %][% END %] -->
+
+
+[% INCLUDE 'footer.html' pagefooter = 'yes' %]
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html
new file mode 100644
index 000000000..5de338bf7
--- /dev/null
+++ b/templates/web/bromley/report/display.html
@@ -0,0 +1,199 @@
+[%
+ PROCESS "maps/${map.type}.html";
+
+ problem_title = problem.title _ ' - ' _ loc('Viewing a problem');
+ INCLUDE 'header.html'
+ title = problem_title
+ rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ]
+ robots = 'index, nofollow'
+ bodyclass = 'mappage'
+%]
+
+[% map_html %]
+
+</div>
+
+
+[% IF banner.id %]
+ <div class="banner">
+ <p id="[% banner.id %]">[% banner.text %]</p>
+ </div>
+[% END %]
+
+[% INCLUDE 'report/_main.html' %]
+
+<div class="shadow-wrap">
+ <ul id="key-tools">
+ <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
+ <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
+ <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
+ </ul>
+
+<div id="report-updates-data" class="hidden-js">
+ <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
+ <p><a href="[% c.uri_for( '/rss', problem.id ) %]">
+ <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float: right">
+ </a></p>
+ <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
+ <fieldset>
+ <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
+ <div class="form-txt-submit-box">
+ <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
+ <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
+ </div>
+ <input type="hidden" name="id" value="[% problem.id %]">
+ <input type="hidden" name="type" value="updates">
+ </fieldset>
+ </form>
+</div>
+
+</div>
+
+[% INCLUDE 'report/updates.html' %]
+
+<div id="update_form">
+ <h2>[% loc( 'Provide an update') %]</h2>
+
+ [% IF c.cobrand.moniker != 'emptyhomes' %]
+ <div class="general-sidebar-notes">
+ <p>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p>
+ </div>
+ [% END %]
+
+ [% INCLUDE 'errors.html' %]
+
+ <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
+ <fieldset>
+ <input type="hidden" name="submit_update" value="1">
+ <input type="hidden" name="id" value="[% problem.id | html %]">
+
+ <label for="form_update">[% loc( 'Update' ) %]</label>
+ [% IF field_errors.update %]
+ <div class='form-error'>[% field_errors.update %]</div>
+ [% END %]
+ <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea>
+
+ [% IF c.user && c.user.belongs_to_council( problem.council ) %]
+ <label for="form_state">[% loc( 'State' ) %]</label>
+ <select name="state" id="form_state">
+ [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
+ loc('Investigating')], ['planned', loc('Planned')], ['in progress',
+ loc('In Progress')], ['closed', loc('Closed')], ['fixed', loc('Fixed')] ] %]
+ <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
+ [% END %]
+ </select>
+ [% ELSE %]
+ [% IF problem.is_fixed AND c.user_exists AND c.user.id == problem.user_id %]
+
+ <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
+ <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
+
+ [% ELSIF !problem.is_fixed %]
+
+ <div class="checkbox-group">
+ <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
+ <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
+ </div>
+
+ [% END %]
+ [% END %]
+
+ [% IF c.cobrand.allow_photo_upload %]
+ <div id="fileupload_normalUI">
+ [% IF upload_fileid %]
+ <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
+ <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p>
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ [% END %]
+ <label for="form_photo">[% loc('Photo') %]</label>
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+ <input type="file" name="photo" id="form_photo">
+ </div>
+ [% END %]
+
+ [% IF c.user_exists %]
+
+ [% INCLUDE name %]
+
+ <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
+
+
+ [% ELSE %]
+
+ <label for="form_rznvy">[% loc('Email' ) %]</label>
+ [% IF field_errors.email %]
+ <p class='form-error'>[% field_errors.email %]</p>
+ [% END %]
+ <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>
+
+ <div id="form_sign_in">
+ <h3>[% loc("Now to submit your update&hellip;") %]</h3>
+ <h2>[% loc("Do you have a FixMyStreet password?") %]</h2>
+
+ <div id="form_sign_in_no" class="form-box">
+ <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
+
+ [% INCLUDE name %]
+
+ <div class="general-sidebar-notes">
+ <p class="dark">[% loc('We never show your email') %]</p>
+ <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
+ </div>
+
+ <label for="password_register">[% loc('Password (optional)') %]</label>
+
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
+ <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
+ </div>
+ </div>
+ <div id="form_sign_in_yes" class="form-box">
+ <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
+
+ <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
+ [% IF field_errors.password %]
+ <p class='form-error'>[% field_errors.password %]</p>
+ [% END %]
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
+ <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
+ </div>
+
+ <div class="checkbox-group">
+ <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
+ <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
+ </div>
+ </div>
+ </div>
+
+ [% END %]
+ </fieldset>
+ </form>
+</div>
+
+
+
+[% INCLUDE 'footer.html' %]
+
+[% BLOCK name %]
+ [% IF problem.council == '2482' %]
+ [% extra_name_info = 1 %]
+ [% INCLUDE 'report/new/extra_name.html' %]
+ [% END %]
+ <label for="form_name">[% loc('Name') %]</label>
+ [% IF field_errors.name %]
+ <p class='form-error'>[% field_errors.name %]</p>
+ [% END %]
+ <input type="text" name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
+
+ <div class="checkbox-group">
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' UNLESS update.anonymous %]>
+ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
+ </div>
+ <div class="checkbox-group">
+ <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
+ <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
+ </div>
+[% END %]
diff --git a/templates/web/bromley/report/new/fill_in_details_form.html b/templates/web/bromley/report/new/fill_in_details_form.html
new file mode 100644
index 000000000..c38c1b0c7
--- /dev/null
+++ b/templates/web/bromley/report/new/fill_in_details_form.html
@@ -0,0 +1,213 @@
+<div id="report-a-problem-main">
+ <h1>[% loc('Reporting a problem') %]</h1>
+
+ [% IF js %]
+ <p id="councils_text">
+ [%
+ tprintf(
+ loc('All the information you provide here will be sent to <strong>%s</strong>.'),
+ loc('the local council')
+ );
+ %]
+ [% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %]
+ </p>
+ [% ELSE %]
+ [% PROCESS 'report/new/councils_text.html' %]
+ [% END %]
+
+ <div id="report-a-problem-sidebar">
+ <!--
+ The text for this section needs checking, but I can't work out which bit comes from where
+ -->
+ <div class="sidebar-tips">
+ [% IF report.used_map %]
+ [% IF partial_token %]
+ <p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
+ [% END %]
+ <p>[% loc('You have located the problem at the point marked with a green pin on the map. If this is not the correct location, simply click on the map again. ') %]</p>
+ [% END %]
+
+ <p>
+ [% IF report.used_map %]
+ [% INCLUDE 'report/new/fill_in_details_text.html' %]
+ [% ELSE %]
+ [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %]
+ [% END %]
+ </p>
+ </div>
+
+ <div class="sidebar-notes">
+ [% INCLUDE 'report/new/notes.html' %]
+ </div>
+
+ </div>
+
+ [% INCLUDE 'errors.html' %]
+ <fieldset>
+ <div id="problem_form">
+
+ [% INCLUDE 'report/new/form_heading.html' %]
+
+
+ [% IF field_errors.council %]
+ <p class='form-error'>[% field_errors.council %]</p>
+ [% END %]
+
+
+
+ <label for="form_title">[% loc('Subject') %]</label>
+ [% IF field_errors.title %]
+ <p class='form-error'>[% field_errors.title %]</p>
+ [% END %]
+ <input type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% loc('Provide a title') %]" required>
+
+ <label for="form_detail">[% loc('Details') %]</label>
+ [% IF field_errors.detail %]
+ <p class='form-error'>[% field_errors.detail %]</p>
+ [% END %]
+ <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please fill in details of the problem.') %]" required>[% report.detail | html %]</textarea>
+
+ [% IF js %]
+ <div id="form_category_row">
+ <label for="form_category">[% loc('Category') %]</label>
+ <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select>
+ </div>
+ [% ELSE %]
+ [% IF category_options.size %]
+ [% IF field_errors.category %]
+ <p class='form-error'>[% field_errors.category %]</p>
+ [% END %]
+
+ [% PROCESS "report/new/category.html" %]
+ [% END %]
+ [% END %]
+
+ [%- IF category_extras %]
+ [% PROCESS "report/new/category_extras.html" %]
+ [%- END %]
+
+ [% IF c.cobrand.allow_photo_upload %]
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+
+
+ [% IF upload_fileid || report.photo %]
+ [% IF upload_fileid %]
+ <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ [% END %]
+
+ <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p>
+
+ [% IF report.photo %]
+ <img align="right" src="/photo/[% report.id %].jpeg">
+ [% END %]
+ [% END %]
+
+ <label for="form_photo">[% loc('Photo') %]</label>
+ <input type="file" name="photo" id="form_photo">
+ [% END %]
+
+ [% IF c.user_exists %]
+ <div class="form-box">
+ <label for="form_may_show_nameme">[% loc('Name') %]</label>
+ [% IF field_errors.name %]
+ <p class='form-error'>[% field_errors.name %]</p>
+ [% END %]
+ <input type="text" class="validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+
+ [%# if there is nothing in the name field then set check box as default on form %]
+ <div class="checkbox-group">
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]>
+ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
+ </div>
+
+ <div class="general-sidebar-notes">
+ <p>[% loc('We never show your email address or phone number.') %]</p>
+ </div>
+
+ <label for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
+
+ <div class="form-txt-submit-box">
+ <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
+ </div>
+ </div>
+ [% ELSE %]
+
+ <label for="form_email">[% loc('Your email') %]</label>
+ [% IF field_errors.email %]
+ <p class='form-error'>[% field_errors.email %]</p>
+ [% END %]
+ <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required>
+
+ <div id="form_sign_in">
+ <h3>[% loc("Now to submit your report&hellip;") %]</h3>
+ <h2>[% loc("Do you have a FixMyStreet password?") %]</h2>
+
+ <div id="form_sign_in_no" class="form-box">
+ <h5>[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5>
+
+ [% INCLUDE 'report/new/extra_name.html' %]
+
+ <label for="form_may_show_nameme">[% loc('Name') %]</label>
+ [% IF field_errors.name %]
+ <p class='form-error'>[% field_errors.name %]</p>
+ [% END %]
+
+ <input type="text" class="form-focus-trigger validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+
+ [%# if there is nothing in the name field then set check box as default on form %]
+ <div class="checkbox-group">
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]>
+ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
+ </div>
+
+ <div class="general-sidebar-notes form-focus-hidden">
+ <p class="dark">[% loc('We never show your email address or phone number.') %]</p>
+ <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
+ </div>
+
+ <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="form-focus-hidden" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
+
+ <label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label>
+
+ <div class="form-txt-submit-box form-focus-hidden">
+ <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
+ <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
+ </div>
+ </div>
+
+ <div id="form_sign_in_yes" class="form-box">
+
+ <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
+
+ <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
+ <div class="form-txt-submit-box">
+ [% IF field_errors.password %]
+ <p class='form-error'>[% field_errors.password %]</p>
+ [% END %]
+ <input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
+ <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]">
+ </div>
+
+ <div class="checkbox-group">
+ <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
+ <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
+ </div>
+ </div>
+
+ </div>
+
+ [% END %]
+ </div>
+ </fieldset>
+
+ [% IF partial_token %]
+ <input type="hidden" name="partial" value="[% partial_token.token %]">
+ [% END %]
+
+ <input type="hidden" name="submit_problem" value="1">
+</div>
diff --git a/templates/web/fixmystreet/report/new/councils_text_all.html b/templates/web/fixmystreet/report/new/councils_text_all.html
index fb10ec4fd..2f06686d8 100644
--- a/templates/web/fixmystreet/report/new/councils_text_all.html
+++ b/templates/web/fixmystreet/report/new/councils_text_all.html
@@ -1,5 +1,5 @@
<p>
-[% IF all_councils.${area_ids_to_list.0}.type == 'LBO' %]
+[% IF all_councils.${area_ids_to_list.0}.type == 'LBO' AND area_ids_to_list.0 != 2482 %]
[%
tprintf(
loc('All the information you provide here will be sent to <strong>%s</strong> or a relevant local body such as <strong>TfL</strong>, via the London Report-It system.'),
@@ -16,4 +16,4 @@
[% END %]
[% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %]
-</p> \ No newline at end of file
+</p>
diff --git a/templates/web/fixmystreet/report/new/fill_in_details_form.html b/templates/web/fixmystreet/report/new/fill_in_details_form.html
index 5ee11fb57..4ee634677 100644
--- a/templates/web/fixmystreet/report/new/fill_in_details_form.html
+++ b/templates/web/fixmystreet/report/new/fill_in_details_form.html
@@ -69,7 +69,7 @@
[% IF js %]
<div id="form_category_row">
- <label class="inline" for="form_category">[% loc('Category') %]</label>
+ <label for="form_category">[% loc('Category') %]</label>
<select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select>
</div>
[% ELSE %]
diff --git a/web/cobrands/bromley/fixmystreet.js b/web/cobrands/bromley/fixmystreet.js
deleted file mode 100644
index bfe985d5f..000000000
--- a/web/cobrands/bromley/fixmystreet.js
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * fixmystreet.js
- * FixMyStreet JavaScript
- */
-
-/*
- * general height fixing function
- *
- * elem1: element to check against
- * elem2: target element
- * offset: this will be added (if present) to the final value, useful for height errors
- */
-function heightFix(elem1, elem2, offset){
- var h1 = $(elem1).height(),
- h2 = $(elem2).height();
- if(offset === undefined){
- offset = 0;
- }
- if(h1 > h2){
- $(elem2).css({'min-height':h1+offset});
- }
-}
-
-
-/*
- * very simple tab function
- *
- * elem: trigger element, must have an href attribute (so probably needs to be an <a>)
- */
-function tabs(elem, indirect) {
- var href = elem.attr('href');
- //stupid IE sometimes adds the full uri into the href attr, so trim
- var start = href.indexOf('#'),
- target = href.slice(start, href.length);
-
- if (indirect) {
- elem = $(target + '_tab');
- }
-
- if(!$(target).hasClass('open'))
- {
- //toggle class on nav
- $('.tab-nav .active').removeClass('active');
- elem.addClass('active');
-
- //hide / show the right tab
- $('.tab.open').hide().removeClass('open');
- $(target).show().addClass('open');
- }
-}
-
-
-$(function(){
- var $html = $('html');
-
- var last_type;
- $(window).resize(function(){
- var type = $('#site-header').css('borderTopWidth');
- if (type == '4px') { type = 'mobile'; }
- else if (type == '0px') { type = 'desktop'; }
- else { return; }
- if (last_type == type) { return; }
- if (type == 'mobile') {
- $html.addClass('mobile');
- $('#map_box').prependTo('.content').css({
- zIndex: '', position: '',
- top: '', left: '', right: '', bottom: '',
- width: '', height: '10em',
- margin: ''
- });
- if (typeof fixmystreet !== 'undefined') {
- fixmystreet.state_map = ''; // XXX
- }
- if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') {
- // Immediately go full screen map if on around page
- // $('#site-header').hide();
- $('#map_box').prependTo('.wrapper').css({
- position: 'absolute',
- top: 0, left: 0, right: 0, bottom: 0,
- height: 'auto',
- margin: 0
- });
- $('#fms_pan_zoom').css({ top: '2.75em !important' });
- $('.big-green-banner')
- .addClass('mobile-map-banner')
- .appendTo('#map_box')
- .text('Place pin on map')
- .prepend('<a href="/">home</a>');
- }
- $('span.report-a-problem-btn').on('click.reportBtn', function(){
- $('html, body').animate({scrollTop:0}, 500);
- }).css({ cursor:'pointer' }).on('hover.reportBtn', function(){
- $(this).toggleClass('hover');
- });
- } else {
- // Make map full screen on non-mobile sizes.
- $html.removeClass('mobile');
- var map_pos = 'fixed', map_height = '100%';
- //if ($html.hasClass('ie6')) {
- map_pos = 'absolute';
- map_height = $(window).height();
- //}
- $('#map_box').prependTo('.wrapper').css({
- zIndex: 0, position: map_pos,
- top: 0, left: 0, right: 0, bottom: 0,
- width: '100%', height: map_height,
- margin: 0
- });
- if (typeof fixmystreet !== 'undefined') {
- $('#bromley-footer').hide();
- fixmystreet.state_map = 'full';
- }
- if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') {
- // Remove full-screen-ness
- // $('#site-header').show();
- $('#fms_pan_zoom').css({ top: '4.75em !important' });
- $('.big-green-banner')
- .removeClass('mobile-map-banner')
- .prependTo('#side')
- .text('Click map to report a problem');
- }
- $('span.report-a-problem-btn').css({ cursor:'' }).off('.reportBtn');
- }
- last_type = type;
- }).resize();
-
- /*
- * Report a problem page
- */
- //desktop
- if ($('#report-a-problem-sidebar').is(':visible')) {
- heightFix('#report-a-problem-sidebar', '.content', 26);
- }
-
- //show/hide notes on mobile
- $('.mobile #report-a-problem-sidebar').after('<a href="#" class="rap-notes-trigger button-right">How to send successful reports</a>').hide();
- $('.rap-notes-trigger').click(function(e){
- e.preventDefault();
- //check if we've already moved the notes
- if($('.rap-notes').length > 0){
- //if we have, show and hide .content
- $('.content').hide();
- $('.rap-notes').show();
- }else{
- //if not, move them and show, hiding .content
- $('.content').after('<div class="content rap-notes"></div>').hide();
- $('#report-a-problem-sidebar').appendTo('.rap-notes').show().after('<a href="#" class="rap-notes-close button-left">Back</a>');
- }
- $('html, body').scrollTop($('#report-a-problem-sidebar').offset().top);
- location.hash = 'rap-notes';
- });
- $('.mobile').on('click', '.rap-notes-close', function(e){
- e.preventDefault();
- //hide notes, show .content
- $('.content').show();
- $('.rap-notes').hide();
- $('html, body').scrollTop($('#mob_ok').offset().top);
- location.hash = 'report';
- });
-
- //move 'skip this step' link on mobile
- $('.mobile #skip-this-step').hide();
- $('.mobile #skip-this-step a').addClass('chevron').wrap('<li>').appendTo('#key-tools');
-
- /*
- * Tabs
- */
- //make initial tab active
- $('.tab-nav a').first().addClass('active');
- $('.tab').first().addClass('open');
-
- //hide other tabs
- $('.tab').not('.open').hide();
-
- //set up click event
- $(".tab-nav").on('click', 'a', function(e){
- e.preventDefault();
- tabs($(this));
- });
- $('.tab_link').click(function(e) {
- e.preventDefault();
- tabs($(this), 1);
- });
-
- /*
- * Skip to nav on mobile
- */
- $('.mobile').on('click', '#nav-link', function(e){
- e.preventDefault();
- var offset = $('#main-nav').offset().top;
- $('html, body').animate({scrollTop:offset}, 1000);
- });
-
-
- /*
- * Show stuff on input focus
- */
- $('.form-focus-hidden').hide();
- $('.form-focus-trigger').on('focus', function(){
- $('.form-focus-hidden').fadeIn(500);
- });
-
- /*
- * Show on click - pretty generic
- */
- $('.hideshow-trigger').on('click', function(e){
- e.preventDefault();
- var href = $(this).attr('href'),
- //stupid IE sometimes adds the full uri into the href attr, so trim
- start = href.indexOf('#'),
- target = href.slice(start, href.length);
-
- $(target).removeClass('hidden-js');
-
- $(this).hide();
- });
-
- /*
- * nicetable - on mobile shift 'name' col to be a row
- */
- $('.mobile .nicetable th.title').remove();
- $('.mobile .nicetable td.title').each(function(i){
- $(this).attr('colspan', 5).insertBefore($(this).parent('tr')).wrap('<tr class="heading" />');
- });
- // $('.mobile .nicetable tr.heading > td.title').css({'min-width':'300px'});
- // $('.mobile .nicetable tr > td.data').css({'max-width':'12%'});
-
- /*
- * Map controls prettiness
- */
- //add links container (if its not there)
- if($('#sub_map_links').length === 0){
- $('<p id="sub_map_links" />').insertAfter($('#map'));
- }
-
-// A sliding drawer from the bottom of the page, small version
-// that doesn't change the main content at all.
-$.fn.small_drawer = function(id) {
- this.toggle(function(){
- var $this = $(this), d = $('#' + id);
- if (!$this.addClass('hover').data('setup')) {
- d.hide().removeClass('hidden-js').css({
- padding: '1em',
- background: '#fff'
- });
- $this.data('setup', true);
- }
- d.slideDown();
- }, function(e){
- var $this = $(this), d = $('#' + id);
- $this.removeClass('hover');
- d.slideUp();
- });
-};
-
-// A sliding drawer from the bottom of the page, large version
-$.fn.drawer = function(id, ajax) {
- // IE7 positions the fixed tool bar 1em to the left unless it comes after
- // the full-width section, ho-hum. Move it to where it would be after an
- // open/close anyway
- if ($('html.ie7').length) {
- var $sw = $('.shadow-wrap'), $content = $('.content[role="main"]');
- $sw.appendTo($content);
- }
- this.toggle(function(){
- var $this = $(this), d = $('#' + id), $content = $('.content[role="main"]');
- if (!$this.addClass('hover').data('setup')) {
- // make a drawer div with an innerDiv
- if (!d.length) {
- d = $('<div id="' + id + '">');
- }
- var innerDiv = $('<div>');
- d.wrapInner(innerDiv);
-
- // if ajax, load it with a spinner
- if (ajax) {
- var href = $this.attr('href') + ';ajax=1';
- $this.prepend(' <img class="spinner" src="/cobrands/fixmystreet/images/spinner-black-333.gif" style="margin-right:2em;">');
- innerDiv.load(href, function(){
- $('.spinner').remove();
- });
- }
-
- // Tall drawer - put after .content for scrolling to work okay.
- // position over the top of the main .content in precisely the right location
- d.insertAfter($content).addClass('content').css({
- position: 'absolute',
- zIndex: '1100',
- marginTop: $('html.ie6, html.ie7').length ? '-3em' : 0, // IE6/7 otherwise include the 3em padding and stay too low
- left: 0,
- top: $(window).height() - $content.offset().top
- }).removeClass('hidden-js').find('h2').css({ marginTop: 0 });
- $this.data('setup', true);
- }
-
- //do the animation
- $('.shadow-wrap').prependTo(d).addClass('static');
- d.show().animate({top:'3em'}, 1000, function(){
- $content.fadeOut(function() {
- d.css({ position: 'relative' });
- });
- });
- }, function(e){
- var $this = $(this), d = $('#' + id), $sw = $('.shadow-wrap'),
- $content = $('.content[role="main"]'),
- tot_height = $(window).height() - d.offset().top;
- $this.removeClass('hover');
- d.css({ position: 'absolute' }).animate({ top: tot_height }, 1000, function(){
- d.hide();
- $sw.appendTo($content).removeClass('static');
- });
- $content.show();
- });
-};
-
- if ($('html.mobile').length) {
- $('#council_wards').hide().removeClass('hidden-js').find('h2').hide();
- $('#key-tool-wards').click(function(e){
- e.preventDefault();
- $('#council_wards').slideToggle('800', function(){
- $('#key-tool-wards').toggleClass('active');
- });
- });
- } else {
- $('#key-tool-wards').drawer('council_wards', false);
- $('#key-tool-around-updates').drawer('updates_ajax', true);
- }
- $('#key-tool-report-updates').small_drawer('report-updates-data');
-
- // Go directly to RSS feed if RSS button clicked on alert page
- // (due to not wanting around form to submit, though good thing anyway)
- $('.container').on('click', '#alert_rss_button', function(e){
- e.preventDefault();
- var feed = $('input[name=feed][type=radio]:checked').nextAll('a').attr('href');
- window.location.href = feed;
- });
- $('.container').on('click', '#alert_email_button', function(e){
- e.preventDefault();
- var form = $('<form/>').attr({ method:'post', action:"/alert/subscribe" });
- $('#alerts input[type=text], #alerts input[type=hidden], #alerts input[type=radio]:checked').each(function() {
- var $v = $(this);
- $('<input/>').attr({ name:$v.attr('name'), value:$v.val(), type:'hidden' }).appendTo(form);
- });
- form.submit();
- });
-
- //add permalink on desktop, force hide on mobile
- $('#sub_map_links').append('<a href="#" id="map_permalink">Permalink</a>');
- if($('.mobile').length){
- $('#map_permalink').hide();
- $('#key-tools a.feed').appendTo('#sub_map_links');
- $('#key-tools li:empty').remove();
- $('#report-updates-data').insertAfter($('#map_box'));
- }
- //add open/close toggle button on desk
- $('#sub_map_links').prepend('<span id="map_links_toggle">&nbsp;</span>');
-
- //set up map_links_toggle click event
- $('#map_links_toggle').on('click', function(){
- var maplinks_width = $('#sub_map_links').width();
-
- if($(this).hasClass('closed')){
- $(this).removeClass('closed');
- $('#sub_map_links').animate({'right':'0'}, 1200);
- }else{
- $(this).addClass('closed');
- $('#sub_map_links').animate({'right':-maplinks_width}, 1200);
- }
- });
-
-
- /*
- * Add close buttons for .promo's
- */
- if($('.promo').length){
- $('.promo').append('<a href="#" class="close-promo">x</a>');
- }
- //only close its own parent
- $('.promo').on('click', '.close-promo', function(e){
- e.preventDefault();
- $(this).parent('.promo').animate({
- 'height':0,
- 'margin-bottom':0,
- 'padding-top':0,
- 'padding-bottom':0
- },{
- duration:500,
- queue:false
- }).fadeOut(500);
- });
-
-
-
- /*
- * Fancybox fullscreen images
- */
- $('a[rel=fancy]').fancybox({
- 'overlayColor': '#000000'
- });
-
- /*
- * heightfix the desktop .content div
- *
- * this must be kept near the end so that the
- * rendered height is used after any page manipulation (such as tabs)
- */
- if (!$('html.mobile').length) {
- if (!($('body').hasClass('frontpage'))){
- heightFix(window, '.content', -110);
- }
- }
-
-});
-
-/*
-XXX Disabled because jerky on Android and makes map URL bar height too small on iPhone.
-// Hide URL bar
-$(window).load(function(){
- window.setTimeout(function(){
- var s = window.pageYOffset || document.compatMode === "CSS1Compat" && document.documentElement.scrollTop || document.body.scrollTop || 0;
- if (s < 20 && !location.hash) {
- window.scrollTo(0, 1);
- }
- }, 0);
-});
-*/
-
diff --git a/web/cobrands/bromley/layout.scss b/web/cobrands/bromley/layout.scss
index 2724ac83b..ec3b45201 100644
--- a/web/cobrands/bromley/layout.scss
+++ b/web/cobrands/bromley/layout.scss
@@ -1,6 +1,7 @@
@import "_colours";
@import "../fixmystreet/_layout";
+// So that map appears underneath the header
.wrapper {
position: relative;
}
@@ -29,16 +30,23 @@ body {
}
// Bit of extra spacing needed under Bromley header
+#front-main {
+ top: -16em;
+}
body.frontpage .table-cell .content {
- margin-top: 15em;
+ margin-top: 16em;
}
-.ie6, .ie7 {
+.ie6 {
#front-main {
- top: -2em;
left: 1.5em;
}
+}
+.ie6, .ie7 {
+ #front-main {
+ top: -3em;
+ }
body.frontpage .table-cell .content {
- margin-top: 11em;
+ margin-top: 12em;
}
}
@@ -61,13 +69,15 @@ body.mappage .content {
}
}
+// As map can scroll and isn't at the top, give it an edge
#map_box {
- border-top: solid 1px #666;
- border-bottom: solid 1px #666;
+ border-top: solid 1px #999;
+ border-bottom: solid 1px #999;
}
// Perhaps fix map location (should be in central?)
-.ie6 #map_box {
+.ie6 #map_box, .ie7 #map_box {
right: -30em;
+ top: 0;
}
diff --git a/web/cobrands/fixmystreet/_base.scss b/web/cobrands/fixmystreet/_base.scss
index db348c2a4..66ce2d96b 100644
--- a/web/cobrands/fixmystreet/_base.scss
+++ b/web/cobrands/fixmystreet/_base.scss
@@ -151,6 +151,11 @@ select, input, textarea {
font-size: 99%;
max-width: 95%;
}
+.ie7 {
+ select, input, textarea {
+ max-width: none;
+ }
+}
// links
diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss
index 5fb65ee72..3c762ad2d 100644
--- a/web/cobrands/fixmystreet/_layout.scss
+++ b/web/cobrands/fixmystreet/_layout.scss
@@ -223,6 +223,9 @@ h1 {
// map page - has fixed header and different styling
body.mappage {
+ .container {
+ width: auto;
+ }
.content {
float:left;
}
@@ -741,7 +744,7 @@ textarea.form-error {
}
}
.ie6, .ie7 {
- #report-a-problem-sidebar {
+ #report-a-problem-sidebar, .general-sidebar-notes {
left: 29em; // 0.5em left margin gone on .content in IE6/7, so reduce this accordingly.
}
}
@@ -899,10 +902,18 @@ body.frontpage {
}
}
}
+ a {
+ color: $primary_text;
+ text-decoration: underline;
+ &:hover {
+ text-decoration: none;
+ }
+ }
a#geolocate_link {
background:none;
color:#222;
margin:-1em 0 0.5em 0;
+ text-decoration: none;
&:hover {
text-decoration:underline;
background:none;
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 27b2b345b..ba1370417 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -53,6 +53,11 @@ function tabs(elem, indirect) {
$(function(){
var $html = $('html');
+ var cobrand;
+ if (window.location.href.indexOf('bromley') != -1) {
+ cobrand = 'bromley';
+ }
+
// Deal with switching between mobile and desktop versions on resize
var last_type;
$(window).resize(function(){
@@ -74,7 +79,9 @@ $(function(){
}
if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') {
// Immediately go full screen map if on around page
- $('#site-header').hide();
+ if (cobrand != 'bromley') {
+ $('#site-header').hide();
+ }
$('#map_box').prependTo('.wrapper').css({
position: 'absolute',
top: 0, left: 0, right: 0, bottom: 0,
@@ -96,23 +103,52 @@ $(function(){
} else {
// Make map full screen on non-mobile sizes.
$html.removeClass('mobile');
- var map_pos = 'fixed', map_height = '100%';
- if ($html.hasClass('ie6')) {
- map_pos = 'absolute';
- map_height = $(window).height();
+ if (cobrand == 'bromley') {
+ var $window = $(window), $content = $('.content'), o = $content.offset();
+ if ($html.hasClass('ie6')) {
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: 'absolute',
+ right: 0, top: '4em',
+ width: $window.width() - o.left - $content.outerWidth(),
+ height: $window.height() - o.top + 32,
+ margin: 0
+ });
+ } else {
+ var map_height = $window.height() - o.top;
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: 'fixed',
+ right: 0, top: o.top, bottom: 0,
+ width: $window.width() - o.left - $content.outerWidth(),
+ height: map_height,
+ margin: 0
+ });
+ }
+ } else if ($html.hasClass('ie6')) {
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: 'absolute',
+ top: 0, left: 0, right: 0, bottom: 0,
+ width: '100%', height: $(window).height(),
+ margin: 0
+ });
+ } else {
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: 'fixed',
+ top: 0, left: 0, right: 0, bottom: 0,
+ width: '100%', height: '100%',
+ margin: 0
+ });
+ }
+ if (cobrand == 'bromley') {
+ $('#bromley-footer').hide();
}
- $('#map_box').prependTo('.wrapper').css({
- zIndex: 0, position: map_pos,
- top: 0, left: 0, right: 0, bottom: 0,
- width: '100%', height: map_height,
- margin: 0
- });
if (typeof fixmystreet !== 'undefined') {
fixmystreet.state_map = 'full';
}
if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') {
// Remove full-screen-ness
- $('#site-header').show();
+ if (cobrand != 'bromley') {
+ $('#site-header').show();
+ }
$('#fms_pan_zoom').css({ top: '4.75em !important' });
$('.big-green-banner')
.removeClass('mobile-map-banner')
@@ -406,7 +442,11 @@ $.fn.drawer = function(id, ajax) {
*/
if (!$('html.mobile').length) {
if (!($('body').hasClass('frontpage'))){
- heightFix(window, '.content', -176);
+ var offset = -176;
+ if (cobrand == 'bromley') {
+ offset = -110;
+ }
+ heightFix(window, '.content', offset);
}
}
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 5f60a4437..e4859b590 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -236,7 +236,9 @@ $(function(){
if (fixmystreet.state_map && fixmystreet.state_map == 'full') {
// TODO Work better with window resizing, this is pretty 'set up' only at present
- var q = $('#map_box').width() / 4;
+ var $content = $('.content'), mb = $('#map_box'),
+ q = ( $content.offset().left - mb.offset().left + $content.width() ) / 2;
+ if (q < 0) { q = 0; }
// Need to try and fake the 'centre' being 75% from the left
fixmystreet.map.pan(-q, -25, { animate: false });
fixmystreet.map.events.register("movestart", null, function(e){
@@ -477,7 +479,7 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
fixmystreet.map.getProjectionObject()
);
var p = fixmystreet.map.getViewPortPxFromLonLat(lonlat);
- p.x -= $map_box.width() / 3;
+ p.x -= ( o.left - bo.left + w ) / 2;
lonlat = fixmystreet.map.getLonLatFromViewPortPx(p);
fixmystreet.map.panTo(lonlat);
}