37 Commits

Author SHA1 Message Date
shadlaws
c137740e26 #2050 - Update Admin_View to handle events like Theme_View.
- changed Admin_View event handling to reflect that of Theme_View
(gallery_theme gets called first, admin theme gets called last,
debug mode isn't called for body_attributes and gets g-clear-fix)
2013-03-11 11:40:15 +01:00
shadlaws
9b9f1a7b07 #2031 - Add class_exists() before method_exists() if class existence is unknown.
- fixed all instances of this in core code
- deleted previous Zend Guard Loader workaround in MY_Kohana.php
- updated Bootstrap.php to reflect deleted MY_Kohana.php
2013-03-02 13:25:10 +01:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
34ac1a466d Verify that theme names are well formed. Fixes #1856. 2012-05-11 15:12:30 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
08c41f2976 Add "html_attributes" theme callback to allow modules to inject attributes into
the <html> element, including things like namespaces.   Fixes #1615.
2011-01-21 00:07:00 -08:00
Bharat Mediratta
5ac49d497f Create new APIs for allowing themers to control what CSS/JS get
combined and when.  Backwards compatible in that old themes will work,
but their CSS/JS will no longer be combined unless they make some
changes.  Fixes #1600.
2011-01-10 22:20:12 -08:00
Joe7
f364e8a96b Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569 2011-01-03 11:38:21 -08:00
Bharat Mediratta
a8b0254e4a Improve the solution for #1545 by sorting the settings menu properly
to be naturally ordered and case insensitive.
2010-12-29 17:31:28 -08:00
Bharat Mediratta
dbb9b8b1c8 Sort the Admin > Settings menu instead of relying on module activation order.
Requires making Menu::get() return a reference.  Fixes #1545.
2010-12-17 22:19:46 -08:00
Bharat Mediratta
b6c202d572 Swap the order of the CSS and JS for performance. Fixes #1540. 2010-12-16 22:18:04 -08:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Andy Staudacher
a19b97f8d6 First step towards fixing ticket #1038: Allowing for custom page <title> in admin pages, just like in non-admin pages.
TODO: Set $view->page_title in the many admin controllers we have. I just set it for admin_maintenance.php to show how it's intended to be used. I copied the title from views/admin_maintenance.html.php to the controller.
2010-02-28 13:35:58 -08:00
Tim Almdal
abdeb21ccb Add a user_menu method to the Admin_View and then use this method to get the
user menu.  Since the information displayed is identical in both admin and
theme views, it makes sense to combine the generation to it is done in a common
location.
2010-01-23 13:29:49 -08:00
Bharat Mediratta
22149b52c3 Move the theme fallback checking into theme::load_themes() so that
we're calling it once per request.
2009-11-27 17:12:13 -08:00
Bharat Mediratta
13faf6035d Remove Menu::compact() in favor of putting an if-then clause in
menu.html.php.  This serves two purposes:

1) It's more efficient since we're doing less passes over the Menu tree
2) We're allowing themers to decide whether or not to show empty menus
2009-10-27 14:00:32 -07:00
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
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
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
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
b579db5173 Oops, "head" => "admin_head" to make the admin dashboard work. 2009-06-29 20:08:35 -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
34c76c0906 A Combined javascript seems to work.
1) CSS files are added to the combined version by use of $theme->css() or $theme->css_theme() methods
2) url references in the css are converted to full paths as opposed to relative
3) @import statements in the css are resolved as well.
4) need to move the [if IE] statements into the css files so the will be honored in the browser. currently the ie fix css are always included.
2009-06-29 12:32:11 -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
a6a9b256ae Correct the "inappropriate intimacy" smell that bharat's refined senses pick up 2009-06-17 13:34:18 -07:00
Tim Almdal
5b767b6443 Fix for ticket #366
Move the creation of the setting menu back to gallery_menu::admin, now that
there is a mechanism to remove empty menu items
2009-06-17 06:42:31 -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