Archived
1
0
Fork 0

add inline JavaScript variable to indicate slider direction (addresses #46)

This commit is contained in:
Jan Dittberner 2009-07-11 19:14:13 +00:00
parent dca42f4185
commit f61853700d
2 changed files with 11 additions and 4 deletions

View file

@ -56,14 +56,17 @@ $styles = array('css/jquery.lightbox.css');
$template = $theme->getTemplate();
if ($theme->themetype == 'horizontal') {
$inlinestyles = sprintf("\n#scrollable { width:%dpx; }\n", $thumbinfo[0]);
$inlinestyles = sprintf("#scrollable { width:%dpx; }\n", $thumbinfo[0]);
$inlinescript = "var themetype='horizontal';";
} else {
$inlinestyles = sprintf("\n#scrollable { height:%dpx; }\n", $thumbinfo[0]);
$inlinestyles = sprintf("#scrollable { height:%dpx; }\n", $thumbinfo[0]);
$inlinescript = "var themetype='vertical';";
}
$template->assign('scripts', $scripts);
$template->assign('styles', $styles);
$template->assign('inlinestyle', $inlinestyles);
$template->assign('inlinescript', $inlinescript);
$template->assign('title', getGalleryTitle($thumbinfo));
$template->assign('gallerylinks', getGalleryLinks());
$template->assign('thumbnails', getAllThumbnails($thumbinfo));

View file

@ -28,6 +28,10 @@ a:active {
<?php } ?>
<link rel="stylesheet" type="text/css" href="<?php echo $content['themepath']; ?>/css/main.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $content['themepath']; ?>/css/format.css" />
<script type="text/javascript"><!--
<?php echo $content['inlinescript']; ?>
//--></script>
<?php foreach ($content['scripts'] as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>