[FIX] iosswipe module bug

jelzo

Joined: 2008-04-10
Posts: 67
Posted: Wed, 2014-06-04 23:13

The current version 1 of the iosswipe module has a bug in it. Upon left swiping the first image or right swiping the last image, you will be forwarded to an error page.

You can fix this by replacing the old iosswipe.js code with the following code:

$(document).ready(function() {
  $('#g-photo').swipe({
    swipeLeft: function(){
	  if($('.g-paginator .g-text-right a').attr("href")!=undefined)window.location = $('.g-paginator .g-text-right a').attr("href");
    },
    swipeRight: function(){
      if($('.g-paginator .g-first a').attr("href")!=undefined)window.location = $('.g-paginator .g-first a').attr("href");
    },
    allowPageScroll: 'auto',
  });
});

I do not have access to the wiki and this module is not on Github so I cannot submit this fix anywhere else.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2014-06-05 05:01

I can't seem to find it either. Where is it? I looked on the codex page that redirects to the gallerymodules.com and it does not work for me.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team