function calendar_elements in Calendar 5.2
Same name and namespace in other branches
- 6.2 calendar.module \calendar_elements()
Implementation of hook_elements.
Much of the colorpicker code was adapted from the Colorpicker module. That module has no stable release yet nor any D6 branch.
TODO Consider dropping the duplicate code and adding a dependency when that module is more stable, if calendar module customizations will work in it.
File
- ./
calendar.module, line 1027 - Adds calendar filtering and displays to Views.
Code
function calendar_elements() {
// the Farbtastic colorpicker
$type['calendar_colorpicker'] = array(
'#attributes' => array(
'class' => 'calendar_colorpicker',
),
'#input' => TRUE,
);
// a textfield to associate with the Farbtastic colorpicker
$type['calendar_colorfield'] = array(
'#attributes' => array(
'class' => 'calendar_colorfield',
),
'#input' => TRUE,
'#validate' => array(
'calendar_validate_hex_color' => array(),
),
);
return $type;
}