diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-28 19:45:11 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-06-28 19:45:11 -0700 |
commit | c4f991bb7d7e90f8c55897f89888d9196c7e438f (patch) | |
tree | 6f4c164a8881f0bd1560e4966f4984e711c287c5 /themes | |
parent | 228962f0e836c303174d0be6d0ff246628ea85d9 (diff) |
Clean up the combined javascript change and refactor out the
Gallery_View base class from Theme_View and Admin_View.
1) Move all the theme specific jquery stuff from gallery_theme::head()
and admin_head() into the theme files. Use $theme->script() as
appropriate.
2) Get rid of the extra boolean on $theme->url() that we were using so
that we could call $theme->script($theme->url(...)) -- add
$theme->theme_script() instead (poorly named, but still clearer than
what we had before)
3) Fix the bug that combined scripts didn't work at all in the admin
theme.
4) Get rid of $theme->display() in favor of new View(...)
Diffstat (limited to 'themes')
-rw-r--r-- | themes/admin_default/views/admin.html.php | 10 | ||||
-rw-r--r-- | themes/default/views/page.html.php | 24 |
2 files changed, 31 insertions, 3 deletions
diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index dfbafe31..2a91a76c 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -20,6 +20,16 @@ <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>" media="screen,print,projection" /> <![endif]--> + + <?= $theme->script("lib/jquery.js") ?> + <?= $theme->script("lib/jquery.form.js") ?> + <?= $theme->script("lib/jquery-ui.js") ?> + <?= $theme->script("lib/gallery.common.js") ?> + <?= $theme->script("lib/gallery.dialog.js") ?> + <?= $theme->script("lib/superfish/js/superfish.js") ?> + <?= $theme->theme_script("js/jquery.dropshadow.js") ?> + <?= $theme->theme_script("js/ui.init.js") ?> + <?= $theme->admin_head() ?> </head> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index c74d4097..8b9466ac 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -49,6 +49,24 @@ </style> <? endif ?> <? endif ?> + <?= $theme->script("lib/jquery.js") ?> + <?= $theme->script("lib/jquery.form.js") ?> + <?= $theme->script("lib/jquery-ui.js") ?> + <?= $theme->script("lib/gallery.common.js") ?> + <?= $theme->script("lib/gallery.dialog.js") ?> + <?= $theme->script("lib/gallery.form.js") ?> + <?= $theme->script("lib/superfish/js/superfish.js") ?> + <?= $theme->script("lib/jquery.localscroll.js") ?> + <?= $theme->theme_script("js/ui.init.js") ?> + + <? /* These are page specific, but if we put them before $theme->head() they get combined */ ?> + <? if ($theme->page_type == "photo"): ?> + <?= $theme->script("lib/jquery.scrollTo.js") ?> + <?= $theme->script("lib/gallery.show_full_size.js") ?> + <? elseif ($theme->page_type == "movie"): ?> + <?= $theme->script("lib/flowplayer.js") ?> + <? endif ?> + <?= $theme->head() ?> </head> @@ -57,7 +75,7 @@ <div id="doc4" class="yui-t5 gView"> <?= $theme->site_status() ?> <div id="gHeader"> - <?= $theme->display("header.html") ?> + <?= new View("header.html") ?> </div> <div id="bd"> <div id="yui-main"> @@ -70,12 +88,12 @@ </div> <div id="gSidebar" class="yui-b"> <? if ($theme->page_type != "login"): ?> - <?= $theme->display("sidebar.html") ?> + <?= new View("sidebar.html") ?> <? endif ?> </div> </div> <div id="gFooter"> - <?= $theme->display("footer.html") ?> + <?= new View("footer.html") ?> </div> </div> <?= $theme->page_bottom() ?> |