summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-26 08:25:24 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-26 08:25:24 -0700
commit84e98e830c4967c277dfcb5bb6d18c0ec3313355 (patch)
treea82d81bd63c2d22a55ac5c095cf5561956a73a21
parentf4778699fc52c045f60d72e20bebc000d9f6bda8 (diff)
Move the inclusion of photo and movie specific javascript into gallery_theme
-rw-r--r--modules/gallery/helpers/gallery_theme.php4
-rw-r--r--themes/default/views/movie.html.php1
-rw-r--r--themes/default/views/photo.html.php1
3 files changed, 4 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index 24f4129b..0679087e 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -31,6 +31,10 @@ class gallery_theme_Core {
if ($theme->page_type == 'photo') {
$buf .= html::script("lib/jquery.scrollTo.js");
$buf .= html::script("lib/jquery.localscroll.js");
+ $buf .= html::script("lib/gallery.show_full_size.js");
+ }
+ if ($theme->page_type == 'movie') {
+ $buf .= html::script("lib/flowplayer.js");
}
$buf .= html::script($theme->url("js/ui.init.js", false, true));
if ($session->get("debug")) {
diff --git a/themes/default/views/movie.html.php b/themes/default/views/movie.html.php
index e8559697..134e3571 100644
--- a/themes/default/views/movie.html.php
+++ b/themes/default/views/movie.html.php
@@ -1,5 +1,4 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<script src="<?= url::file("lib/flowplayer.js") ?>" type="text/javascript"></script>
<div id="gItem">
<?= $theme->photo_top() ?>
diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php
index 1c3b81a7..4765a4e3 100644
--- a/themes/default/views/photo.html.php
+++ b/themes/default/views/photo.html.php
@@ -2,7 +2,6 @@
<? if (access::can("view_full", $theme->item())): ?>
<!-- Use javascript to show the full size as an overlay on the current page -->
-<script src="<?= url::file("lib/gallery.show_full_size.js") ?>" type="text/javascript"></script>
<script>
$(document).ready(function() {
$(".gFullSizeLink").click(function() {