[Rt-commit] rt branch, 4.0/no-ckeditor-on-login, created. rt-4.0.1-264-g3431943

Alex Vandiver alexmv at bestpractical.com
Fri Aug 5 15:18:48 EDT 2011


The branch, 4.0/no-ckeditor-on-login has been created
        at  343194316de10a9e9cf569d5f9339b8178f7582b (commit)

- Log -----------------------------------------------------------------
commit 343194316de10a9e9cf569d5f9339b8178f7582b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Aug 5 14:58:48 2011 -0400

    Save on data trasferred on the login page
    
    Sending the rich text editor javascript is an extra ~330k of javascript,
    which is unnecessary on the front page, and waiting for it to transfer
    leads to perceptions of slowness.  Additionally, since we currently
    serve the full login page to mobile devices, this saves a significant
    amount of data sent to mobile devices.

diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index 1097973..ec9dfc9 100755
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -76,7 +76,7 @@
 % }
 
 % if ($JavaScript) {
-<& HeaderJavascript, focus => $Focus, onload => $onload &>
+<& HeaderJavascript, focus => $Focus, onload => $onload, RichText => $RichText &>
 % }
 
 % my $stylesheet_plugin = "/NoAuth/css/". RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} )."/InHeader";
@@ -148,4 +148,5 @@ $onload => undef
 $LinkRel => undef
 $JavaScript => 1
 $SkipDoctype => 0
+$RichText => 1
 </%ARGS>
diff --git a/share/html/Elements/HeaderJavascript b/share/html/Elements/HeaderJavascript
index 135bd05..2abe5a6 100644
--- a/share/html/Elements/HeaderJavascript
+++ b/share/html/Elements/HeaderJavascript
@@ -54,7 +54,7 @@ $onload => undef
 <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/<% $jsfile %>"></script>
 % }
 
-% if ( RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'}) ) {
+% if ( $RichText and RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'}) ) {
 <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/RichText/ckeditor.js"></script>
 % }
 <script type="text/javascript"><!--
@@ -66,11 +66,13 @@ $onload => undef
     jQuery( <% $onload |n %> );
 % }
 
-% if ( RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'})) {
+% if ( $RichText and RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'})) {
     jQuery().ready(function ()  { ReplaceAllTextareas('<%$m->request_args->{'CKeditorEncoded'} || 0 %>') });
 % }
 --></script>
-
+<%ARGS>
+$RichText => 1
+</%ARGS>
 <%INIT>
 
 my @js_files;
diff --git a/share/html/Elements/Login b/share/html/Elements/Login
index 8fef574..bc11bd4 100755
--- a/share/html/Elements/Login
+++ b/share/html/Elements/Login
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 % $m->callback( %ARGS, CallbackName => 'Header' );
-<& /Elements/Header, Title => loc('Login'), Focus => 'user' &>
+<& /Elements/Header, Title => loc('Login'), Focus => 'user', RichText => 0 &>
 
 <div id="body" class="login-body">
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list