summaryrefslogtreecommitdiff
path: root/modules/organize/helpers/organize_theme.php
diff options
context:
space:
mode:
authorroot <root@sleepydogs.net>2009-09-13 09:01:55 -0700
committerroot <root@sleepydogs.net>2009-09-13 09:01:55 -0700
commitc62d1f440f077ba806b7ff0c6b90ef89c79b2fd3 (patch)
treeb64f05e2a7bd8db7200e3c407904e255826b4cf2 /modules/organize/helpers/organize_theme.php
parentb96ac1eb81b7ccd5bd050ffab0ca9ce1feec8f4f (diff)
parentcaa2002d7777e0ceb884d4c628650804620ca2b6 (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.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/organize/helpers/organize_theme.php b/modules/organize/helpers/organize_theme.php
index 02f1f589..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("modules/organize/js/organize_init.js");
- $theme->script("modules/organize/js/organize.js");
- $theme->css("modules/organize/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");
+ }
}
}