aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-04-03 10:37:39 +0100
committerStruan Donald <struan@exo.org.uk>2012-04-03 10:37:39 +0100
commit592924059a07a5a30e8a09dfc4ca8dea56c5c77a (patch)
treec99e86d3e3f780427bbf7a9ec0ae5187b697dfa5 /perllib/FixMyStreet/Map.pm
parent65066d275557e16448aa99ecdfa4df62d4d79649 (diff)
parentd92bbef188eff6c14adf0f0c7b032846b1be85a6 (diff)
Merge remote-tracking branch 'origin/master' into send-report-rewrite
Conflicts: bin/send-reports perllib/FixMyStreet/Cobrand/Default.pm perllib/FixMyStreet/Cobrand/FixMyStreet.pm
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r--perllib/FixMyStreet/Map.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm
index 2bccf1584..08bba3285 100644
--- a/perllib/FixMyStreet/Map.pm
+++ b/perllib/FixMyStreet/Map.pm
@@ -95,8 +95,10 @@ sub _map_features {
my $around_limit = $c->cobrand->on_map_list_limit || undef;
my @around_args = ( $min_lat, $max_lat, $min_lon, $max_lon, $interval );
- my $around_map_list = $c->cobrand->problems->around_map( @around_args, $around_limit );
my $around_map = $c->cobrand->problems->around_map( @around_args, undef );
+ my $around_map_list = $around_limit
+ ? $c->cobrand->problems->around_map( @around_args, $around_limit )
+ : $around_map;
my $dist;
mySociety::Locale::in_gb_locale {
200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * southampton.js
 * FixMyStreet JavaScript for Southampton
 */


$(function(){

    $('[placeholder]').focus(function(){
        var input = $(this);
        if (input.val() == input.attr('placeholder')) {
            input.val('');
            input.removeClass('placeholder');
            input.css({ 'color': '#000000' });
        }
    }).blur(function(){
        var input = $(this);
        if (input.val() === '' || input.val() == input.attr('placeholder')) {
            input.css({ 'color': '#999999' });
            input.val(input.attr('placeholder'));
        }
    }).blur();
        
    // use on() here because the #form_category may be replaced 
    // during the page's lifetime
    $("#problem_form").on("change.southampton", "select#form_category", 
      function() {    
        var category = $(this).val();
        if ('Potholes' == category) {
            if (!$('#potholes_extra').length) {
                var qns = '<div id="potholes_extra" style="margin:0; display:none;">' +
                '<div class="form-field"><label for="form_size">Size:</label>' +
                '<select name="detail_size"><option>-- Please select --<option>Unknown' +
                '<option>Small: No larger than a dinner plate (up to 30cm/12inches)' +
                '<option>Medium: No larger than a dustbin lid (up to 60cm/24inches)' +
                '<option>Large: Larger than a dustbin lid (over 60cm/24inches)' +
                '</select></div>' +
                '<div class="form-field"><label for="form_depth">Depth:</label>' +
                '<select name="detail_depth"><option>-- Please select --<option>Unknown' +
                '<option>No deeper than a golf ball (up to 4cm/1.5inches)' +
                '<option>No deeper than a tennis ball (up to 6.5cm/2.5inches)' +
                '<option>Deeper than a tennis ball' +
                '</select></div></div>';
                $('#form_title').closest('div.form-field').after(qns);
            } 
            $('#potholes_extra').show('fast');
        } else {
            $('#potholes_extra').hide('fast');
        }   
    }
    ).change(); // change called to trigger (in case we've come in with potholes selected)

});