Changeset 715


Ignore:
Timestamp:
Feb 7, 2010, 3:58:33 PM (10 years ago)
Author:
Nick Burch
Message:

Get the browse-by-decade parts of the site working

Location:
trunk/npemap.org.uk/static/tiles
Files:
8 added
2 edited

Legend:

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

    r654 r715  
    258258}
    259259
     260div#infobox {
     261        margin-top: 1.5em;
     262        margin-left: 2.5em;
     263        margin-right: 2.5em;
     264        margin-bottom: 0.5em;
     265        padding: 1em;
     266        background-color: #DDFF9b;
     267        text-align: center;
     268}
     269
    260270
    261271ul {
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r677 r715  
    100100function showPostcodeWindow(easting, northing, x, y) {
    101101    hideMarkerWindow();
     102    if(postcodeFormElement == null) {
     103       // Decade based view lacks a postcode submit form
     104       return;
     105    }
    102106
    103107    var easting = trimSixDigits(Math.round(easting));
     
    156160
    157161function closePostcodeWindow() {
    158   postcodeFormElement.style.display = 'none';
    159   markerElement.style.visibility = 'hidden';
     162  if(postcodeFormElement != null) {
     163     postcodeFormElement.style.display = 'none';
     164     markerElement.style.visibility = 'hidden';
     165  }
    160166}
    161167
     
    185191
    186192function hideMarkerWindow() {
    187    $('postcode_detail_window').style.display = 'none';
     193   var pdw = $('postcode_detail_window');
     194   if(pdw != null ) {
     195       pdw.style.display = 'none';
     196   }
    188197}
    189198
     
    248257    Element.show('zoomin_disabled');
    249258    Element.show('showHideMarkers');
    250         } else {
     259  } else {
    251260    Element.show('zoomin_enabled');
    252261    Element.hide('zoomin_disabled');
     
    259268  var newHeight = YAHOO.util.Dom.getViewportHeight();
    260269  if (screenHeight != newHeight || screenWidth != newWidth) {
    261     screenWidth = YAHOO.util.Dom.getViewportWidth();
     270                screenWidth = YAHOO.util.Dom.getViewportWidth();
    262271                screenHeight = YAHOO.util.Dom.getViewportHeight();
    263272                drawTable();
     
    291300
    292301
    293 function initializePage() {
    294                 markerElement = $('marker');
    295                 postcodeFormElement = $('postcode_form');
     302function initializePage(skipMarkers) {
     303    markerElement = $('marker');
     304    postcodeFormElement = $('postcode_form');
    296305    mainPageElement = $('main_page');
    297306
    298     updateShowMarkers();
     307        if(skipMarkers != null && skipMarkers) {
     308        } else {
     309                updateShowMarkers();
     310        }
    299311    parseQueryString();
    300312    fixZoomButton();
     
    421433function drawExisting() {
    422434        if (shouldWeShowMarkers()) {
    423                 var url = "../../cgi/get-postcodes.fcgi";
     435                var url = "/cgi/get-postcodes.fcgi";
    424436                var params = "mineasting=" + minEasting + "000&maxeasting="  + maxEasting + "000&minnorthing=" + minNorthing + "000&maxnorthing=" + maxNorthing+"000" + "&grid=" + grid;
    425437               
     
    537549
    538550function updatePermalink() {
    539         $("permalink").href = "#" + getLink();
     551  $("permalink").href = "#" + getLink();
     552  if( $("latestMapLink") != null ) {
     553     $("latestMapLink").href = "/tiles/map.html#" + getLink();
     554  }
    540555  location.href = '#'+getLink();
    541556}
     
    560575
    561576                // Do the request
    562                 var url = "../../cgi/get-meta.fcgi";
     577                var url = "/cgi/get-meta.fcgi";
    563578                var params = "format=js&callback=showMeta&" + req;
    564579                var myAjax = new Ajax.Request(url, {
Note: See TracChangeset for help on using the changeset viewer.