Needs review
Project:
Calendar Block
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2011 at 19:42 UTC
Updated:
29 Aug 2011 at 19:42 UTC
I needed to pass a data array to the AJAX "alter" operation in hook_calendar_block. The following patch contains 3 lines of code (1 in calendar_block.js, 2 in calendar_block.module) to support this. Example:
/**
* Implementation of hook_calendar_block().
*/
function custom_calendar_block(&$calendar, &$date, $op) {
switch ($op) {
case 'load':
$calendar->data = array('foo' => 'bar');
break;
case 'alter':
// data array property contains additional attributes
$calendar->data['foo'];
break;
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| add_data.patch | 1.11 KB | johnhanley |