From 0d6f39f2aa7c3922c6a696b0a8b3a2e72b475c45 Mon Sep 17 00:00:00 2001 From: "luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f" Date: Sun, 27 Jun 2010 16:38:35 +0000 Subject: fixed some bugs and enabled the navigation buttons on the gallery slideshows --- media/js/slideshow.js | 69 ++++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) (limited to 'media/js') diff --git a/media/js/slideshow.js b/media/js/slideshow.js index c889621..05f00a7 100644 --- a/media/js/slideshow.js +++ b/media/js/slideshow.js @@ -1,32 +1,34 @@ //Utility functions for map info window function mapit(latlontitle) { - var map; lat = parseFloat(latlontitle.split(',')[0]); - lon = parseFloat(latlontitle.split(',')[1]); - title= latlontitle.split(',')[2]; - var mapitinit; + lon = parseFloat(latlontitle.split(',')[1]); + title= latlontitle.split(',')[2]; + centerCoord = new google.maps.LatLng(lat, lon); + var mapitinit; if (mapitinit == true) { - panto(); - } else { - mapInit(); - } - - function mapInit() { - var centerCoord = new google.maps.LatLng(lat, lon); - var mapOptions = { - zoom: 6, - center: centerCoord, - mapTypeId: google.maps.MapTypeId.TERRAIN - }; - map = new google.maps.Map(document.getElementById("map-wrapper"), mapOptions); - var marker = new google.maps.Marker({ + mapPanTo(); + } else { + mapInit(); + } + + function mapInit() { + var mapOptions = { + zoom: 6, + center: centerCoord, + disableDefaultUI: true, + navigationControl: true, + mapTypeId: google.maps.MapTypeId.TERRAIN, + navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL} + }; + map = new google.maps.Map(document.getElementById("map-wrapper"), mapOptions); + var marker = new google.maps.Marker({ position: centerCoord, map: map, title: title }); mapitinit = true; } - function panto(){ + function mapPanTo(){ var marker = new google.maps.Marker({ position: centerCoord, map: map, @@ -44,7 +46,7 @@ function create_map(obj) { //deal with the variable height of div.legend $('#map-container').css({ bottom: function(index, value) { - return parseFloat($(obj).parent().parent().css("height"))-2; + return parseFloat($(obj).parent().parent().height())-2; } }); @@ -60,7 +62,7 @@ function get_exif(obj,id) { //deal with the variable height of div.legend $('#exif-container').css({ bottom: function(index, value) { - return parseFloat($(obj).parent().parent().css("height"))-14; + return parseFloat($(obj).parent().parent().height())-14; } }); } @@ -113,17 +115,16 @@ $(document).ready(function(){ $('#slides .bigimg').wrapAll('
').parents('#slides').append('