summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStella Power2008-05-14 13:06:27 (GMT)
committer Stella Power2008-05-14 13:06:27 (GMT)
commitce6c8aaffcc68538d34fa816e9385849e4d4b3a6 (patch)
tree42c1e4704342f843375fcc8d1f08178431c316cf
parent03d40985409e3b712d3694decf57fee5f66d7512 (diff)
#257711 - fix for gallery2 gallery issue
-rw-r--r--js/auto_image_handling.js26
1 files changed, 12 insertions, 14 deletions
diff --git a/js/auto_image_handling.js b/js/auto_image_handling.js
index 117652b..ea89f31 100644
--- a/js/auto_image_handling.js
+++ b/js/auto_image_handling.js
@@ -29,7 +29,7 @@ function lightbox2_init_triggers(classes, rel_type, custom_class) {
$("a["+classes+"]").each(function(i) {
- if ((!settings.disable_for_gallery_lists && !settings.disable_for_acidfree_gallery_lists) || (!$(this).parents(".galleries").length && !$(this).parents(".acidfree-folder").length && !$(this).parents(".acidfree-list").length) || ($(this).parents(".galleries").length && !settings.disable_for_gallery_lists) || (($(this).parents(".acidfree-folder").length || $(this).parents(".acidfree-list").length) && !settings.disable_for_acidfree_gallery_lists)) {
+ if ((!settings.disable_for_gallery_lists && !settings.disable_for_acidfree_gallery_lists) || (!$(this).parents("td.giAlbumCell").attr("class") && !$(this).parents(".galleries").length && !$(this).parents(".acidfree-folder").length && !$(this).parents(".acidfree-list").length) || ($(this).parents(".galleries").length && !settings.disable_for_gallery_lists) || (($(this).parents(".acidfree-folder").length || $(this).parents(".acidfree-list").length) && !settings.disable_for_acidfree_gallery_lists)) {
var child = $(this).find(classes);
@@ -90,19 +90,17 @@ function lightbox2_init_triggers(classes, rel_type, custom_class) {
// Handle gallery2 block images.
else if ($(child).attr("class").match("ImageFrame_image") || $(child).attr("class").match("ImageFrame_none")) {
- if (!$(child).parents("td.giAlbumCell").attr("class")) {
- var thumb_id = parse_url(href, "g2_itemId");
- var new_id = parse_url(orig_href, "g2_itemId");
- if (new_id && thumb_id) {
- var g2pattern = new RegExp("g2_itemId="+thumb_id);
- var replacement = "g2_itemId="+ new_id;
- href = href.replace(g2pattern, replacement);
- }
- rel = rel_type + "[gallery2]";
- if ($(child).parents("div.block-gallery").attr("class")) {
- id = $(child).parents("div.block-gallery").attr("id");
- rel = rel_type + "["+ id +"]";
- }
+ var thumb_id = parse_url(href, "g2_itemId");
+ var new_id = parse_url(orig_href, "g2_itemId");
+ if (new_id && thumb_id) {
+ var g2pattern = new RegExp("g2_itemId="+thumb_id);
+ var replacement = "g2_itemId="+ new_id;
+ href = href.replace(g2pattern, replacement);
+ }
+ rel = rel_type + "[gallery2]";
+ if ($(child).parents("div.block-gallery").attr("class")) {
+ id = $(child).parents("div.block-gallery").attr("id");
+ rel = rel_type + "["+ id +"]";
}
}