Created
April 30, 2013 22:09
-
-
Save mondalaci/5492334 to your computer and use it in GitHub Desktop.
A couple of fixes to the 3.2.6 version of the Shashin WordPress plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur shashin.orig/Public/Display/shashin.js shashin.fixed/Public/Display/shashin.js | |
--- shashin.orig/Public/Display/shashin.js 2012-12-15 01:11:53.000000000 +0100 | |
+++ shashin.fixed/Public/Display/shashin.js 2012-12-24 02:01:06.000000000 +0100 | |
@@ -95,13 +95,14 @@ | |
}); | |
$('.shashinThumbnailDiv').delegate('.shashinAlbumThumbLink', 'click', function(event) { | |
+ uniqueThumbnailDivId = '#' + $(this).attr('id'); | |
// to prevent the photos showing up twice if the user double-clicks | |
- if ($('.shashinAlbumThumbLink').data('clicked')) { | |
+ if ($(uniqueThumbnailDivId).data('clicked')) { | |
return false; | |
} | |
- $('.shashinAlbumThumbLink').data('clicked', true); | |
+ $(uniqueThumbnailDivId).data('clicked', true); | |
var parentTable = $(this).closest('table'); | |
var parentTableIdParts = $(parentTable).attr('id').split('_'); | |
diff -Naur shashin.orig/Public/ShashinPhotoDisplayer.php shashin.fixed/Public/ShashinPhotoDisplayer.php | |
--- shashin.orig/Public/ShashinPhotoDisplayer.php 2012-12-15 01:11:53.000000000 +0100 | |
+++ shashin.fixed/Public/ShashinPhotoDisplayer.php 2012-12-23 19:00:09.000000000 +0100 | |
@@ -72,8 +72,8 @@ | |
. '">' . PHP_EOL; | |
$this->caption .= '<div class="shashinFancyboxCaption">' . PHP_EOL; | |
$this->caption .= '<div class="shashinFancyboxCaptionClose">' | |
- . '<a href="javascript:;" onclick="jQuery.fancybox.close();">' | |
- . '<img src="' | |
+ . '<a href="#" onclick="jQuery.fancybox.close();">' | |
+ . '<img alt="Close" src="' | |
. $this->functionsFacade->getPluginsUrl('/Display/', __FILE__) | |
. 'fancybox/closelabel.gif" />' | |
. '</a>' | |
diff -Naur shashin.orig/Public/ShashinPhotoDisplayerPicasaFancybox.php shashin.fixed/Public/ShashinPhotoDisplayerPicasaFancybox.php | |
--- shashin.orig/Public/ShashinPhotoDisplayerPicasaFancybox.php 2012-12-23 17:34:54.000000000 +0100 | |
+++ shashin.fixed/Public/ShashinPhotoDisplayerPicasaFancybox.php 2012-12-23 17:44:52.000000000 +0100 | |
@@ -17,7 +17,6 @@ | |
$groupNumber .= '_' . $this->albumIdForAjaxPhotoDisplay; | |
} | |
- $this->linkRel = 'shashinFancybox_' . $groupNumber; | |
return $this->linkRel; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment