summaryrefslogtreecommitdiff
path: root/modules/organize/helpers/organize_theme.php
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-08-29 14:17:48 -0700
committerAndy Staudacher <andy.st@gmail.com>2009-08-29 14:17:48 -0700
commita5dfc81a8f7bef0305b62254252de6df23684199 (patch)
tree4851cb68abede6920208871449dedd2e939c1a16 /modules/organize/helpers/organize_theme.php
parentd5660d2d3ea6e8172272f1eb27e8071a1a42d87b (diff)
parenta9fcec755a835e284465bafcc9aba9ec9c2f0f62 (diff)
Merge commit 'upstream/master'
Conflicts: modules/akismet/views/admin_akismet.html.php modules/comment/helpers/comment_rss.php modules/gallery/helpers/gallery_rss.php modules/gallery/libraries/I18n.php modules/gallery/views/permissions_browse.html.php modules/gallery/views/simple_uploader.html.php modules/info/views/info_block.html.php modules/organize/controllers/organize.php modules/organize/views/organize.html.php modules/organize/views/organize_album.html.php themes/default/views/album.html.php themes/default/views/movie.html.php themes/default/views/photo.html.php
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 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");
+ }
}
}