[Rt-commit] r13552 - in rt/3.8/trunk: . sbin share/html/Elements

sartak at bestpractical.com sartak at bestpractical.com
Mon Jun 23 19:29:53 EDT 2008


Author: sartak
Date: Mon Jun 23 19:29:52 2008
New Revision: 13552

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/sbin/rt-email-dashboards.in
   rt/3.8/trunk/share/html/Dashboards/Render.html
   rt/3.8/trunk/share/html/Elements/Header

Log:
 r63092 at onn:  sartak | 2008-06-23 19:28:33 -0400
 Add a way to turn off JavaScript in the Header
 Have email dashboards turn off javascript, tabs, etc


Modified: rt/3.8/trunk/sbin/rt-email-dashboards.in
==============================================================================
--- rt/3.8/trunk/sbin/rt-email-dashboards.in	(original)
+++ rt/3.8/trunk/sbin/rt-email-dashboards.in	Mon Jun 23 19:29:52 2008
@@ -215,7 +215,8 @@
     $HTML::Mason::Commands::session{CurrentUser} = $currentuser;
     my $contents = run_component(
         '/Dashboards/Render.html',
-        id => $dashboard->Id,
+        id      => $dashboard->Id,
+        Preview => 0,
     );
 
     for (@{ RT->Config->Get('EmailDashboardRemove') || [] }) {

Modified: rt/3.8/trunk/share/html/Dashboards/Render.html
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/Render.html	(original)
+++ rt/3.8/trunk/share/html/Dashboards/Render.html	Mon Jun 23 19:29:52 2008
@@ -45,11 +45,14 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, title => $title &>
+<& /Elements/Header, title => $title, JavaScript => $Preview, ShowBar => $Preview  &>
+
+% if ($Preview) {
 <& /Dashboards/Elements/Tabs,
     current_subtab => $current_subtab,
     Title => $title,
     DashboardObj => $DashboardObj &>
+% }
 
 <table border="0" width="100%">
 <tr valign="top">
@@ -91,5 +94,6 @@
 </%INIT>
 <%ARGS>
 $id => undef
+$Preview => 1
 </%ARGS>
 

Modified: rt/3.8/trunk/share/html/Elements/Header
==============================================================================
--- rt/3.8/trunk/share/html/Elements/Header	(original)
+++ rt/3.8/trunk/share/html/Elements/Header	Mon Jun 23 19:29:52 2008
@@ -69,7 +69,10 @@
     <link rel="alternate" href="<%$RSSAutoDiscovery%>" type="application/rss+xml" title="RSS RT Search" />
 % }
 
+% if ($JavaScript) {
 <& HeaderJavascript, focus => $Focus, onload => $onload &>
+% }
+
 % my $stylesheet_plugin = "/NoAuth/css/". RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} )."/InHeader";
 % if ($m->comp_exists($stylesheet_plugin) ) {
 <& $stylesheet_plugin &>
@@ -127,4 +130,5 @@
 $RSSAutoDiscovery => undef
 $onload => undef
 $LinkRel => undef
+$JavaScript => 1
 </%ARGS>


More information about the Rt-commit mailing list