[Rt-commit] r9560 - in rt/branches/3.6-RELEASE: html/NoAuth/css sbin
ruz at bestpractical.com
ruz at bestpractical.com
Tue Nov 6 05:03:37 EST 2007
Author: ruz
Date: Tue Nov 6 05:03:32 2007
New Revision: 9560
Added:
rt/branches/3.6-RELEASE/html/NoAuth/css/dhandler
Modified:
rt/branches/3.6-RELEASE/html/Elements/Header
rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in
Log:
* squish our CSS into one big thing use CSS::Squish and dhandler
Modified: rt/branches/3.6-RELEASE/html/Elements/Header
==============================================================================
--- rt/branches/3.6-RELEASE/html/Elements/Header (original)
+++ rt/branches/3.6-RELEASE/html/Elements/Header Tue Nov 6 05:03:32 2007
@@ -58,7 +58,7 @@
% }
<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" />
-<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/<% $RT::WebDefaultStylesheet %>/main.css" type="text/css" media="all" />
+<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/<% $RT::WebDefaultStylesheet %>/main-squished.css" type="text/css" media="all" />
<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/print.css" type="text/css" media="print" />
% if ( $RSSAutoDiscovery ) {
Added: rt/branches/3.6-RELEASE/html/NoAuth/css/dhandler
==============================================================================
--- (empty file)
+++ rt/branches/3.6-RELEASE/html/NoAuth/css/dhandler Tue Nov 6 05:03:32 2007
@@ -0,0 +1,30 @@
+<%ONCE>
+my $squisher;
+</%ONCE>
+<%INIT>
+my $arg = $m->dhandler_arg;
+my $path;
+if ( $arg =~ m{^(.*)-squished(\.[^\.]+)$} ) {
+ $path = $m->current_comp->dir_path .'/'. $1 . $2;
+}
+else {
+ return $m->decline;
+}
+
+$squisher = new RT::CSS::Squish unless $squisher;
+$squisher->{'mason'} = $m;
+
+$m->out( $squisher->concatenate( $path ) );
+
+package RT::CSS::Squish;
+use CSS::Squish '0.06';
+use base qw(CSS::Squish);
+sub file_handle {
+ my $self = shift;
+ my $file = shift;
+ my $content = $self->{'mason'}->scomp($file);
+ open my $fh, '<', \$content or die "$!";
+ return $fh;
+}
+
+</%INIT>
Modified: rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in (original)
+++ rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in Tue Nov 6 05:03:32 2007
@@ -214,6 +214,7 @@
GD::Graph
GD::Text
Text::WikiFormat 0.76
+CSS::Squish 0.06
.
$deps{'STANDALONE'} = [ text_to_hash( << '.') ];
More information about the Rt-commit
mailing list