summaryrefslogtreecommitdiff
path: root/media/js/slideshow.js
diff options
context:
space:
mode:
authorluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2010-06-27 16:38:35 +0000
committerluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2010-06-27 16:38:35 +0000
commit0d6f39f2aa7c3922c6a696b0a8b3a2e72b475c45 (patch)
treeac95e888409af8157da4154df60d1c0e391fcb6b /media/js/slideshow.js
parent514a1c9a35b7699d8b1738887a9e076d29a0743c (diff)
fixed some bugs and enabled the navigation buttons on the gallery slideshows
Diffstat (limited to 'media/js/slideshow.js')
-rw-r--r--media/js/slideshow.js69
1 files changed, 35 insertions, 34 deletions
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('<div class="bigimgs">').parents('#slides').append('<ul class="menu" id="feature_gallery_pager">').cycle({
fx: 'fade',
startingSlide: index,
- pause: 1,
- prev: '#prev',
- next: '#next',
- before: onBefore,
- after: onAfter,
+ prev: '#prev',
+ next: '#next',
+ before: onBefore,
+ after: onAfter,
slideExpr: '.bigimg',
pager: '#feature_gallery_pager',
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#"><img src="'+slide.id+'" class="thumb"><span></span></a></li>';
- }
-
+ },
+ pause: 1
});
//callback to delete map and camera info windows if they exist
@@ -154,7 +155,7 @@ $(document).ready(function(){
});
};
- //initialize the jcarousel plugin
+ //initialize the jcarousel plugin
$(function() {
$('#feature_gallery_pager').jcarousel({
scroll:10,
@@ -164,11 +165,11 @@ $(document).ready(function(){
/* hover buttons, currently not used
$("#slideshow").hover(function() {
- $("ul#nav").fadeIn();
- },
- function() {
- $("ul#nav").fadeOut();
- });
+ $("ul#nav").fadeIn();
+ },
+ function() {
+ $("ul#nav").fadeOut();
+ });
*/
//enable keyboard shortcuts: