Commit Graph

6 Commits

Author SHA1 Message Date
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
Bharat Mediratta
3080317d6e Refactor combined controller a bit
1) Create public javascript() and css() functions and turn __call()
   into a private function to protect us against having some random
   type show up in there.  Otherwise anything you put in the 2nd
   argument gets emitted in the header which is a security hole.

2) Fix a bug ("$key = $key[0]") which was breaking functionality.
   Eliminate the hex check, it's not really necessary in the majority
   case and doesn't hurt us in edge cases.

3) Convert some empty() calls to !, no need for a function call there.

4) Add phpDoc.
2009-06-29 17:44:02 -07:00
Tim Almdal
006b63030a Combine the Combined::javascript and Combined::css into a single method implemented
by the magic method __call. The first parameter is the content type for text/xxxx
and the 2nd parameter is the key of the combined file.
2009-06-29 15:38:55 -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
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
d90e30c378 Rename the combined javascript controller from javascript/combined to combined/javascript. 2009-06-28 17:07:12 -07:00