[Rt-commit] rt branch, 4.2/frontend-peformance-tweaks, repushed
Wallace Reis
wreis at bestpractical.com
Fri Mar 28 09:49:00 EDT 2014
The branch 4.2/frontend-peformance-tweaks was deleted and repushed:
was 27fcdec6bc1ca8b2c698e8b71e377c570874e39e
now fb6227a3814ee49992a6c0b9d12cb1100d8e9ca2
1: 3e8abba = 1: 3e8abba Optimize some images
2: 27fcdec ! 2: fb6227a Optimize the ordering of resources
@@ -6,34 +6,6 @@
of downloads and speeds up browser rendering time.
https://developers.google.com/speed/docs/best-practices/rtt#PutStylesBeforeScripts
-
-diff --git a/share/html/Elements/Footer b/share/html/Elements/Footer
---- a/share/html/Elements/Footer
-+++ b/share/html/Elements/Footer
-@@
- <%$d->Dump() %>
- </pre>
- % }
-- </body>
-+
-+<& /Elements/Framekiller &>
-+
-+% if ($m->comp_exists($stylesheet_plugin) ) {
-+<& $stylesheet_plugin &>
-+% }
-+
-+</body>
- </html>
- <%ARGS>
- $Debug => 0
- $Menu => 1
- </%ARGS>
-+<%init>
-+my $style = $session{'CurrentUser'}
-+ ? $session{'CurrentUser'}->Stylesheet
-+ : RT->Config->Get('WebDefaultStylesheet');
-+my $stylesheet_plugin = "/NoAuth/css/".$style."/AfterMenus";
-+</%init>
diff --git a/share/html/Elements/Header b/share/html/Elements/Header
--- a/share/html/Elements/Header
@@ -55,11 +27,13 @@
% for my $cssfile ( @css_files ) {
<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%><% $cssfile %>" type="text/css" media="all" />
% }
+@@
+ % for (keys %{$LinkRel || {}}) {
+ <link rel="<% $_ %>" href="<% RT->Config->Get('WebPath') . $LinkRel->{$_} %>" />
+ % }
+<link rel="shortcut icon" href="<%RT->Config->Get('WebImagesURL')%>favicon.png" type="image/png" />
- % for (keys %{$LinkRel || {}}) {
- <link rel="<% $_ %>" href="<% RT->Config->Get('WebPath') . $LinkRel->{$_} %>" />
-@@
+ % if ( $RSSAutoDiscovery ) {
<link rel="alternate" href="<%$RSSAutoDiscovery%>" type="application/rss+xml" title="RSS RT Search" />
% }
@@ -73,6 +47,8 @@
% $m->callback( %ARGS, CallbackName => 'Head', ARGSRef => \%ARGS );
+<& HeaderJavascript, focus => $Focus, onload => $onload, RichText => $RichText &>
++
++<& /Elements/Framekiller &>
+
</head>
<body class="<% lc $style %><% RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'}) ? ' sidebyside' : '' %>" <% $id && qq[id="comp-$id"] |n %>>
@@ -90,42 +66,6 @@
% for my $jsfile ( @js_files ) {
<script type="text/javascript" src="<%RT->Config->Get('WebPath')%><% $jsfile %>"></script>
-diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
---- a/share/html/Elements/PageLayout
-+++ b/share/html/Elements/PageLayout
-@@
- % }
- <div id="topactions"><& /Elements/WidgetBar, menu => PageWidgets() &></div>
-
--% if ($m->comp_exists($stylesheet_plugin) ) {
--<& $stylesheet_plugin &>
--% }
--
- <div id="body">
- % $m->callback( %ARGS, CallbackName => 'BeforeBody' );
- % $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
-@@
- $title => $m->callers(-1)->path
- $show_menu => 1
- </%ARGS>
--<%init>
--my $style = $session{'CurrentUser'}
-- ? $session{'CurrentUser'}->Stylesheet
-- : RT->Config->Get('WebDefaultStylesheet');
--my $stylesheet_plugin = "/NoAuth/css/".$style."/AfterMenus";
--</%init>
-
-diff --git a/share/html/m/_elements/footer b/share/html/m/_elements/footer
---- a/share/html/m/_elements/footer
-+++ b/share/html/m/_elements/footer
-@@
- <&|/l_unsafe, '', '', '2014', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
- </div>
- </div>
-+<& /Elements/Framekiller &>
- </body>
- </html>
-
diff --git a/share/html/m/_elements/header b/share/html/m/_elements/header
--- a/share/html/m/_elements/header
+++ b/share/html/m/_elements/header
@@ -137,3 +77,9 @@
<link rel="stylesheet" type="text/css" href="<%RT->Config->Get('WebPath')%>/static/css/mobile.css"/>
<title><%$title%></title>
% my ($jquery) = grep { /^jquery-\d+\./ } RT::Interface::Web->JSFiles;
+ <script src="<% RT->Config->Get('WebPath') %>/static/js/<% $jquery %>"></script>
+ <meta name="viewport" content="width=device-width height=device-height user-scalable=yes"/>
++<& /Elements/Framekiller &>
+ </head>
+ <body>
+ % if ($show_home_button) {
More information about the rt-commit
mailing list