Changeset 214


Ignore:
Timestamp:
Oct 27, 2006, 10:43:49 PM (13 years ago)
Author:
David Sheldon
Message:

Report bad postcodes.

Location:
trunk/npemap.org.uk/static
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/static/tiles/grid.css

    r203 r214  
    6969   }
    7070
     71   div.report_form,#bad {
     72     font-size: 60%;
     73   }
     74
     75   div.report_form {
     76     display: none;
     77   }
     78
     79   div.report_form input {
     80     font: normal 100% arial ;
     81     padding: 1px;
     82     
     83   }
     84
  • trunk/npemap.org.uk/static/tiles/map.html

    r203 r214  
    7171                <div><span class="terms" id="postcode_detail"></span></div>
    7272    <div><span class="terms" id="source_detail"></span></div>
    73          <span class="terms">This will contain a form to report a problem with this postcode, in the meantime email us.</span>
     73    <span id="bad">Problem?</span>
     74    <div class="report_form" id="report_form">
     75      <form method="post" action="../../cgi/bad-postcode.fcgi">
     76      <input type="hidden" name="postcode" id="postcode_id_detail" />
     77      <label for="reason"><span title="Why you think it is incorrect">Problem:</span></label>
     78     
     79      <input type="text" name="reason" id="reason" size="45"/><br/>
     80      <label for="reason_email"><span title="So we can let you know what we're doing about it.">email</span></label>
     81      <input type="text" name="email" id="reason_email" size="30"/>
     82      <input alt="submit" src="../images/btn_submit.png" type="image" />
     83
     84      </form>
     85    </div>
    7486  </div>
    7587  <div id="postcode_form">
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r213 r214  
    110110      YAHOO.util.Dom.setXY(markerElement, [(x-markerXOffset), (y-markerYOffset)]);
    111111      markerElement.style.visibility = 'visible';
     112      hideMarkerWindow();
    112113                       
    113114      postcodeFormElement.style.display = 'block';
     
    134135
    135136function showMarkerWindow(x,y, postcode, easting, northing, source, id) {
     137  closePostcodeWindow();
    136138   // Compute lat+long
    137139   var en = new OSRef(easting,northing);
     
    142144   // Display
    143145   $('location_detail').innerHTML = easting + ", "+northing + "<br />" + lat + " " + lng;
    144    $('postcode_detail').innerHTML = postcode
     146   $('postcode_detail').innerHTML = postcode;
     147   $('postcode_id_detail').value= id;
     148   $('reason_email').value= '';
     149   $('reason').value= '';
    145150   $('source_detail').innerHTML = "Source: " + ((source == 0) ? 'this site' : '<a href="http://www.freethepostcode.org/">freethepostcode.org</a>');
    146151   $('postcode_detail_window').style.display = 'block';
     152   $('bad').style.display = '';
     153   $('report_form').style.display = 'none';
    147154   YAHOO.util.Dom.setXY('postcode_detail_window', [Math.max(0, (x-50)), (y-100) < 0 ? (y+10):(y-100)]);
    148155}
     
    151158   $('postcode_detail_window').style.display = 'none';
    152159}
     160
    153161
    154162function zoomOut() {
     
    157165                return;
    158166        }
     167        tidyUp();
     168
     169  gotoLocation(offsetGridX * zooms[zoomLevel], offsetGridY * zooms[zoomLevel], zoomLevel + 1);
     170}
     171
     172function tidyUp() {
    159173  removeMarkers();
    160         closePostcodeWindow();
    161 
    162   gotoLocation(offsetGridX * zooms[zoomLevel], offsetGridY * zooms[zoomLevel], zoomLevel + 1);
     174  closePostcodeWindow();
     175  hideMarkerWindow();
    163176}
    164177
     
    414427function updateGrid(theDirection) {
    415428    closePostcodeWindow();
     429    hideMarkerWindow();
    416430    if ( theDirection == 'right' ) {
    417431        if ( offsetGridX < size-sizeGridX )
     
    521535}
    522536
    523 
    524 
     537function showReportForm() {
     538  $('report_form').style.display = 'block';
     539  $('bad').style.display = 'none';
     540}
     541
     542YAHOO.util.Event.addListener('bad', 'click', showReportForm);
Note: See TracChangeset for help on using the changeset viewer.