Commit Graph

23 Commits

Author SHA1 Message Date
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
ee9c921397 Don't use realpath when calculating the relative paths of embedded references in css files. This fixes ticket #910 2009-11-21 09:36:12 -08:00
Tim Almdal
b2a9bf43af Change gallery::find_file to not assume that the absolute path is relative to the document root. Instead ignore all th path parts until one of application, modules, themes, or libs is found. Fixes ticket #827 2009-10-01 12:44:18 -07:00
Bharat Mediratta
a0a62a0992 Do a pass on the gallery::find_file and Gallery_View::{script,css} PHPdoc. 2009-09-28 19:30:34 -07:00
Tim Almdal
28624bb8f1 Update the PHPDoc for gallery::find_file and convert Gallery_View::script/css to use gallery::find_file 2009-09-28 09:04:44 -07: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
Bharat Mediratta
d692002bcf Don't show the combined CSS/JS elements if we didn't combine anything.
Fixes ticket #554.
2009-07-17 18:24:31 -07:00
Bharat Mediratta
6200955003 Don't bother making gzencoded version of combined CSS/JS if zlib.output_compression=On 2009-07-17 18:19:43 -07:00
Kevin Nehls
85b0f58029 move fix for backslashes on windows outside of loop per bharat's suggestion
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-07-16 21:36:51 +08:00
Kevin Nehls
5cb2f42628 Fix backslashes in relative URLs of combined css files.
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-07-16 21:36:50 +08:00
Bharat Mediratta
a674170bf7 2 fixes:
1) Include the url in the cache key so that if the Gallery moves, we
   don't use old cached entries.

2) Use the relative path to files in the comments that we embed in our
   files so that we don't leak local paths.
2009-07-01 22:55:43 -07:00
Tim Almdal
6e80330e19 Remove the testing code to force rebuilding the cache. 2009-06-29 21:16:42 -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
325203e1ca Add a media type using the most common media type from our CSS. This
doesn't fix the problem that we need to support multiple media types
(the original code had superfish using just "screen", and some other
deviations).

There's no code yet to support multiple media types, but it would not
be too difficult to create buckets based on media.
2009-06-29 18:27:29 -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
86596f9595 Merge branch 'master' of git@github.com:gallery/gallery3 2009-06-29 15:04:15 -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
16d4922e3a Remove unused $theme_relative arg from theme_script(). 2009-06-29 09:07:29 -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