diff options
| author | Silvio <silvio@socioambiental.org> | 2012-08-03 16:34:23 -0300 | 
|---|---|---|
| committer | Silvio <silvio@socioambiental.org> | 2012-08-03 16:34:23 -0300 | 
| commit | adb2ce46c140efc132354dd70e8cd8abcc9ccad3 (patch) | |
| tree | 417cb4166ce62a5bd05516c6334794a7694a98d9 | |
| parent | 9b407d1a901322f9a83b61659094b2f98da43818 (diff) | |
| download | timelinejs-adb2ce46c140efc132354dd70e8cd8abcc9ccad3.tar.gz timelinejs-adb2ce46c140efc132354dd70e8cd8abcc9ccad3.tar.bz2 | |
Check for a timeline.css in the current theme instead of using a hardcoded value
| -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',    ));  } | 
