summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/lightbox2.js4
-rw-r--r--lightbox2.module12
2 files changed, 16 insertions, 0 deletions
diff --git a/js/lightbox2.js b/js/lightbox2.js
index 0d6d736..58baac7 100644
--- a/js/lightbox2.js
+++ b/js/lightbox2.js
@@ -10,6 +10,7 @@ if (Drupal.jsEnabled) {
$("input[@name=lightbox2_use_alt_layout]").bind("click", alt_layout_handler);
$("input[@name=lightbox2_image_node]").bind("click", image_node_handler);
$("input[@name=lightbox2_flickr]").bind("click", image_node_handler);
+ $("input[@name=lightbox2_image_assist_custom]").bind("click", image_node_handler);
$("input[@name=lightbox2_inline]").bind("click", image_node_handler);
$("textarea[@name=lightbox2_custom_trigger_classes]").bind("change", image_node_handler);
});
@@ -47,6 +48,7 @@ function lightbox2_lite_auto_handler(event) {
$("select[@name=lightbox2_display_image_size]").attr("disabled", "disabled");
$("select[@name='lightbox2_trigger_image_size[]']").attr("disabled", "disabled");
$("input[@name=lightbox2_flickr]").attr("disabled", "disabled");
+ $("input[@name=lightbox2_image_assist_custom]").attr("disabled", "disabled");
$("input[@name=lightbox2_inline]").attr("disabled", "disabled");
$("textarea[@name=lightbox2_custom_trigger_classes]").attr("disabled", "disabled");
$("input[@name=lightbox2_disable_nested_galleries]").attr("disabled", "disabled");
@@ -55,6 +57,7 @@ function lightbox2_lite_auto_handler(event) {
else {
$("input[@name=lightbox2_image_node]").removeAttr("disabled");
$("input[@name=lightbox2_flickr]").removeAttr("disabled");
+ $("input[@name=lightbox2_image_assist_custom]").removeAttr("disabled");
$("input[@name=lightbox2_inline]").removeAttr("disabled");
$("textarea[@name=lightbox2_custom_trigger_classes]").removeAttr("disabled");
$("input[@name=lightbox2_node_link_text]").removeAttr("disabled");
@@ -83,6 +86,7 @@ function image_node_handler(event) {
if ($("input[@name=lightbox2_lite]").val() != 1) {
if ($("input[@name=lightbox2_image_node]:checked").val() == 1
|| $("input[@name=lightbox2_flickr]:checked").val() == 1
+ || $("input[@name=lightbox2_image_assist_custom]:checked").val() == 1
|| $("input[@name=lightbox2_inline]:checked").val() == 1
|| $("textarea[@name=lightbox2_custom_trigger_classes]").val() != ''
) {
diff --git a/lightbox2.module b/lightbox2.module
index 68951fb..3b4c9b0 100644
--- a/lightbox2.module
+++ b/lightbox2.module
@@ -318,6 +318,14 @@ function lightbox2_auto_image_handling_settings_form() {
'#default_value' => variable_get('lightbox2_inline', true),
);
+ // Add Checkbox for Image Assist custom size images.
+ $form['lightbox2_image_assist_custom'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Enable for Image Assist custom size images'),
+ '#description' => t('Checking this box will enable automatic URL formatting for custom size images displayed by the Image Assist module.'),
+ '#default_value' => variable_get('lightbox2_image_assist_custom', true),
+ );
+
// Add text box for custom trigger classes.
$form['lightbox2_custom_trigger_classes'] = array(
'#type' => 'textarea',
@@ -446,6 +454,10 @@ function lightbox2_add_files() {
if (variable_get('lightbox2_flickr', true)) {
$trigger_image_classes .= "img.flickr-photo-img,img.flickr-photoset-img,";
}
+ // Image Assist custom size images.
+ if (variable_get('lightbox2_image_assist_custom', true)) {
+ $trigger_image_classes .= "img.image-img_assist_custom,";
+ }
// Image nodes.
if (variable_get('lightbox2_image_node', true)) {
$trigger_sizes = variable_get('lightbox2_trigger_image_size', array('thumbnail' => t('Thumbnail')));