diff options
author | Struan Donald <struan@exo.org.uk> | 2012-11-13 17:08:21 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-11-13 19:55:48 +0000 |
commit | 4560f0adbebb3493aa90dad7a8c938d3a24d4ae7 (patch) | |
tree | d38c5d9648872b4b0c68981ff9ea31cd13a688af /www/js | |
parent | a6ccb5ef3ad31d775d44bb8448e16595c2b434b5 (diff) |
remove old and tidy up code
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/map-OpenLayers.js | 4 | ||||
-rw-r--r-- | www/js/mobile.js | 27 |
2 files changed, 5 insertions, 26 deletions
diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js index 4649b90..1abffeb 100644 --- a/www/js/map-OpenLayers.js +++ b/www/js/map-OpenLayers.js @@ -236,10 +236,6 @@ function show_map(event) { displayProjection: new OpenLayers.Projection("EPSG:4326") }); - if ($('html').hasClass('mobile') && fixmystreet.page == 'around') { - $('#fms_pan_zoom').css({ top: '2.75em !important' }); - } - fixContentHeight(fixmystreet.map); fixmystreet.layer_options = OpenLayers.Util.extend({ diff --git a/www/js/mobile.js b/www/js/mobile.js index 7e0f654..b33f454 100644 --- a/www/js/mobile.js +++ b/www/js/mobile.js @@ -35,18 +35,12 @@ function valid_postcode(pc) { return false; } -function use_lat_long( lat, long ) { - show_around( lat, long ); -} - function location_error( msg ) { if ( msg === '' ) { $('#location_error').remove(); return; } - alert(msg); - if ( !$('#location_error') ) { $('#postcodeForm').after('<p id="location_error"></p>'); } @@ -97,7 +91,7 @@ function lookup_string(q) { $('#multiple').remove(); var multiple_html = '<ul id="multiple"><li>Multiple locations found, please select one:'; for ( i = 0; i < multiple.length; i++ ) { - multiple_html += '<li><a href="#" onclick="use_lat_long( ' + multiple[i].latitude + ',' + multiple[i].longitude +')">' + multiple[i].address + '</a></li>'; + multiple_html += '<li><a href="#" onclick="show_around( ' + multiple[i].latitude + ',' + multiple[i].longitude +')">' + multiple[i].address + '</a></li>'; } multiple_html += '</ul>'; $('#front-howto').hide(); @@ -301,7 +295,9 @@ function fileUploadFail() { var submit_clicked = null; function postReport(e) { - e.preventDefault(); + if ( e ) { + e.preventDefault(); + } // the .stopImmediatePropogation call in invalidHandler should render this // redundant but it doesn't seem to work so belt and braces :( @@ -477,20 +473,6 @@ function mark_here() { $('#mob_ok').on('vclick', set_location ); } -function account() { - $('#account').show(); - if ( localStorage.name ) { - if ( $('body').hasClass('signed-in-page') ) { - $('#user-meta').html('<p>Hi ' + localStorage.name + '</p>'); - } - - if ( $('#form_sign_in').length ) { - check_name( localStorage.name ); - $('.form-focus-hidden').show(); - } - } -} - function forget() { delete localStorage.name; delete localStorage.username; @@ -652,6 +634,7 @@ function submit_problem_show() { $('#form_sign_in').hide(); } else { if ( localStorage.name ) { + check_name( localStorage.name ); $('.form-focus-hidden').show(); } else { $('.form-focus-hidden').hide(); |