Added in support for Gallery2 ImageFrame_none images.
authorStella Power
Tue, 13 May 2008 09:35:28 +0000 (09:35 +0000)
committerStella Power
Tue, 13 May 2008 09:35:28 +0000 (09:35 +0000)
js/auto_image_handling.js
lightbox2.module

index 65ed492..c5afb98 100644 (file)
@@ -22,6 +22,11 @@ function parse_url(url, param) {
 function lightbox2_init_triggers(classes, rel_type, custom_class) {
   var settings = Drupal.settings.lightbox2;
 
+  var link_target  = "";
+  if (settings.node_link_target !== 0) {
+    link_target = 'target="'+ settings.node_link_target +'"';
+  }
+
   $("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)) {
@@ -39,10 +44,6 @@ function lightbox2_init_triggers(classes, rel_type, custom_class) {
 
         // Set the image node link text.
         var link_text = settings.node_link_text;
-        var link_target  = "";
-        if (settings.node_link_target !== 0) {
-          link_target = 'target="'+ settings.node_link_target +'"';
-        }
 
         // Set the rel attribute.
         var rel = "lightbox";
@@ -88,7 +89,7 @@ function lightbox2_init_triggers(classes, rel_type, custom_class) {
         }
 
         // Handle gallery2 block images.
-        else if ($(child).attr("class").match("ImageFrame_image")) {
+        else if ($(child).attr("class").match("ImageFrame_image") || $(child).attr("class").match("ImageFrame_none")) {
           var thumb_id = parse_url(href, "g2_itemId");
           var new_id = parse_url(orig_href, "g2_itemId");
           if (new_id && thumb_id) {
index e731429..0733113 100644 (file)
@@ -759,13 +759,13 @@ function lightbox2_add_files() {
   // Gallery2 block images.
   switch ($gallery2_block_handler) {
     case 1:
-      $trigger_lightbox_classes .= "img.ImageFrame_image,";
+      $trigger_lightbox_classes .= "img.ImageFrame_image,img.ImageFrame_none,";
       break;
     case 2:
-      $trigger_lightbox_group_classes .= "img.ImageFrame_image,";
+      $trigger_lightbox_group_classes .= "img.ImageFrame_image,img.ImageFrame_none,";
       break;
     case 3:
-      $trigger_slideshow_classes .= "img.ImageFrame_image,";
+      $trigger_slideshow_classes .= "img.ImageFrame_image,img.ImageFrame_none,";
       break;
   }