Commit Graph

40 Commits

Author SHA1 Message Date
Bharat Mediratta
76c0c7f3a1 Change our menu building blocks to use PHP templates so that themes
can override them and define their own menu formats.  I worry a little
bit that this approach may be too heavy since we're now doing a lot
more template includes than we were before.  Also, I had to change the
Menu API to stop using __toString() because you can't throw exceptions
from __toString() which would make it an unhappy experience for
developers.
2009-10-27 13:48:41 -07:00
Tim Almdal
3c936d661a Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class 2009-10-22 13:11:03 -07:00
Tim Almdal
78ee4193b7 Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form. 2009-10-16 10:06:58 -07:00
Tim Almdal
00eacd659f Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module. 2009-10-16 08:53:31 -07:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Tim Almdal
60d35b8992 Use the block_manager to manage site sidebar panels. Fixes ticket #110.
* Extend block_manager to handle sidebar blocks. get_available has become get_available_admin_blocks, get_list becomes get_admin_list.
* Create new functions get_available_site_blocks which will look for gallery_block get_available_site_blocks.
* Refactor sidebar_blocks into a separate function and then call block_manager::get_html(site.sidebar). Convert image_block to use block management instead of theme::sidebar_blocks
* Change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach
* Convert the user module to use the new sidebar block structure. remove the installers for info and image_block modules.
* Convert tag and rss modules to the new sidebar framework. reset the version number to 1 for info and image_block modules.
* Change the get_html method to ignore empty blocks and change the individual handlers to return an empty string if no block is generated
* Add a warning message if no sidebar blocks are active and provide a link to the admin page that configures the sidebar.
2009-09-30 07:31:12 -07:00
Tim Almdal
89a67dba63 * Remove the @todo in module event and always try to call gallery_event::$function first
* Refactor gallery.php to move site_menu, admin_menu, and context_menu to gallery_event.php
* Change Theme_View and Admin_view to call module::event("site_menu|admin_menu|context_menu"...)
2009-09-29 08:50:53 -07:00
Tim Almdal
c51c76dcaa Fix Admin_View to look for the the variable active_admin_theme instead of active_site_theme. In addition check for the existence of THEMEPATH . instead of theme/ 2009-09-24 15:06:40 -07:00
Tim Almdal
59c1c36639 Hopefully the last 2 errant occurrences of default as it relates to theme names 2009-09-24 14:50:30 -07:00
Bharat Mediratta
4e1e24ba1a Add a movie_menu() theme callback, and have the default theme call it
in the sidebar on movie page types.
2009-09-16 20:34:42 -07:00
Bharat Mediratta
cbba45fffc Create the concept of an "ajax link" and use it for thumbnail rotation
and album covers in the context menu.

Notes:
- This requires context_menu() to have a CSS selector that refers to the
  <img> that we're operating on, otherwise we don't know how to find the
  thumbnail, etc.
- Create Menu_Element_Ajax_Link which has an ajax_handler attribute
  that contains a snippet of JS that we're going to run when the ajax
  call returns.
- Add $.gallery_replace_image in gallery.common.js
- Add lib/gallery.ajax.js which can be used to ajaxify any link, and have
  ui.init.js in the themes call that on all .gAjaxLink elements.
2009-08-10 23:07:50 -07:00
Bharat Mediratta
f7a23e0a9c Fix up context menus a bit.
- Update digibug_event::context_menu() to take the actual item
- Change gallery::context_menu() to not require the page_type as an argument
2009-08-09 23:08:35 -07:00
Bharat Mediratta
52147cf6f8 Combine the quick menu and the thumb menu into a single menu called
the "context" menu.

This new context menu is generated using the typical event processing
system, like our other menus.  The specialized quick CSS and JS is now
gone, replaced by our generic menu handling code.  It's all rolled
together currently using the thumb_menu UI for easy packaging.  All
the CSS and JS is updated.

