summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStella Power2008-08-25 14:08:53 (GMT)
committer Stella Power2008-08-25 14:08:53 (GMT)
commit8be2588cb3bb7d4fb09071b07ec3fe022bc31e51 (patch)
tree94bc8f25026fafa2af9d0801d013487985e84526
parent37787ff59524eab80d02e91afc56cf723a14d2b3 (diff)
#298690 - made clicking of overlay / lightbox to close it configurable.
-rw-r--r--js/lightbox.js30
-rw-r--r--js/lightbox2.js2
-rw-r--r--lightbox2.install1
-rw-r--r--lightbox2.module116
4 files changed, 86 insertions, 63 deletions
diff --git a/js/lightbox.js b/js/lightbox.js
index a7c1db6..5f693b0 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -20,6 +20,7 @@
var Lightbox = {
overlayOpacity : 0.8, // Controls transparency of shadow overlay.
overlayColor : '000', // Controls colour of shadow overlay.
+ disableCloseClick : true,
// Controls the order of the lightbox resizing animation sequence.
resizeSequence: 0, // 0: simultaneous, 1: width then height, 2: height then width.
resizeSpeed: 'normal', // Controls the speed of the lightbox resizing animation.
@@ -85,6 +86,7 @@ var Lightbox = {
var s = Drupal.settings.lightbox2;
Lightbox.overlayOpacity = s.overlay_opacity;
Lightbox.overlayColor = s.overlay_color;
+ Lightbox.disableCloseClick = s.disable_close_click;
Lightbox.resizeSequence = s.resize_sequence;
Lightbox.resizeSpeed = s.resize_speed;
Lightbox.fadeInSpeed = s.fade_in_speed;
@@ -159,7 +161,9 @@ var Lightbox = {
}
// Setup onclick handlers.
- $('#overlay').click(function() { Lightbox.end(); return false; } ).hide();
+ if (Lightbox.disableCloseClick) {
+ $('#overlay').click(function() { Lightbox.end(); return false; } ).hide();
+ }
$('#loadingLink, #bottomNavClose').click(function() { Lightbox.end('forceClose'); return false; } );
$('#prevLink, #framePrevLink').click(function() { Lightbox.changeData(Lightbox.activeImage - 1); return false; } );
$('#nextLink, #frameNextLink').click(function() { Lightbox.changeData(Lightbox.activeImage + 1); return false; } );
@@ -193,27 +197,35 @@ var Lightbox = {
// Attach lightbox to any links with rel 'lightbox', 'lightshow' or
// 'lightframe', etc.
$("a[@rel^='lightbox'], area[@rel^='lightbox']").click(function() {
- $('#lightbox').unbind('click');
- $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
+ if (Lightbox.disableCloseClick) {
+ $('#lightbox').unbind('click');
+ $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
+ }
Lightbox.start(this, false, false, false, false);
return false;
});
$("a[@rel^='lightshow'], area[@rel^='lightshow']").click(function() {
- $('#lightbox').unbind('click');
- $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
+ if (Lightbox.disableCloseClick) {
+ $('#lightbox').unbind('click');
+ $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
+ }
Lightbox.start(this, true, false, false, false);
return false;
});
$("a[@rel^='lightframe'], area[@rel^='lightframe']").click(function() {
- $('#lightbox').unbind('click');
- $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
+ if (Lightbox.disableCloseClick) {
+ $('#lightbox').unbind('click');
+ $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
+ }
Lightbox.start(this, false, true, false, false);
return false;
});
if (Lightbox.enableVideo) {
$("a[@rel^='lightvideo'], area[@rel^='lightvideo']").click(function() {
- $('#lightbox').unbind('click');
- $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
+ if (Lightbox.disableCloseClick) {
+ $('#lightbox').unbind('click');
+ $('#lightbox').click(function() { Lightbox.end('forceClose'); } );
+ }
Lightbox.start(this, false, false, true, false);
return false;
});
diff --git a/js/lightbox2.js b/js/lightbox2.js
index 6dab638..81050c1 100644
--- a/js/lightbox2.js
+++ b/js/lightbox2.js
@@ -37,6 +37,7 @@ function lightbox2_lite_general_handler(event) {
$("select[@name=lightbox2_image_ncck_group_node_id]").attr("disabled", "disabled");
$("select[@name=lightbox2_imagefield_group_node_id]").attr("disabled", "disabled");
$("input[@name=lightbox2_imagefield_use_node_title]").attr("disabled", "disabled");
+ $("input[@name=lightbox2_disable_close_click]").attr("disabled", "disabled");
$("input[@name=lightbox2_border_size]").attr("disabled", "disabled");
$("input[@name=lightbox2_box_color]").attr("disabled", "disabled");
$("input[@name=lightbox2_font_color]").attr("disabled", "disabled");
@@ -61,6 +62,7 @@ function lightbox2_lite_general_handler(event) {
$("select[@name=lightbox2_image_ncck_group_node_id]").removeAttr("disabled");
$("select[@name=lightbox2_imagefield_group_node_id]").removeAttr("disabled");
$("input[@name=lightbox2_imagefield_use_node_title]").removeAttr("disabled");
+ $("input[@name=lightbox2_disable_close_click]").removeAttr("disabled");
$("input[@name=lightbox2_border_size]").removeAttr("disabled");
$("input[@name=lightbox2_box_color]").removeAttr("disabled");
$("input[@name=lightbox2_font_color]").removeAttr("disabled");
diff --git a/lightbox2.install b/lightbox2.install
index 2eb69fa..84a9e07 100644
--- a/lightbox2.install
+++ b/lightbox2.install
@@ -51,6 +51,7 @@ function lightbox2_uninstall() {
variable_del('lightbox2_top_position');
variable_del('lightbox2_overlay_opacity');
variable_del('lightbox2_overlay_color');
+ variable_del('lightbox2_disable_close_click');
variable_del('lightbox2_resize_sequence');
variable_del('lightbox2_resize_speed');
variable_del('lightbox2_fadein_speed');
diff --git a/lightbox2.module b/lightbox2.module
index aa9551c..dfc0841 100644
--- a/lightbox2.module
+++ b/lightbox2.module
@@ -306,7 +306,7 @@ function lightbox2_general_settings_form() {
/* --------------------------------- */
$form['layout_fieldset'] = array(
'#type' => 'fieldset',
- '#title' => t('Layout Settings'),
+ '#title' => t('Layout settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
@@ -316,7 +316,7 @@ function lightbox2_general_settings_form() {
$use_lite = variable_get('lightbox2_lite', FALSE);
$form['layout_fieldset']['lightbox2_lite_options'] = array(
'#type' => 'fieldset',
- '#title' => t('Lightbox2 Lite'),
+ '#title' => t('Lightbox2 lite'),
'#collapsible' => TRUE,
'#collapsed' => !$use_lite,
);
@@ -324,7 +324,7 @@ function lightbox2_general_settings_form() {
// Add checkbox for Lightbox2 Lite.
$form['layout_fieldset']['lightbox2_lite_options']['lightbox2_lite'] = array(
'#type' => 'checkbox',
- '#title' => t('Use Lightbox2 Lite'),
+ '#title' => t('Use lightbox2 lite'),
'#description' => t('Checking this box will enable Lightbox2 Lite and will disable all of the automatic image URL re-formatting features. It also disables all grouping features.'),
'#default_value' => $use_lite,
);
@@ -333,7 +333,7 @@ function lightbox2_general_settings_form() {
// Add checkbox for alternative layout.
$form['layout_fieldset']['lightbox2_use_alt_layout'] = array(
'#type' => 'checkbox',
- '#title' => t('Use Alternative Layout'),
+ '#title' => t('Use alternative layout'),
'#description' => t('Enabling this option alters the layout of the lightbox elements. In the alternative layout the navigational links appear under the image with the caption text, instead of being overlayed on the image itself. This doesn\'t apply when using Lightbox Lite.'),
'#default_value' => variable_get('lightbox2_use_alt_layout', FALSE),
);
@@ -349,7 +349,7 @@ function lightbox2_general_settings_form() {
// Add checkbox for "looping through images'.
$form['layout_fieldset']['lightbox2_loop_items'] = array(
'#type' => 'checkbox',
- '#title' => t('Continuous Galleries'),
+ '#title' => t('Continuous galleries'),
'#description' => t('When viewing grouped images, the Next button on the last image will display the first image, while the Previous button on the first image will display the last image.'),
'#default_value' => variable_get('lightbox2_loop_items', FALSE),
);
@@ -357,7 +357,7 @@ function lightbox2_general_settings_form() {
// Add text box for image count for grouping.
$form['layout_fieldset']['lightbox2_image_count_str'] = array(
'#type' => 'textfield',
- '#title' => t('Image Count Text'),
+ '#title' => t('Image count text'),
'#description' => t('This text is used to display the image count underneath the image in the lightbox when image grouping is enabled. Use !current as a placeholder for the number of the current image and !total for the total number of images in the group. For example, "Image !current of !total".'),
'#default_value' => variable_get('lightbox2_image_count_str', 'Image !current of !total'),
);
@@ -365,7 +365,7 @@ function lightbox2_general_settings_form() {
// Add text box for page count for grouping.
$form['layout_fieldset']['lightbox2_page_count_str'] = array(
'#type' => 'textfield',
- '#title' => t('Page Count Text'),
+ '#title' => t('Page count text'),
'#description' => t('This text is used to display the page count underneath HTML content displayed in the lightbox when using groups. Use !current as a placeholder for the number of the current page and !total for the total number of pages in the group. For example, "Page !current of !total".'),
'#default_value' => variable_get('lightbox2_page_count_str', 'Page !current of !total'),
);
@@ -375,7 +375,7 @@ function lightbox2_general_settings_form() {
/* -------------------------------- */
$form['zoom_fieldset'] = array(
'#type' => 'fieldset',
- '#title' => t('Image Resize Settings'),
+ '#title' => t('Image resize settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -383,7 +383,7 @@ function lightbox2_general_settings_form() {
// Add checkbox for resize image.
$form['zoom_fieldset']['lightbox2_disable_resize'] = array(
'#type' => 'checkbox',
- '#title' => t('Disable Zoom Feature'),
+ '#title' => t('Disable zoom feature'),
'#description' => t('By default, when the image being displayed in the lightbox is larger than the browser window, it is resized to fit within the window and a zoom button is provided for users who wish to view the image in its original size. Checking this box will disable this feature and all images will be displayed without any resizing.'),
'#default_value' => variable_get('lightbox2_disable_resize', FALSE),
);
@@ -391,7 +391,7 @@ function lightbox2_general_settings_form() {
// Add checkbox for zoom image.
$form['zoom_fieldset']['lightbox2_disable_zoom'] = array(
'#type' => 'checkbox',
- '#title' => t('Disable Zoom In / Out Feature'),
+ '#title' => t('Disable zoom in / out feature'),
'#description' => t('When the image being displayed in the lightbox is resized to fit in the browser window, a "zoom in" button is shown. This allows the user to zoom in to see the original full size image. They will then see a "zoom out" button which will allow them to see the smaller resized version. Checking this box will prevent these buttons from appearing.'),
'#default_value' => variable_get('lightbox2_disable_zoom', FALSE),
);
@@ -401,7 +401,7 @@ function lightbox2_general_settings_form() {
/* -------------------------------- */
$form['login_fieldset'] = array(
'#type' => 'fieldset',
- '#title' => t('Login Settings'),
+ '#title' => t('Login settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -409,7 +409,7 @@ function lightbox2_general_settings_form() {
// Add checkbox for login support.
$form['login_fieldset']['lightbox2_enable_login'] = array(
'#type' => 'checkbox',
- '#title' => t('Enable Login Support'),
+ '#title' => t('Enable login support'),
'#description' => t('Enabling this option will modify all login links so that the login form appears in a lightbox.'),
'#default_value' => variable_get('lightbox2_enable_login', FALSE),
);
@@ -418,7 +418,7 @@ function lightbox2_general_settings_form() {
/* -------------------------------- */
$form['video_fieldset'] = array(
'#type' => 'fieldset',
- '#title' => t('Video Settings'),
+ '#title' => t('Video settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -426,7 +426,7 @@ function lightbox2_general_settings_form() {
// Add checkbox for video support.
$form['video_fieldset']['lightbox2_enable_video'] = array(
'#type' => 'checkbox',
- '#title' => t('Enable Video Support'),
+ '#title' => t('Enable video support'),
'#description' => t('By default, video support is disabled in order to reduce the amount of javascript needed. Checking this box will enable it.'),
'#default_value' => variable_get('lightbox2_enable_video', FALSE),
);
@@ -434,7 +434,7 @@ function lightbox2_general_settings_form() {
// Add fieldset for page specific lightbox2 settings.
$form['lightbox2_page_init'] = array(
'#type' => 'fieldset',
- '#title' => t('Page Specific Lightbox2 Settings'),
+ '#title' => t('Page specific lightbox2 settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -447,7 +447,7 @@ function lightbox2_general_settings_form() {
$form['lightbox2_page_init']['lightbox2_page_init_action'] = array(
'#type' => 'radios',
'#options' => $page_options,
- '#title' => t('Enable Lightbox2 on Specific Pages'),
+ '#title' => t('Enable lightbox2 on specific pages'),
'#default_value' => variable_get('lightbox2_page_init_action', 'page_disable'),
);
// Add text input for list of pages to take specific action on.
@@ -464,7 +464,7 @@ function lightbox2_general_settings_form() {
if ((module_exists('emfield') && module_exists('image_ncck')) || (module_exists('imagefield') && module_exists('imagecache'))) {
$form['cck_options'] = array(
'#type' => 'fieldset',
- '#title' => t('CCK Display Settings'),
+ '#title' => t('CCK display settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -480,7 +480,7 @@ function lightbox2_general_settings_form() {
if (module_exists('emfield') && module_exists('image_ncck')) {
$form['cck_options']['lightbox2_image_ncck_group_node_id'] = array(
'#type' => 'select',
- '#title' => t('Select Emfield Image Grouping in Views'),
+ '#title' => t('Select Emfield Image grouping in Views'),
'#description' => t('By default, emfield images in views are grouped by the field name they appear in the view in. You can override that grouping here.'),
'#options' => $cck_options,
'#default_value' => variable_get('lightbox2_image_ncck_group_node_id', 1),
@@ -491,14 +491,14 @@ function lightbox2_general_settings_form() {
if (module_exists('imagefield') && module_exists('imagecache')) {
$form['cck_options']['lightbox2_imagefield_group_node_id'] = array(
'#type' => 'select',
- '#title' => t('Select Imagefield Grouping in Views'),
+ '#title' => t('Select Imagefield grouping in Views'),
'#description' => t('By default, imagefields in views are grouped by the field name they appear in the view in. You can override that grouping here.'),
'#options' => $cck_options,
'#default_value' => variable_get('lightbox2_imagefield_group_node_id', 1),
);
$form['cck_options']['lightbox2_imagefield_use_node_title'] = array(
'#type' => 'checkbox',
- '#title' => t('Use Node Title as Caption'),
+ '#title' => t('Use node title as caption'),
'#description' => t('By default, the caption for imagefields is the image title text configured. If no title is configured, then the alt text will be used. This option allows you to override that and always display the node title as the image caption.'),
'#default_value' => variable_get('lightbox2_imagefield_use_node_title', FALSE),
);
@@ -520,18 +520,25 @@ function lightbox2_general_settings_form() {
// loading, but footer is needed for sites in IE which use SWFObject.
$form['advanced_options']['lightbox2_js_location'] = array(
'#type' => 'select',
- '#title' => t('Location of Javscript'),
+ '#title' => t('Location of javscript'),
'#options' => array('header' => t('Header'), 'footer' => t('Footer')),
'#description' => t('By default, the lightbox javascript files are loaded in the HTML header. However, for sites using SWFObject to load their Flash content, the footer setting is recommended to prevent "Operation Aborted" errors in IE. If using the footer setting, please note that not all themes correctly implement the footer region and may require a small change.'),
'#default_value' => variable_get('lightbox2_js_location', 'header'),
);
+ $form['advanced_options']['lightbox2_disable_close_click'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Click on overlay or lightbox to close it'),
+ '#description' => t('Enable user to close lightbox by clicking on the lightbox itself or the overlay background.'),
+ '#default_value' => variable_get('lightbox2_disable_close_click', TRUE),
+ );
+
// Define keyboard shortcuts fieldset.
/* ---------------------------------- */
$form['advanced_options']['keyboard_shortcuts'] = array(
'#type' => 'fieldset',
- '#title' => t('Keyboard Shortcuts'),
- '#description' => t('Configure the keyboard shortcuts for controlling the lightbox. These options do not apply to the Lightbox2 Lite version, which uses the default "Close Keys" (c, x and esc) to close the lightbox.'),
+ '#title' => t('Keyboard shortcuts'),
+ '#description' => t('Configure the keyboard shortcuts for controlling the lightbox. These options do not apply to the Lightbox2 Lite version, which uses the default "Close keys" (c, x and esc) to close the lightbox.'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -566,7 +573,7 @@ function lightbox2_general_settings_form() {
$form['advanced_options']['keyboard_shortcuts']['lightbox2_keys_play_pause'] = array(
'#type' => 'textfield',
- '#title' => t('Pause / Play keys'),
+ '#title' => t('Pause / play keys'),
'#description' => t("A list of keys (or key codes) that a user may use to pause / play the lightbox. Values should be separated by a space. Defaults to '32' (spacebar)."),
'#default_value' => variable_get('lightbox2_keys_play_pause', '32'),
);
@@ -581,7 +588,7 @@ function lightbox2_general_settings_form() {
);
$form['advanced_options']['skin_settings']['lightbox2_border_size'] = array(
'#type' => 'textfield',
- '#title' => t('Border Size'),
+ '#title' => t('Border size'),
'#size' => 6,
'#maxlength' => 6,
'#description' => t('Enter the size of the border in pixels to display around the image.'),
@@ -590,7 +597,7 @@ function lightbox2_general_settings_form() {
$form['advanced_options']['skin_settings']['lightbox2_box_color'] = array(
'#type' => 'textfield',
- '#title' => t('Lightbox Color'),
+ '#title' => t('Lightbox color'),
'#field_prefix' => '#',
'#size' => 6,
'#maxlength' => 6,
@@ -600,7 +607,7 @@ function lightbox2_general_settings_form() {
$form['advanced_options']['skin_settings']['lightbox2_font_color'] = array(
'#type' => 'textfield',
- '#title' => t('Font Color'),
+ '#title' => t('Font color'),
'#field_prefix' => '#',
'#size' => 6,
'#maxlength' => 6,
@@ -634,14 +641,14 @@ pixels. Leave blank for automatic calculation.'),
$opacity_options["1.0"] = "1.0";
$form['advanced_options']['overlay_settings']['lightbox2_overlay_opacity'] = array(
'#type' => 'select',
- '#title' => t('Overlay Opacity'),
+ '#title' => t('Overlay opacity'),
'#options' => $opacity_options,
'#description' => t('The overlay opacity setting determines how visible the background page is behind the lightbox. The opacity value can range from 0.0 to 1.0 where 0.0 is 100% transparent and 1.0 is 100% opaque.'),
'#default_value' => variable_get('lightbox2_overlay_opacity', 0.8),
);
$form['advanced_options']['overlay_settings']['lightbox2_overlay_color'] = array(
'#type' => 'textfield',
- '#title' => t('Overlay Color'),
+ '#title' => t('Overlay color'),
'#field_prefix' => '#',
'#size' => 6,
'#maxlength' => 6,
@@ -668,14 +675,14 @@ pixels. Leave blank for automatic calculation.'),
);
$form['advanced_options']['animation_settings']['lightbox2_resize_sequence'] = array(
'#type' => 'select',
- '#title' => t('Resize Sequence'),
+ '#title' => t('Resize sequence'),
'#options' => $resize_sequence_options,
'#description' => t('The sequence to use for the resizing animation.'),
'#default_value' => variable_get('lightbox2_resize_sequence', 0),
);
$form['advanced_options']['animation_settings']['lightbox2_resize_speed'] = array(
'#type' => 'textfield',
- '#title' => t('Resize Duration'),
+ '#title' => t('Resize duration'),
'#size' => 5,
'#maxlength' => 5,
'#description' => t('The duration (in seconds) of the resizing animation. Enter a value between 0 and 10.'),
@@ -683,7 +690,7 @@ pixels. Leave blank for automatic calculation.'),
);
$form['advanced_options']['animation_settings']['lightbox2_fadein_speed'] = array(
'#type' => 'textfield',
- '#title' => t('Appearance Duration'),
+ '#title' => t('Appearance duration'),
'#size' => 5,
'#maxlength' => 5,
'#description' => t('The duration (in seconds) of the lightbox appearance animation. Enter a value between 0 and 10.'),
@@ -692,7 +699,7 @@ pixels. Leave blank for automatic calculation.'),
$form['advanced_options']['animation_settings']['lightbox2_slidedown_speed'] = array(
'#type' => 'textfield',
- '#title' => t('Caption Slide Down Duration'),
+ '#title' => t('Caption slide down duration'),
'#size' => 5,
'#maxlength' => 5,
'#description' => t('The duration (in seconds) of the caption sliding-down animation. Enter a value between 0 and 10.'),
@@ -721,7 +728,7 @@ function lightbox2_slideshow_settings_form() {
// Add text box for slideshow interval.
$form['lightbox2_slideshow_interval'] = array(
'#type' => 'textfield',
- '#title' => t('Interval Seconds'),
+ '#title' => t('Interval seconds'),
'#description' => t('The slideshow interval is the length of time in seconds an image is visible before the slideshow shows the next image.'),
'#default_value' => variable_get('lightbox2_slideshow_interval', 5),
'#size' => 20,
@@ -730,7 +737,7 @@ function lightbox2_slideshow_settings_form() {
// Add checkbox for slideshow automatic exit.
$form['lightbox2_slideshow_automatic_exit'] = array(
'#type' => 'checkbox',
- '#title' => t('Automatically Exit Slideshow'),
+ '#title' => t('Automatically exit slideshow'),
'#description' => t('When enabled the lightbox will automatically close after displaying the last image.'),
'#default_value' => variable_get('lightbox2_slideshow_automatic_exit', TRUE),
);
@@ -738,7 +745,7 @@ function lightbox2_slideshow_settings_form() {
// Add checkbox for showing hte play / pause button.
$form['lightbox2_slideshow_show_play_pause'] = array(
'#type' => 'checkbox',
- '#title' => t('Show Play / Pause Button'),
+ '#title' => t('Show play / pause button'),
'#description' => t('When enabled, a play / pause button will be shown in the slideshow allowing the user more control over their viewing experience.'),
'#default_value' => variable_get('lightbox2_slideshow_show_play_pause', TRUE),
);
@@ -746,7 +753,7 @@ function lightbox2_slideshow_settings_form() {
// Add checkbox for "pausing on next click".
$form['lightbox2_slideshow_pause_on_next_click'] = array(
'#type' => 'checkbox',
- '#title' => t('Pause Slideshow on "Next Image" Click'),
+ '#title' => t('Pause slideshow on "Next Image" click'),
'#description' => t('When enabled the slideshow is automatically paused, and the following image shown, when the "Next" button is clicked.'),
'#default_value' => variable_get('lightbox2_slideshow_pause_on_next_click', FALSE),
);
@@ -754,7 +761,7 @@ function lightbox2_slideshow_settings_form() {
// Add checkbox for "pausing on prev click".
$form['lightbox2_slideshow_pause_on_prev_click'] = array(
'#type' => 'checkbox',
- '#title' => t('Pause Slideshow on "Previous Image" Click'),
+ '#title' => t('Pause slideshow on "Previous Image" click'),
'#description' => t('When enabled the slideshow is automatically paused, and the previous image shown, when the "Previous" button is clicked.'),
'#default_value' => variable_get('lightbox2_slideshow_pause_on_previous_click', TRUE),
);
@@ -762,7 +769,7 @@ function lightbox2_slideshow_settings_form() {
// Add checkbox for "looping through slides'.
$form['lightbox2_loop_slides'] = array(
'#type' => 'checkbox',
- '#title' => t('Continuous Loop'),
+ '#title' => t('Continuous loop'),
'#description' => t('When enabled the slideshow will automatically start over after displaying the last slide. This prevents the slideshow from automatically exiting when enabled.'),
'#default_value' => variable_get('lightbox2_loop_slides', FALSE),
);
@@ -852,7 +859,7 @@ function lightbox2_iframe_settings_form() {
// Add text box for iframe width.
$form['lightbox2_default_frame_width'] = array(
'#type' => 'textfield',
- '#title' => t('Default Width'),
+ '#title' => t('Default width'),
'#description' => t('The default width of the iframe in pixels.'),
'#default_value' => variable_get('lightbox2_default_frame_width', 600),
'#size' => 20,
@@ -861,7 +868,7 @@ function lightbox2_iframe_settings_form() {
// Add text box for iframe height.
$form['lightbox2_default_frame_height'] = array(
'#type' => 'textfield',
- '#title' => t('Default Height'),
+ '#title' => t('Default height'),
'#description' => t('The default height of the iframe in pixels.'),
'#default_value' => variable_get('lightbox2_default_frame_height', 400),
'#size' => 20,
@@ -870,7 +877,7 @@ function lightbox2_iframe_settings_form() {
// Add option for iframe border.
$form['lightbox2_frame_border'] = array(
'#type' => 'checkbox',
- '#title' => t('Enable Border'),
+ '#title' => t('Enable border'),
'#description' => t('Enable iframe border. You can modify the border style in your theme\'s css file using the iframe\'s id "lightboxFrame".'),
'#default_value' => variable_get('lightbox2_frame_border', 1),
);
@@ -932,7 +939,7 @@ function lightbox2_auto_image_handling_settings_form() {
// Add text box for link text to node.
$form['lightbox2_general_options']['lightbox2_node_link_text'] = array(
'#type' => 'textfield',
- '#title' => t('Text for Image Page Link'),
+ '#title' => t('Text for image page link'),
'#description' => t('This is the text that will appear as the link to the image page underneath the image in the lightbox.'),
'#default_value' => variable_get('lightbox2_node_link_text', 'View Image Details'),
);
@@ -940,7 +947,7 @@ function lightbox2_auto_image_handling_settings_form() {
// Add checkbox for node link target.
$form['lightbox2_general_options']['lightbox2_node_link_target'] = array(
'#type' => 'checkbox',
- '#title' => t('Open Image Page in New Window'),
+ '#title' => t('Open image page in new window'),
'#description' => t('This controls whether the link to the image page underneath the image is opened in a new window or the current window.'),
'#default_value' => variable_get('lightbox2_node_link_target', FALSE),
'#return_value' => '_blank',
@@ -951,7 +958,7 @@ function lightbox2_auto_image_handling_settings_form() {
/* --------------------------------- */
$form['handler_options'] = array(
'#type' => 'fieldset',
- '#title' => t('Automatic Handlers'),
+ '#title' => t('Automatic handlers'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
@@ -968,7 +975,7 @@ function lightbox2_auto_image_handling_settings_form() {
// Add checkbox for image nodes.
$form['handler_options']['image_node_options']['lightbox2_image_node'] = array(
'#type' => 'select',
- '#title' => t('Automatic handler for Image Nodes'),
+ '#title' => t('Automatic handler for image nodes'),
'#options' => $automatic_options,
'#description' => t('Choose how URLs for image nodes will be automatically handled.'),
'#default_value' => variable_get('lightbox2_image_node', 0),
@@ -1005,7 +1012,7 @@ function lightbox2_auto_image_handling_settings_form() {
// Add checkbox for disabling lightbox for gallery lists.
$form['handler_options']['image_node_options']['lightbox2_disable_nested_galleries'] = array(
'#type' => 'checkbox',
- '#title' => t('Disable Lightbox for Gallery Lists'),
+ '#title' => t('Disable lightbox for gallery lists'),
'#description' => t('Checking this box will disable the lightbox for images in gallery lists. This means it is possible to open a gallery by clicking on the teaser image, but the lightbox will still appear when viewing images within the gallery. This only applies to image galleries created with the "image gallery" module.'),
'#default_value' => variable_get('lightbox2_disable_nested_galleries', TRUE),
);
@@ -1014,7 +1021,7 @@ function lightbox2_auto_image_handling_settings_form() {
/* ----------------------- */
$form['handler_options']['flickr_options'] = array(
'#type' => 'fieldset',
- '#title' => t('Flickr Images'),
+ '#title' => t('Flickr images'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -1031,7 +1038,7 @@ function lightbox2_auto_image_handling_settings_form() {
/* ------------------------- */
$form['handler_options']['gallery2_options'] = array(
'#type' => 'fieldset',
- '#title' => t('Gallery2 Images'),
+ '#title' => t('Gallery2 images'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -1049,7 +1056,7 @@ function lightbox2_auto_image_handling_settings_form() {
/* ----------------------- */
$form['handler_options']['inline_options'] = array(
'#type' => 'fieldset',
- '#title' => t('Inline Images'),
+ '#title' => t('Inline images'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -1066,7 +1073,7 @@ function lightbox2_auto_image_handling_settings_form() {
/* ----------------------------- */
$form['handler_options']['img_assist_options'] = array(
'#type' => 'fieldset',
- '#title' => t('Image Assist Images'),
+ '#title' => t('Image Assist images'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -1083,7 +1090,7 @@ function lightbox2_auto_image_handling_settings_form() {
/* ----------------------- */
$form['handler_options']['custom_options'] = array(
'#type' => 'fieldset',
- '#title' => t('Custom Class Images'),
+ '#title' => t('Custom class images'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
@@ -1115,7 +1122,7 @@ function lightbox2_auto_image_handling_settings_form() {
);
$form['handler_options']['lightbox2_acidfree_options']['lightbox2_disable_nested_acidfree_galleries'] = array(
'#type' => 'checkbox',
- '#title' => t('Disable Lightbox for Acidfree Gallery Lists'),
+ '#title' => t('Disable lightbox for Acidfree gallery lists'),
'#description' => t('Checking this box will disable the lightbox for images in gallery lists. This means it is possible to open a gallery by clicking on the teaser image, but the lightbox will still appear when viewing images within the gallery. This only applies to image galleries created with the "acidfree" module.'),
'#default_value' => variable_get('lightbox2_disable_nested_acidfree_galleries', TRUE),
);
@@ -1123,7 +1130,7 @@ function lightbox2_auto_image_handling_settings_form() {
if (module_exists("video")) {
$form['handler_options']['lightbox2_acidfree_options']['lightbox2_enable_acidfree_videos'] = array(
'#type' => 'checkbox',
- '#title' => t('Enable Lightbox for Acidfree Videos'),
+ '#title' => t('Enable lightbox for Acidfree videos'),
'#description' => t('Checking this box will enable the display of acidfree videos in a lightbox. This only applies to videos created by the "video" module and which appear in an acidfree gallery.'),
'#default_value' => variable_get('lightbox2_enable_acidfree_videos', FALSE),
);
@@ -1475,6 +1482,7 @@ function lightbox2_add_files() {
'top_position' => variable_get('lightbox2_top_position', ''),
'overlay_opacity' => variable_get('lightbox2_overlay_opacity', 0.8),
'overlay_color' => variable_get('lightbox2_overlay_color', '000'),
+ 'disable_close_click' => variable_get('lightbox2_disable_close_click', TRUE),
'resize_sequence' => variable_get('lightbox2_resize_sequence', 0),
'resize_speed' => 1000 * variable_get('lightbox2_resize_speed', 0.4),
'fade_in_speed' => 1000 * variable_get('lightbox2_fadein_speed', 0.4),