*** timeline.install Sun Oct 22 05:39:26 2006 --- timeline.install.patched Wed Dec 19 20:59:00 2007 *************** *** 14,19 **** function timeline_install() { drupal_set_message('Timeline module successfully installed.'); ! if (!module_exist('views')) drupal_set_message('Warning: Timeline requires the Views module to function.', 'error'); } --- 14,19 ---- function timeline_install() { drupal_set_message('Timeline module successfully installed.'); ! if (!module_exists('views')) drupal_set_message('Warning: Timeline requires the Views module to function.', 'error'); } *** timeline.js Sun Dec 10 07:45:24 2006 --- timeline.js.patched Wed Dec 19 20:59:11 2007 *************** *** 33,39 **** bandInfos[1].syncWith = 0; bandInfos[1].highlight = true; bandInfos[1].eventPainter.setLayout(bandInfos[0].eventPainter.getLayout()); ! var widget = Timeline.create($(id), bandInfos, orientation); if (feedType == 'json') { widget.loadJSON(url, function(json, url) { eventSource.loadJSON(json, url); }); --- 33,39 ---- bandInfos[1].syncWith = 0; bandInfos[1].highlight = true; bandInfos[1].eventPainter.setLayout(bandInfos[0].eventPainter.getLayout()); ! var widget = Timeline.create(document.getElementById(id), bandInfos, orientation); if (feedType == 'json') { widget.loadJSON(url, function(json, url) { eventSource.loadJSON(json, url); }); *** timeline.theme.inc Sun Dec 10 07:45:24 2006 --- timeline.theme.inc.patched Wed Dec 19 21:24:56 2007 *************** *** 99,107 **** } else { // absolute URL drupal_set_html_head(''); } ! theme_add_style(drupal_get_path('module', 'timeline') . '/timeline.css'); drupal_add_js(drupal_get_path('module', 'timeline') . '/timeline.js'); $timeline = (object)$timeline; --- 99,108 ---- } else { // absolute URL drupal_set_html_head(''); + drupal_set_html_head(''); } ! drupal_add_css(drupal_get_path('module', 'timeline') . '/timeline.css'); drupal_add_js(drupal_get_path('module', 'timeline') . '/timeline.js'); $timeline = (object)$timeline; *************** *** 111,117 **** if (empty($timeline->align)) $timeline->align = ''; if (empty($timeline->id)) $timeline->id = 'timeline'; if (empty($timeline->orientation)) $timeline->orientation = TIMELINE_ORIENTATION; ! if (empty($timeline->initial_date)) $timeline->initial_date = date('D M d Y G:i:s') . ' GMT' . date('O'); // FIXME: timezone fiddling due to bug in the Timeline widget; see timeline_format_date(). //if (!isset($timeline->timezone)) $timeline->timezone = timeline_get_timezone() / 3600; --- 112,118 ---- if (empty($timeline->align)) $timeline->align = ''; if (empty($timeline->id)) $timeline->id = 'timeline'; if (empty($timeline->orientation)) $timeline->orientation = TIMELINE_ORIENTATION; ! if (empty($timeline->start_date)) $timeline->start_date = date('D M d Y G:i:s') . ' GMT' . date('O'); // FIXME: timezone fiddling due to bug in the Timeline widget; see timeline_format_date(). //if (!isset($timeline->timezone)) $timeline->timezone = timeline_get_timezone() / 3600; *************** *** 133,143 **** $query = 'view=' . $timeline->view_name . (empty($timeline->view_args) ? '' : '&args=' . urlencode(serialize($timeline->view_args))); $url = url('timeline/' . TIMELINE_FEED_TYPE, $query, NULL, FALSE); ! $args = array($timeline->id , '%O', $timeline->initial_date, $timeline->timezone, $url, TIMELINE_FEED_TYPE); ! $script = 'createTimelineWidget(' . implode(', ', array_map('drupal_to_js', $args)) . ');'; ! $script = 'if (isJsEnabled()) { addLoadEvent(function() { ' . $script . ' }); }'; ! $script = ''; ! $output .= str_replace('"%O"', 'Timeline.' . $timeline->orientation, $script); // if only PHP had symbols... return $output; } --- 134,158 ---- $query = 'view=' . $timeline->view_name . (empty($timeline->view_args) ? '' : '&args=' . urlencode(serialize($timeline->view_args))); $url = url('timeline/' . TIMELINE_FEED_TYPE, $query, NULL, FALSE); ! ! $output = " !
id\" class=\"timeline\" style=\"$style\"> !
! ! ! ! "; return $output; }