summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2012-08-03 16:42:15 -0300
committerSilvio <silvio@socioambiental.org>2012-08-03 16:42:15 -0300
commitb8449c8a5a5b9ee9639bc6fa573f55088c8a74fa (patch)
tree2bbc087764ba15801917fb267cf9cd6072d93eaa
parentadb2ce46c140efc132354dd70e8cd8abcc9ccad3 (diff)
downloadtimelinejs-b8449c8a5a5b9ee9639bc6fa573f55088c8a74fa.tar.gz
timelinejs-b8449c8a5a5b9ee9639bc6fa573f55088c8a74fa.tar.bz2
Dimensions should be configurable
-rw-r--r--timelinejs.module9
1 files changed, 3 insertions, 6 deletions
diff --git a/timelinejs.module b/timelinejs.module
index 340e1ea..7cd5b64 100644
--- a/timelinejs.module
+++ b/timelinejs.module
@@ -115,11 +115,8 @@ function timelinejs_json($nid) {
/**
* Menu callback.
- *
- * @todo
- * Dimensions should be configurable.
*/
-function timelinejs($nid) {
+function timelinejs($nid, $width = '960px', $height = '500px') {
global $language;
global $theme;
@@ -127,8 +124,8 @@ function timelinejs($nid) {
$css = (file_exists($path .'/timeline.css')) ? '/'. $path .'/timeline.css' : NULL;
return theme('timelinejs', array(
- 'width' => '960px',
- 'height' => '500px',
+ 'width' => $width,
+ 'height' => $height,
'source' => '/timelinejs/json/'. (int) $nid,
'css' => $css,
'lang' => '/sites/all/libraries/timelinejs/compiled/js/locale/'. $language->language .'.js',