Commit Graph

257 Commits

Author SHA1 Message Date
Tim Almdal
1f014aae6c Allow a theme to override the page refresh mechanism. Create a new
javascript lib (gallery.reload.js) which defines the functions
gallery_reload() and gallery_location(new_location).  They just
do a window.location.reload() and window.location = new_location.

This change breaks the assumption that all themes will handle page reloads
the same and allows the theme to customize the page refresh.
2009-07-27 12:39:12 -07:00
Chad Kieffer
a7af9bb456 Missed committing the gBanner addition to the view template. 2009-07-26 16:02:53 -06:00
Bharat Mediratta
dbeadc1407 Use the Kohana cascading filesystem to locate resources loaded by the
theme.  Because the theme comes first, this means that themes can
override any module resources, at the cost that we no longer have
namespacing for JS and CSS files.

The only file getting used outside of this model is
themes/default/screen.css which is used in the admin theme.  I fixed
that by copying screen.css into admin_default and renaming its
screen.css to admin_screen.css.  I also copied over all the images
that it was referencing.

Fixes tickets #48 and #539.

Theme API changes:
- theme_script(), theme_url() and theme_css() are no longer needed
- script(), url() and css() now refer to the first matching asset in
  the module load path, where gallery3/lib is at the end of the path
2009-07-22 14:27:57 -07:00
Tim Almdal
7a9a4b9e8b Found another place that p:purify was required.
Generalize the dynamic.html so it doesn't require a tag element
2009-07-04 09:00:11 -07:00
Tim Almdal
d6648c0aff Fix for ticket #477. Use nl2br method when rendering comment::text and
item::description.  In addition add p::clean or p::purify to places that
xss cleaning had missed (i.e. rss feeds)
2009-07-04 08:17:12 -07:00
Tim Almdal
54ffea2419 Split the clean method into two clean and purify. clean is a light weight
approach using html::specialchars and purify uses HTMLPurifier to intelligently
cleanse the output fields. Use purifier for text and title fields where it is
likely that a user would enter html to format their data.
2009-07-03 21:44:10 -07:00
Bharat Mediratta
9beac1132e Fix a typo in the Doctype. Fixes ticket #497. 2009-07-01 01:08:00 -07:00
jhilden
0b34ec4e8b UI enhancement: made the 'back to the Gallery' links a little bit easier to discover 2009-06-30 22:22:29 -04:00
Tim Almdal
8ed6d1183b Fix for #319.
Created a new view "movieplayer.html.php", which is rendered by
Item_Model::movie_img().  Changed movie.html.php to use movie_img to render
the movie player link.
2009-06-30 08:21:00 -07:00
Andy Staudacher
0eb9a2aacd Fix for ticket 86 - Make Cancel button in doalogs localizable. 2009-06-29 20:55:23 -07:00
Andy Staudacher
e3b4c6a577 Merge branch 'master' of git@github.com:gallery/gallery3 2009-06-29 20:21:25 -07:00
Andy Staudacher
fe668abcb3 Fix for ticket 481 - Better plural handling for 2 messages with multiple %count variables. 2009-06-29 20:20:15 -07:00
Bharat Mediratta
f5f74e3638 Remove fix-ie.css scripts from the combined bundle, since we only want
to load them conditionally.
2009-06-29 20:12:27 -07:00
Tim Almdal
6ec293dfe7 *Note* work in progress.
Implement the combined css functionality.  Local url references and replace with absolute urls instead of relative.
2009-06-29 08:24:42 -07:00
Tim Almdal
10b4eda6f0 Merge branch 'master' of git@github.com:gallery/gallery3
Conflicts:
	modules/gallery/libraries/Theme_View.php
	themes/admin_default/views/admin.html.php
2009-06-29 06:44:05 -07:00
Bharat Mediratta
6e8a8c53e6 Rename $theme->url() to $theme->theme_url() for consistency wiht
$theme->theme_script().
2009-06-28 19:49:48 -07:00
Bharat Mediratta
c4f991bb7d 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(...)
2009-06-28 19:45:11 -07:00
Tim Almdal
4707a97b82 Merge branch 'master' of git@github.com:gallery/gallery3 2009-06-27 16:57:38 -07:00
Bharat Mediratta
aad0dd357f Create a new thumb_menu() and convert Digibug over to use it.
1) Eliminate digibug_album.html

2) Get rid of the $(document).ready() in digibug.js and rename popUp() to
   digibug_popup() then just make direct calls to digibug_popup() in the
   menu urls.
2009-06-27 16:29:09 -07:00
Tim Almdal
84e98e830c Move the inclusion of photo and movie specific javascript into gallery_theme 2009-06-26 08:25:24 -07:00
Tim Almdal
42a5bd20a5 1) Move the generation of script tags to gallery_theme::head and gallery_theme::admin_head. This allows us to potentially manage the scripts like we do in g2 (single file and compressed)
2) Change Theme_View::_call to always call the gallery_theme::$function first.
2009-06-26 07:51:29 -07:00
Bharat Mediratta
b9b68e0952 Add a new "show credits" check box in the theme options so that you
can disable any module credits if you want.  Update the theme to obey
it.
2009-06-23 16:05:32 -07:00
Bharat Mediratta
107431f246 Revert "Remove unsued <span> element"
This reverts commit 65a7967a04.

