diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-08-28 13:48:54 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-08-28 13:48:54 -0600 |
commit | 5a2853bca1ea9a9231e01814df9aa373bf50d19c (patch) | |
tree | 431264bfb9de1d8bbdc6a9ba7775a363381f96e8 /modules/organize/helpers/organize_theme.php | |
parent | f1e008a14f2dfb51d1204dad3deb19e2e3df16c8 (diff) | |
parent | 6dcfdb6432d556f43736d60de8f310f247868bfa (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/organize/helpers/organize_theme.php')
-rw-r--r-- | modules/organize/helpers/organize_theme.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/organize/helpers/organize_theme.php b/modules/organize/helpers/organize_theme.php index e4feba2b..61b6fe7d 100644 --- a/modules/organize/helpers/organize_theme.php +++ b/modules/organize/helpers/organize_theme.php @@ -19,9 +19,14 @@ */ class organize_theme { static function head($theme) { - // @tdo remove the addition css and organize.js (just here to test) - $theme->script("organize_init.js"); - $theme->script("organize.js"); - $theme->css("organize.css"); + $item = $theme->item(); + if ($item && access::can("edit", $item) && $item->is_album()) { + // @todo: Defer loading js/css until we're loading the organize dialog as <script> and + // <link> elements so that we're not forcing them to be downloaded on every page view (which + // is expensive in terms of browser latency). When we do that, we'll have to figure out an + // approach that lets us continue to use the Kohana cascading filesystem. + $theme->script("organize.js"); + $theme->css("organize.css"); + } } } |