summaryrefslogtreecommitdiff
path: root/timelinejs.module
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2012-08-01 16:40:48 -0300
committerSilvio <silvio@socioambiental.org>2012-08-01 16:40:48 -0300
commit0984f3d81efe59a3028b3f00a1f9afb8926da885 (patch)
tree846b9a47f9e10af078730bbb16cd92c70ad0619c /timelinejs.module
parentb0fe5cb2bec5ce8c983530dceb1ec77f5720d656 (diff)
downloadtimelinejs-0984f3d81efe59a3028b3f00a1f9afb8926da885.tar.gz
timelinejs-0984f3d81efe59a3028b3f00a1f9afb8926da885.tar.bz2
Loading event nodes
Diffstat (limited to 'timelinejs.module')
-rw-r--r--timelinejs.module7
1 files changed, 4 insertions, 3 deletions
diff --git a/timelinejs.module b/timelinejs.module
index 9ae7f80..33020ed 100644
--- a/timelinejs.module
+++ b/timelinejs.module
@@ -105,14 +105,15 @@ function timelinejs_load_events($nid) {
/**
* Menu callback.
- *
- * @todo
*/
function timelinejs_json($nid) {
// Sanitization and basic data.
$nid = (int) $nid;
$nodes = timelinejs_load_events($nid);
- $items = array();
+
+ foreach ($nodes as $node) {
+ $items[] = node_load($node->entity_id);
+ }
foreach ($items as $event) {
$events[] = theme('timelinejs_json_event', array('event' => $event));