summaryrefslogtreecommitdiff
path: root/timelinejs.module
diff options
context:
space:
mode:
Diffstat (limited to 'timelinejs.module')
-rw-r--r--timelinejs.module13
1 files changed, 11 insertions, 2 deletions
diff --git a/timelinejs.module b/timelinejs.module
index da492cf..2fc660f 100644
--- a/timelinejs.module
+++ b/timelinejs.module
@@ -54,7 +54,7 @@ function timelinejs_theme($existing, $type, $theme, $path) {
'start_at_end' => 'false',
'hash_bookmark' => 'true',
'css' => NULL,
- 'js' => '/'. libraries_get_path('timelinejs') .'/compiled/js/timeline.js',
+ 'js' => '/'. timelinejs_library_path() .'/compiled/js/timeline.js',
'lang' => NULL,
),
),
@@ -78,6 +78,15 @@ function timelinejs_theme($existing, $type, $theme, $path) {
}
/**
+ * Determine the library path.
+ */
+function timelinejs_library_path() {
+ // We have to use "timeline" instead of "timelinejs" because of
+ // this issue: https://github.com/VeriteCo/TimelineJS/issues/403
+ return libraries_get_path('timeline');
+}
+
+/**
* Get a score nid from a timeline nid.
*/
function timelinejs_load_events($nid) {
@@ -197,7 +206,7 @@ function timelinejs($nid = NULL, $width = '960px', $height = '500px') {
$node = node_load($nid);
$theme_path = drupal_get_path('theme', $theme);
- $library_path = libraries_get_path('timelinejs');
+ $library_path = timelinejs_library_path();
// Determine stylesheet
if (file_exists($theme_path .'/timeline.css')) {