removed last filter
This commit is contained in:
parent
3938f9ff0d
commit
bf15e714d0
1 changed files with 27 additions and 24 deletions
|
|
@ -130,7 +130,6 @@ use WebGUI::Definition::Asset (
|
||||||
fieldType =>'codearea',
|
fieldType =>'codearea',
|
||||||
defaultValue =>undef,
|
defaultValue =>undef,
|
||||||
customDrawMethod=> 'drawExtraHeadTags',
|
customDrawMethod=> 'drawExtraHeadTags',
|
||||||
filter => 'packExtraHeadTags',
|
|
||||||
},
|
},
|
||||||
extraHeadTagsPacked => {
|
extraHeadTagsPacked => {
|
||||||
fieldType => 'hidden',
|
fieldType => 'hidden',
|
||||||
|
|
@ -490,6 +489,33 @@ sub DESTROY {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 extraHeadTags ( value )
|
||||||
|
|
||||||
|
Returns extraHeadTags
|
||||||
|
|
||||||
|
=head3 value
|
||||||
|
|
||||||
|
If specified, stores it, but also updates extraHeadTagsPacked with the packed version.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub extraHeadTags {
|
||||||
|
my ( $self, $unpacked ) = @_;
|
||||||
|
if (scalar(@_) > 1) {
|
||||||
|
my $packed = $unpacked;
|
||||||
|
HTML::Packer::minify( \$packed, {
|
||||||
|
remove_comments => 1,
|
||||||
|
remove_newlines => 1,
|
||||||
|
do_javascript => "shrink",
|
||||||
|
do_stylesheet => "minify",
|
||||||
|
} );
|
||||||
|
$self->extraHeadTagsPacked($packed);
|
||||||
|
}
|
||||||
|
return $self->next::method($unpacked);
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 fixUrl ( [value] )
|
=head2 fixUrl ( [value] )
|
||||||
|
|
@ -1860,29 +1886,6 @@ OUTPUT
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 packExtraHeadTags ( unpacked )
|
|
||||||
|
|
||||||
Pack the extra head tags. Return the unpacked head tags (as per
|
|
||||||
filter guidelines).
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
sub packExtraHeadTags {
|
|
||||||
my ( $self, $unpacked ) = @_;
|
|
||||||
return $unpacked if !$unpacked;
|
|
||||||
my $packed = $unpacked;
|
|
||||||
HTML::Packer::minify( \$packed, {
|
|
||||||
remove_comments => 1,
|
|
||||||
remove_newlines => 1,
|
|
||||||
do_javascript => "shrink",
|
|
||||||
do_stylesheet => "minify",
|
|
||||||
} );
|
|
||||||
$self->update({ extraHeadTagsPacked => $packed });
|
|
||||||
return $unpacked;
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
|
|
||||||
=head2 prepareView ( )
|
=head2 prepareView ( )
|
||||||
|
|
||||||
Executes what is necessary to make the view() method work with content chunking.
|
Executes what is necessary to make the view() method work with content chunking.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue