view release on metacpan or search on metacpan
t/TestApp/lib/TestApp/Model/Thingy.pm
t/TestApp/lib/TestApp/Model/User.pm
t/TestApp/lib/TestApp/Upgrade.pm
t/TestApp/lib/TestApp/View.pm
t/TestApp/lib/TestApp/View/base.pm
t/TestApp/lib/TestApp/View/instance.pm
t/TestApp/share/web/static/images/pony.jpg
t/TestApp/share/web/templates/_elements/wrapper
t/TestApp/share/web/templates/call-region-with-error
t/TestApp/share/web/templates/concrete.html
t/TestApp/share/web/templates/content-type-bug
t/TestApp/share/web/templates/currentuser
t/TestApp/share/web/templates/dispatch/basic
t/TestApp/share/web/templates/dispatch/basic-show
t/TestApp/share/web/templates/dispatch/protocol
t/TestApp/share/web/templates/dosomethingelse
t/TestApp/share/web/templates/editform
t/TestApp/share/web/templates/index.html
t/TestApp/share/web/templates/manual_redirect
t/TestApp/share/web/templates/path_test/foo/index.html
t/TestApp/share/web/templates/path_test/in_both
SHA1 60e2eed33da6b06ea32506cc17229f8ed3c4d482 t/TestApp/lib/TestApp/Model/Thingy.pm
SHA1 0ca25037b8d32ef860ac615a98bb51682b87706a t/TestApp/lib/TestApp/Model/User.pm
SHA1 b2d3474949dae7c171157e8697dbb208ef3805f8 t/TestApp/lib/TestApp/Upgrade.pm
SHA1 0e7b4b8ea53e18902b20c9d2e1db93df06b5ed0e t/TestApp/lib/TestApp/View.pm
SHA1 9abcf13b1dfa0cdfb8e2a1fa54f76a1ea2b9602d t/TestApp/lib/TestApp/View/base.pm
SHA1 e376d22f0db953b5c9ede1e4e07660fe94390bf5 t/TestApp/lib/TestApp/View/instance.pm
SHA1 67f41db40d62b81d71cb60c542695e0d7e6d393d t/TestApp/share/web/static/images/pony.jpg
SHA1 970120b3562495651809fa7f9bd2c09336d5aee9 t/TestApp/share/web/templates/_elements/wrapper
SHA1 d407b22cd1699169211d46d993eef9e0d1921f06 t/TestApp/share/web/templates/call-region-with-error
SHA1 5a47fc9c85527214f6eaf2c8f8dd84bfb80fef61 t/TestApp/share/web/templates/concrete.html
SHA1 9cea9df8bd6b4644b100259b9290f5e52f874d0d t/TestApp/share/web/templates/content-type-bug
SHA1 1e4b29a138e61f49c1ceffe50c15ed0a087613fc t/TestApp/share/web/templates/currentuser
SHA1 a2e7bf8d2d52bbaf360af24b4ffc00c68d7e31f2 t/TestApp/share/web/templates/dispatch/basic
SHA1 d1e244371109ce216bfd6b9ac03374737461577c t/TestApp/share/web/templates/dispatch/basic-show
SHA1 fb9265ecb04b222ba615e53d0d316ab3e88aab8e t/TestApp/share/web/templates/dispatch/protocol
SHA1 44795ddb863c9c32c05678bf8288c9816e3366a9 t/TestApp/share/web/templates/dosomethingelse
SHA1 f5870c2fb3222b86d97f14bdf8155821c887987b t/TestApp/share/web/templates/editform
SHA1 9cea9df8bd6b4644b100259b9290f5e52f874d0d t/TestApp/share/web/templates/index.html
SHA1 2f721db97a3b571d0006f6ed9a0d0c8bffef8642 t/TestApp/share/web/templates/manual_redirect
SHA1 70e9bbbe8ad7df2db3352073ec840a93c4d6d6fb t/TestApp/share/web/templates/path_test/foo/index.html
SHA1 4e9416993c5e56de1f9688061648ec6a164b1734 t/TestApp/share/web/templates/path_test/in_both
lib/Jifty/I18N.pm view on Meta::CPAN
}
}
=head2 promote_encoding STRING [CONTENT-TYPE]
Return STRING promoted to our best-guess of an appropriate
encoding. STRING should B<not> have the UTF-8 flag set when passed in.
Optionally, you can pass a MIME content-type string as a second
argument. If it contains a charset= parameter, we will use that
encoding. Failing that, we use Encode::Guess to guess between UTF-8
and iso-latin-1. If that fails, and the string validates as UTF-8, we
assume that. Finally, we fall back on returning the string as is.
=cut
# XXX TODO This possibly needs to be more clever and/or configurable
sub promote_encoding {
lib/Jifty/Plugin/SkeletonApp/View.pm view on Meta::CPAN
template '__jifty/empty' => sub :Static {
'';
};
private template 'header' => sub {
my ($title) = get_current_attr(qw(title));
Jifty->web->response->content_type('text/html; charset=utf-8');
head {
with(
'http-equiv' => "content-type",
content => "text/html; charset=utf-8"
),
meta {};
with( name => 'robots', content => 'all' ), meta {};
title { _($title) };
Jifty->web->include_css;
Jifty->web->include_javascript;
};
};
lib/Jifty/Plugin/ViewDeclarePage/Page.pm view on Meta::CPAN
=cut
sub render_header {
my $self = shift;
$self->render_doctype;
head {
Jifty->web->response->content_type('text/html; charset=utf-8');
with(
'http-equiv' => "content-type",
content => "text/html; charset=utf-8"
), meta {};
$self->render_title_inhead( $self->_title );
$self->render_links_inhead( @{ $self->_links || [] } );
Jifty->web->include_css;
Jifty->web->include_javascript;
};
return '';
};
lib/Jifty/View.pm view on Meta::CPAN
L<Jifty::Request>).
=cut
sub auto_send_headers {
return not Jifty->web->request->is_subrequest;
}
=head2 out_method
The default output method. Sets the content-type to C<text/html;
charset=utf-8> unless a content type has already been set, and then
sends a header if need be.
=cut
sub out_method {
my $r = Jifty->web->response;
# Send a header
$r->content_type || $r->content_type('text/html; charset=utf-8'); # Set up a default
lib/Jifty/View/Declare/CoreTemplates.pm view on Meta::CPAN
=cut
=for later
These templates are still in Masonland. we're doing something wrong with escaping in them
template '__jifty/autocomplete.xml' => sub {
# Note: the only point to this file is to set the content_type; the actual
# behavior is accomplished inside the framework. It will go away once we
# have infrastructure for serving things of various content-types.
Jifty->web->response->content_type('text/xml; charset=utf-8');
my $ref = Jifty->web->response->result('autocomplete')->content;
my @options = @{ $ref->{'completions'} || [] };
body {
ul {
foreach my $item (@options) {
if ( !ref($item) ) {
li { $item };
}
elsif ( exists $item->{label} ) {
share/web/static/js/jquery-1.4.1.js view on Meta::CPAN
if ( etag ) {
jQuery.etag[url] = etag;
}
// Opera returns 0 when status is 304
return xhr.status === 304 || xhr.status === 0;
},
httpData: function( xhr, type, s ) {
var ct = xhr.getResponseHeader("content-type") || "",
xml = type === "xml" || !type && ct.indexOf("xml") >= 0,
data = xml ? xhr.responseXML : xhr.responseText;
if ( xml && data.documentElement.nodeName === "parsererror" ) {
jQuery.error( "parsererror" );
}
// Allow a pre-filtering function to sanitize the response
// s is checked to keep backwards compatibility
if ( s && s.dataFilter ) {
share/web/templates/__jifty/autocomplete.xml view on Meta::CPAN
<%init>
# Note: the only point to this file is to set the content_type; the actual
# behavior is accomplished inside the framework. It will go away once we
# have infrastructure for serving things of various content-types.
Jifty->web->response->content_type('text/xml; charset=UTF-8');
unless (Jifty->web->response->result('autocomplete')) {
print "<body />";
return;
}
my $ref = Jifty->web->response->result('autocomplete')->content;
my @options = @{$ref->{'completions'}||[]};
</%init>
<body>
<ul>
share/web/templates/_elements/header view on Meta::CPAN
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="all" />
<title><% _($title) %></title>
<% Jifty->web->include_css %>
<% Jifty->web->include_javascript %>
</head>
<%args>
$title => ""
</%args>
t/TestApp/lib/TestApp/Dispatcher.pm view on Meta::CPAN
on HTTP '/dispatch/protocol' => run {
set content => 'NOT HTTPS';
};
on '/dispatch/protocol' => run {
set footer => 'normal';
};
before '/content-type-bug' => run {
Jifty->web->navigation->child( test1 => label => '<i>Italic</i>', escape_label => 0);
my $content = Jifty->web->render_template('/sample-widget');
Jifty->web->navigation->child( test2 => label => $content, escape_label => 0);
};
before '/someplace' => run {
my $result = Jifty::Result->new;
t/TestApp/t/css_content_type.t view on Meta::CPAN
use warnings;
use strict;
use Jifty::Test::Dist tests => 6;
use Jifty::Test::WWW::Mechanize;
my $server = Jifty::Test->make_server;
my $url = $server->started_ok;
my $mech = Jifty::Test::WWW::Mechanize->new;
$mech->get_ok( $url."/content-type-bug", 'grab a page' );
my $css_page = '';
if ( $mech->content =~ qr{type="text/css" href="(.*?)"} ) {
$css_page = $1;
}
$mech->content_like(qr'<form id="inmenu"');
ok($css_page, "Got a link to the CSS page");