colorbox.fullcalendar.inc in FullCalendar 7.2
Same filename and directory in other branches
Provides extra FullCalendar configuration options for Colorbox.
File
fullcalendar_options/includes/colorbox.fullcalendar.incView source
<?php
/**
* @file
* Provides extra FullCalendar configuration options for Colorbox.
*/
/**
* Implements hook_fullcalendar_options_info().
*/
function colorbox_fullcalendar_options_info() {
return array(
'colorbox' => array(
'name' => t('Colorbox'),
'js' => TRUE,
'parent' => 'fullcalendar_options',
),
);
}
/**
* Implements hook_fullcalendar_options_definition().
*/
function colorbox_fullcalendar_options_definition() {
$options['colorbox']['contains'] = array(
'colorbox' => array(
'default' => FALSE,
'bool' => TRUE,
),
'colorboxIFrame' => array(
'default' => FALSE,
'bool' => TRUE,
),
'colorboxClass' => array(
'default' => '#content',
),
'colorboxWidth' => array(
'default' => '80%',
),
'colorboxHeight' => array(
'default' => '80%',
),
);
return $options;
}
/**
* Implements hook_fullcalendar_options_form().
*/
function colorbox_fullcalendar_options_form(&$form, &$form_state, &$view) {
$form['colorbox']['colorbox'] = array(
'#type' => 'checkbox',
'#title' => t('Open events with Colorbox'),
'#default_value' => $view->options['colorbox']['colorbox'],
'#data_type' => 'bool',
);
$form['colorbox']['colorboxIFrame'] = array(
'#type' => 'checkbox',
'#title' => t('Open events in iFrame'),
'#default_value' => $view->options['colorbox']['colorboxIFrame'],
'#dependency' => array(
'edit-style-options-colorbox-colorbox' => array(
1,
),
),
'#data_type' => 'bool',
);
$form['colorbox']['colorboxClass'] = array(
'#type' => 'textfield',
'#title' => t('Classname or ID selector'),
'#default_value' => $view->options['colorbox']['colorboxClass'],
'#dependency' => array(
'edit-style-options-colorbox-colorbox' => array(
1,
),
),
);
$form['colorbox']['colorboxWidth'] = array(
'#type' => 'textfield',
'#title' => t('Width'),
'#default_value' => $view->options['colorbox']['colorboxWidth'],
'#dependency' => array(
'edit-style-options-colorbox-colorbox' => array(
1,
),
),
);
$form['colorbox']['colorboxHeight'] = array(
'#type' => 'textfield',
'#title' => t('Height'),
'#default_value' => $view->options['colorbox']['colorboxHeight'],
'#dependency' => array(
'edit-style-options-colorbox-colorbox' => array(
1,
),
),
);
$form['sameWindow']['#dependency'] = array(
'edit-style-options-colorbox-colorbox' => array(
0,
),
);
}
/**
* Implements hook_fullcalendar_options_process().
*/
function colorbox_fullcalendar_options_process(&$variables, &$settings) {
if (empty($settings['colorbox']['colorbox'])) {
unset($settings['colorbox']);
}
}
Functions
Name | Description |
---|---|
colorbox_fullcalendar_options_definition | Implements hook_fullcalendar_options_definition(). |
colorbox_fullcalendar_options_form | Implements hook_fullcalendar_options_form(). |
colorbox_fullcalendar_options_info | Implements hook_fullcalendar_options_info(). |
colorbox_fullcalendar_options_process | Implements hook_fullcalendar_options_process(). |