Commit 8367feda authored by jdwfly's avatar jdwfly
Browse files

Initial functionality can be achieved using the colorbox class on a link.

parent f1b42d1f
......@@ -2,3 +2,4 @@
name = Colorbox
description = A light-weight, customizable lightbox plugin for jQuery 1.3
core = 6.x
dependencies[] = jquery_update
Drupal.behaviors.colorbox = function (context) {
$('.colorbox').colorbox();
};
......@@ -4,3 +4,41 @@
* @file
* A light-weight, customizable lightbox plugin for jQuery 1.3
*/
function colorbox_menu() {
$items['admin/settings/colorbox'] = array(
'title' => 'Colorbox Settings',
'description' => 'Adjust Colorbox settings.',
'page callback' => 'drupal_get_form',
'page arguments' => array('colorbox_admin_settings'),
'access arguments' => array('administer site configuration'),
);
return $items;
}
function colorbox_init() {
if (variable_get('colorbox_js_path', FALSE)) {
drupal_add_js(variable_get('colorbox_js_path', ''));
}
if (variable_get('colorbox_css_path', FALSE)) {
drupal_add_css(variable_get('colorbox_css_path', ''));
}
drupal_add_js(drupal_get_path('module', 'colorbox') .'/colorbox.js');
}
function colorbox_admin_settings() {
$form['colorbox_js_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to Colorbox Javascript file...'),
'#default_value' => variable_get('colorbox_js_path', ''),
'#description' => t('Enter the path relative to Drupal root where colorbox.js is located'),
);
$form['colorbox_css_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to Colorbox CSS file...'),
'#default_value' => variable_get('colorbox_css_path', ''),
'#description' => t('Enter the path relative to Drupal root where colorbox.css is located'),
);
return system_settings_form($form);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment