summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2013-06-25 15:50:53 -0300
committerSilvio <silvio@socioambiental.org>2013-06-25 15:50:53 -0300
commita30692d0e8b4c2fb551b3742f468d5ad0a94e9e9 (patch)
tree0393a80c87193813fd5c52c19ae5135741ec8003
parent92fdd4b5361b1d25be91994afa499fbdc5d10110 (diff)
downloadtimelinejs-a30692d0e8b4c2fb551b3742f468d5ad0a94e9e9.tar.gz
timelinejs-a30692d0e8b4c2fb551b3742f468d5ad0a94e9e9.tar.bz2
Fixing library_path
-rw-r--r--timelinejs.module11
-rw-r--r--timelinejs.tpl.php2
2 files changed, 7 insertions, 6 deletions
diff --git a/timelinejs.module b/timelinejs.module
index 9fd4791..fbb2caf 100644
--- a/timelinejs.module
+++ b/timelinejs.module
@@ -197,11 +197,12 @@ function timelinejs($nid, $width = '960px', $height = '500px') {
$css = (file_exists($theme_path .'/timeline.css')) ? '/'. $theme_path .'/timeline.css' : '/'. $library_path .'/compiled/css/timeline.css';
return theme('timelinejs', array(
- 'width' => $width,
- 'height' => $height,
- 'source' => $base_url .'/timelinejs/json/'. (int) $nid,
- 'css' => $css,
- 'lang' => $library_path .'/compiled/js/locale/'. $language->language .'.js',
+ 'width' => $width,
+ 'height' => $height,
+ 'source' => $base_url .'/timelinejs/json/'. (int) $nid,
+ 'css' => $css,
+ 'lang' => '/'. $library_path .'/compiled/js/locale/'. $language->language .'.js',
+ 'library_path' => $library_path,
));
}
diff --git a/timelinejs.tpl.php b/timelinejs.tpl.php
index 1dc3aed..cd8a846 100644
--- a/timelinejs.tpl.php
+++ b/timelinejs.tpl.php
@@ -12,5 +12,5 @@
lang: '<?php print $lang; ?>'
}
</script>
-<script type="text/javascript" src="/sites/all/libraries/timelinejs/compiled/js/timeline-embed.js"></script>
+<script type="text/javascript" src="/<?php print $library_path; ?>/compiled/js/timeline-embed.js"></script>
<!-- END Timeline Embed -->