summaryrefslogtreecommitdiff
path: root/timelinejs.module
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2012-08-03 16:34:23 -0300
committerSilvio <silvio@socioambiental.org>2012-08-03 16:34:23 -0300
commitadb2ce46c140efc132354dd70e8cd8abcc9ccad3 (patch)
tree417cb4166ce62a5bd05516c6334794a7694a98d9 /timelinejs.module
parent9b407d1a901322f9a83b61659094b2f98da43818 (diff)
downloadtimelinejs-adb2ce46c140efc132354dd70e8cd8abcc9ccad3.tar.gz
timelinejs-adb2ce46c140efc132354dd70e8cd8abcc9ccad3.tar.bz2
Check for a timeline.css in the current theme instead of using a hardcoded value
Diffstat (limited to 'timelinejs.module')
-rw-r--r--timelinejs.module7
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',
));
}