Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The trigger is using "utf8-head" and String format but it should use "head" and DOM.
# Trigger to load the Google Charts library from the template(s) $c->add_trigger( EP_TRIGGER_DYNAMIC_TEMPLATE , sub { my( %args ) = @_; my( $repo, $pins ) = @args{qw/ repository pins/}; my $protocol = $repo->get_secure ? 'https':'http'; if( !exists $pins->{head} ) { $pins->{head} = $repo->make_doc_fragment; } $pins->{head}->appendChild( $repo->make_javascript( < <script type="text/javascript" src="$protocol://www.google.com/jsapi">// </script> <script type="text/javascript">google.load("visualization", "1", {packages:["corechart", "geochart"]});</script> GCHARTS return EP_TRIGGER_OK; } );
GCHARTS
return EP_TRIGGER_OK;
} );
The text was updated successfully, but these errors were encountered:
In fact:
$c->add_trigger( EP_TRIGGER_DYNAMIC_TEMPLATE , sub { my( %args ) = @_; my( $repo, $pins ) = @args{qw/ repository pins/}; my $protocol = $repo->get_secure ? 'https':'http'; if( !exists $pins->{head} ) { $pins->{head} = $repo->make_doc_fragment; } $pins->{head}->appendChild( $repo->make_javascript( undef, src => "$protocol://www.google.com/jsapi" ) ); $pins->{head}->appendChild( $repo->make_javascript( 'google.load("visualization", "1", {packages:["corechart", "geochart"]});' ) ); return EP_TRIGGER_OK; } );
Sorry, something went wrong.
3c68e74
sebastfr
Successfully merging a pull request may close this issue.
The trigger is using "utf8-head" and String format but it should use "head" and DOM.
# Trigger to load the Google Charts library from the template(s) $c->add_trigger( EP_TRIGGER_DYNAMIC_TEMPLATE , sub { my( %args ) = @_; my( $repo, $pins ) = @args{qw/ repository pins/}; my $protocol = $repo->get_secure ? 'https':'http'; if( !exists $pins->{head} ) { $pins->{head} = $repo->make_doc_fragment; } $pins->{head}->appendChild( $repo->make_javascript( < <script type="text/javascript" src="$protocol://www.google.com/jsapi">// </script> <script type="text/javascript">google.load("visualization", "1", {packages:["corechart", "geochart"]});</script>
GCHARTS
} );
The text was updated successfully, but these errors were encountered: