diff options
-rw-r--r-- | timelinejs.module | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/timelinejs.module b/timelinejs.module index f1de06d..340e1ea 100644 --- a/timelinejs.module +++ b/timelinejs.module @@ -117,17 +117,20 @@ function timelinejs_json($nid) { * Menu callback. * * @todo - * Check for a timeline.css in the current theme instead of using a hardcoded value. * Dimensions should be configurable. */ function timelinejs($nid) { global $language; + global $theme; + + $path = drupal_get_path('theme', $theme); + $css = (file_exists($path .'/timeline.css')) ? '/'. $path .'/timeline.css' : NULL; return theme('timelinejs', array( 'width' => '960px', 'height' => '500px', 'source' => '/timelinejs/json/'. (int) $nid, - 'css' => '/sites/boletim/themes/boletimclean/timeline.css', + 'css' => $css, 'lang' => '/sites/all/libraries/timelinejs/compiled/js/locale/'. $language->language .'.js', )); } |