Turns out, the span really is in use.
2009-06-23 13:51:41 -07:00
Tim Almdal
65a7967a04 Remove unsued <span> element
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-23 13:40:23 -07:00
Bharat Mediratta
49975f10b9 Add width/height to the logo <img> 2009-06-21 15:15:07 -07:00
Bharat Mediratta
d54afb71d4 Fix a javascript error that was breaking IE, and localize
ADD_A_COMMENT otherwise ui.init.js bombs.
2009-06-19 10:14:27 -07:00
Tim Almdal
1dccc0286f Change the page.html file so that if the type of page is login, the sidebar contents are are not shown 2009-06-16 22:09:02 -07:00
Bharat Mediratta
7ad5e9ee2c Move the show_full_size code into gallery/lib so that it's generally
available to themes that want to use it.  It should probably
eventually be generalized away from just being for full sized images,
but it's a step in the right direction.

Fixes ticket #427.
2009-06-16 18:05:23 -07:00
Bharat Mediratta
f6e8f34bef Add the real image url to the anchor elements for our full size links
so that right clicking works.

Turn the full size rendering code into a function and call it with
arguments, instead of creating a hacky named data structure to hold
the info.

Further partial fixes for ticket #427.
2009-06-16 17:57:24 -07:00
Bharat Mediratta
51b9873041 Move all the fullsize code into the theme to make it less confusing.
Partial fix for ticket #427.
2009-06-16 17:20:30 -07:00
Tim Almdal
b6c3451231 Fix the bug introduced by r79582ee, where we try to set the title of the tag album to tag->title. which doesn't exist. 2009-06-15 20:47:36 -07:00
Bharat Mediratta
79582ee5bf Fix up the titles in the default theme. They've been broken for a
while.  This fixes ticket #342.

The bug is that we were using $item instead of $theme->item().  But we
were also not special casing tags properly, and they are effectively
first class citizens (at least for now) so treat them properly.  Also,
set page_title by default in the theme so that we don't have to do an
empty() check on it (makes the theme easier to read) and move the
title out of Tags_Controller so that the theme has more control over
it.
2009-06-15 18:15:41 -07:00
Bharat Mediratta
ff74d2d809 Merge branch 'master' of git@github.com:gallery/gallery3 2009-06-14 22:28:40 -07:00
Bharat Mediratta
1b656be713 Create a sidebar for tag pages
Move the <link> for the container feed (either gallery/album/<id> or
tag/tag/<id>) back into gallery_theme
2009-06-14 22:27:26 -07:00
Chad Kieffer
3d4cbfa274 Move jquery local scroll module from default theme to lib, only load it if viewing photo view. White space cleanup, removed debug print from template. 2009-06-14 22:39:12 -06:00
Bharat Mediratta
798444f40b Replace login_page.html.php with the form, wrapped in our default page
type.
2009-06-09 19:45:15 -07:00
Bharat Mediratta
e5d273e929 Merge branch 'master' of git@github.com:gallery/gallery3 2009-06-09 19:00:22 -07:00
Tim Almdal
b276eaa68b Add some window dressing to login_page.html in order to make it more in line
with the overall look of the Gallery3 theme

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-10 08:39:47 +08:00
Tim Almdal
98422857eb Forgot this on the last commit
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-10 08:39:46 +08:00
Tim Almdal
a4a38ba760 Created not_authorized.html.php which is a prettier login screen if the root
album is not publicly browsable.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-10 08:39:45 +08:00
Tim Almdal
3c3a65b5a7 Rather than just displaying the "unformatted" login screen when the root album
is not viewable by a guest, display the root album as if it was empty. When
the page finishes loading force the login dialog to be displayed.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-09 22:22:57 +08:00
Bharat Mediratta
f7a720d2e8 Rename main_element_attributes() callback to body_attributes() to be
more intuitive for themers.
2009-06-08 23:17:28 -07:00
Andy Staudacher
0e415dae9b Preliminary BiDi support (needs *a lot* of tweaking) 2009-06-06 15:24:14 -07:00
Bharat Mediratta
b30645e36c Localize the 'Add a comment' message 2009-06-05 00:48:18 -07:00
Bharat Mediratta
85d3a962cc Change XXX to @todo 2009-06-04 21:44:15 -07:00
Bharat Mediratta
65df897fcd Properly internationalize the "Add some" photos link. 2009-06-04 11:57:36 -07:00
Chad Kieffer
0746e7e10d Show an "add photos" message on empty albums for those who can. 2009-06-03 19:04:44 -06:00
Tim Almdal
0f987880e6 Fix for ticket #320 2009-06-02 12:08:47 -07:00
Bharat Mediratta
b9af090cbd Switch the default login page to non-ajax mode. It looks awful, but better than before. 2009-06-01 21:44:04 -07:00
Bharat Mediratta
e30b45be07 Merge branch 'master' of git://github.com/gallery/gallery3 2009-05-31 01:15:11 -07:00