fix RT 4.2.11 merge, RT#13852
[freeside.git] / rt / share / html / Elements / Header
index 6c0f425..3aeb319 100755 (executable)
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /elements/header.html, {
-              'title' => $Title,
-              'head'  => $head,
-              'etc'   => $etc,
+              'title'     => $Title,
+              'head'      => $head,
+              'etc'       => $etc,
               #make space for RT menu for now# 'nobr'  => 1,
-              'nocss' => 1,
+              'nocss'     => 1,
+              'no_jquery' => $JavaScript,
           }
 &>
 <%INIT>
@@ -105,6 +106,7 @@ if ( $JavaScript ) {
 
 for my $cssfile ( @css_files ) {
   $head .= qq(<link rel="stylesheet" href="$WebPath$cssfile" type="text/css" media="all" />\n);
+}
 
 for (keys %{$LinkRel || {}}) {
   $head .= qq(<link rel="$_" href="$WebPath) . $LinkRel->{$_} . '" />';
@@ -115,18 +117,18 @@ if ( $RSSAutoDiscovery ) {
     $head .= qq(<link rel="alternate" href="$RSSAutoDiscovery" type="application/rss+xml" title="RSS RT Search" />);
 }
 
-my $stylesheet_plugin = "/NoAuth/css/$style/InHeader";
-if ($m->comp_exists($stylesheet_plugin) ) {
-    $head .= $m->scomp($stylesheet_plugin);
+if ($JavaScript) {
+    $head .= $m->scomp('HeaderJavascript', focus => $Focus, onload => $onload, RichText => $RichText );
+
+    my $stylesheet_plugin = "/NoAuth/css/$style/InHeader";
+    if ($m->comp_exists($stylesheet_plugin) ) {
+        $head .= $m->scomp($stylesheet_plugin);
+    }
 }
 
 # $m->callback( %ARGS, CallbackName => 'Head' );
 $head .= $m->scomp( '/Elements/Callback', _CallbackName => 'Head', %ARGS );
 
-if ($JavaScript) {
-    $head .= $m->scomp('HeaderJavascript', focus => $Focus, onload => $onload, RichText => $RichText );
-}
-
 #XXX $head .= <& /Elements/Framekiller &>;
 
 my $etc = ' class="'. join( '',@{$ARGS{'BodyClass'}}). '" ';
@@ -147,4 +149,5 @@ $LinkRel => undef
 $SkipDoctype => 0
 $RichText => 1
 $BodyClass => undef
+$JavaScript => 1
 </%ARGS>