NOTE: the non-dialog links (rotate, album_cover) have a broken UI
because they return JSON which the quick.js code handled specially,
but we don't handle properly now.  I need to fix this.
2009-08-03 21:45:54 -07:00
Bharat Mediratta
15f148349e Make body_attributes() a theme callback instead of a method on the
View.  This allows modules to piggyback on it.
2009-07-29 17:25:53 -07:00
Bharat Mediratta
30586236a5 Make sure the thumb_menu has the gThumbMenu CSS class. 2009-07-28 20:44:50 -07:00
Bharat Mediratta
544e92adc9 Move site_menu and admin_menu into gallery helper so that site_menu
can call admin_menu.
2009-07-28 20:32:11 -07:00
Bharat Mediratta
1e90e40d3a Use events to generate menus, instead of having xxx_menu helpers.
This is the first step towards having a simple, lightweight and
unified API for module interaction.
2009-07-28 13:47:22 -07:00
Bharat Mediratta
895fbfd95b Get the thumbnail menu working.
1) Stop changing the menu classes in JS, instead allow us to specify
it in the Menu class itself and then set it to be gThumbMenu in Theme_View

2) Move the gThumbMenu init code to the bottom of the $(document).ready() block;
something in there was interfering with it.
2009-07-11 17:59:55 -07:00
Bharat Mediratta
86a7b15d20 Compact all menus. This fixes the problem that the new [Options]
thumb menu shows up when it has nothing in it.
2009-07-10 10:39:59 -07:00
Bharat Mediratta
95b900d4f4 Fix some bugs in the combined JS/CSS code (most of which I introduced
in my last refactor):

1) Actually combine the JS (I was only combining the CSS)
2) Add line breaks between the files and comment them so that we can
   find a specific file inside the blob.
3) Add an HTML comment to help developers figure out why they can't
   find their CSS/JS.
2009-06-29 19:11:59 -07:00
Bharat Mediratta
fa8ca2f7ad Refactor combine_xxx() functions together into combine_files() and use
html functions to generate the resulting elements.  Add phpdoc.
2009-06-29 18:12:53 -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
Tim Almdal
42c82ef7f0 Temporary checkin to allow merge with trunk... don't integrate 2009-06-29 06:08:50 -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
d90e30c378 Rename the combined javascript controller from javascript/combined to combined/javascript. 2009-06-28 17:07:12 -07:00
Bharat Mediratta
aa31e1f009 Tweak the cache implementation
1) Drop the *_modified key, we don't really need it.  The modification date is not
   relevant to our browser caching strategy.
2) Fix multiple issues with the Expires header and just hardcode it to the biggest
   possibly value for code clarity.
3) print the $content out directly instead of using fwrite
4) Minor cleanups in the installer.
2009-06-28 16:24:51 -07:00
Tim Almdal
bf26ca727e Change the combined javascript to use the new caching functionality and respect the HTTP_IF_MODIFIED_SINCE header request. 2009-06-28 15:30:13 -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
11f08ee439 Implement the combined javascript controller. 2009-06-26 21:42:02 -07:00
Tim Almdal
4cec020163 Create a theme_view function script which allows modules in the head or admin_head functions to specify javascript files that are required for this page.
In this commit, these script files are expressed at the end of the head or admin_head calls and appended to the beginning of the block stack.  In a future commit these will be combined and gzipped for download.
2009-06-26 14:37:15 -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
Tim Almdal
a6a9b256ae Correct the "inappropriate intimacy" smell that bharat's refined senses pick up 2009-06-17 13:34:18 -07:00
Tim Almdal
fbefdd5556 Fix for ticket #366
1) Stored the menu element type in the menu element
2) Scanned the menu before display removing any empty sub menus.
Went with the removal approach because there will more users than developers
2009-06-17 06:14:36 -07:00
Bharat Mediratta
ab38c92771 Refactor common xxx_menu() code into private _menu() helper. 2009-06-16 13:34:42 -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
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
Bharat Mediratta
66c6c3df0e Convert single quotes to double quotes. 2009-06-04 21:43:21 -07:00
Bharat Mediratta
88a3d43ba9 Update all references to the core application to now point to the
gallery module.  This type of mass update is prone to some small bugs.
2009-05-27 16:17:29 -07:00
Bharat Mediratta
28b41056e3 Restructure things so that the application is now just another module.
Kohana makes this type of transition fairly straightforward in that
all controllers/helpers/etc are still located in the cascading
filesystem without any extra effort, except that I've temporarily
added a hack to force modules/gallery into the module path.

Rename what's left of "core" to be "application" so that it conforms
more closely to the Kohana standard (basically, just
application/config/config.php which is the minimal thing that you need
in the application directory)

There's still considerable work left to be done here.
2009-05-27 15:07:27 -07:00