diff options
| -rw-r--r-- | timelinejs.module | 14 | 
1 files changed, 8 insertions, 6 deletions
| diff --git a/timelinejs.module b/timelinejs.module index 1afff83..441f8f9 100644 --- a/timelinejs.module +++ b/timelinejs.module @@ -210,7 +210,7 @@ function timelinejs_widget($nid = NULL, $width = '960px', $height = '500px') {    $output .= '<title>' . t('Timeline: @title', array('@title' => $node->title)) . '</title>';    $output .= '<script type="text/javascript">timelineWidget = true;</script>';    $output .= '</head><body class="widget timeline-widget" style="height: 100%; margin: 0px;">'; -  $output .= timelinejs($nid, $width, $height); +  $output .= timelinejs($nid, $width, $height, FALSE);    $output .= '</body></html>';    // Avoid themeable output. @@ -221,7 +221,7 @@ function timelinejs_widget($nid = NULL, $width = '960px', $height = '500px') {  /**   * Menu callback.   */ -function timelinejs($nid = NULL, $width = '960px', $height = '600px') { +function timelinejs($nid = NULL, $width = '960px', $height = '600px', $embed = TRUE) {    global $language;    global $theme;    global $base_url; @@ -275,10 +275,12 @@ function timelinejs($nid = NULL, $width = '960px', $height = '600px') {      'library_path' => $library_path,    )); -  $output .= theme('timelinejs_embed', array( -    'nid'  => $nid, -    'lang' => $language->language, -  )); +  if ($embed) { +    $output .= theme('timelinejs_embed', array( +      'nid'  => $nid, +      'lang' => $language->language, +    )); +  }    return $output;  } | 
