[Rt-commit] rt branch, 4.0/delay-transaction-loading, updated. rt-4.0.2-27-gbf7e1b0
Thomas Sibley
trs at bestpractical.com
Tue Nov 29 12:07:09 EST 2011
The branch, 4.0/delay-transaction-loading has been updated
via bf7e1b018e7206c10bfd8b18549ca56b1baeff31 (commit)
from 180e96694c626cf721e2fc01b33a7f8ca3919750 (commit)
Summary of changes:
share/html/Ticket/Display.html | 2 ++
share/html/Ticket/Elements/ClickToShowHistory | 12 +++++++++---
share/html/Ticket/Elements/DelayShowHistory | 15 ++++++++++++---
3 files changed, 23 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit bf7e1b018e7206c10bfd8b18549ca56b1baeff31
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Nov 29 12:05:56 2011 -0500
Respect the full/brief header view when deferring and delaying history
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index 8962905..12c24e8 100755
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -68,10 +68,12 @@
% if (RT->Config->Get( 'DelayTransactionLoading', $session{'CurrentUser'} )) {
<& /Ticket/Elements/DelayShowHistory,
Ticket => $TicketObj,
+ ShowHeaders => $ARGS{'ShowHeaders'},
&>
% } elsif (RT->Config->Get( 'DeferTransactionLoading', $session{'CurrentUser'} )) {
<& /Ticket/Elements/ClickToShowHistory,
Ticket => $TicketObj,
+ ShowHeaders => $ARGS{'ShowHeaders'},
&>
% } else {
<& /Ticket/Elements/ShowHistory ,
diff --git a/share/html/Ticket/Elements/ClickToShowHistory b/share/html/Ticket/Elements/ClickToShowHistory
index 706cc00..4aa3c11 100644
--- a/share/html/Ticket/Elements/ClickToShowHistory
+++ b/share/html/Ticket/Elements/ClickToShowHistory
@@ -47,13 +47,19 @@
%# END BPS TAGGED BLOCK }}}
<div id="deferred_ticket_history">
<& /Widgets/TitleBoxStart, title => 'History' &>
- <a href="<% $url %>" onclick="jQuery('#deferred_ticket_history').load('<% $url |n %>'); return false;" >Show ticket history</a>
+ <a href="<% $url %>" onclick="jQuery('#deferred_ticket_history').load(<% JSON::to_json($url, { allow_nonref => 1 }) %>); return false;" >Show ticket history</a>
<& /Widgets/TitleBoxEnd &>
</div>
<%ARGS>
$Ticket
</%ARGS>
+<%ONCE>
+require JSON;
+</%ONCE>
<%INIT>
-my $id = $Ticket->id;
-my $url = RT->Config->Get('WebPath') ."/Helpers/TicketHistory?id=". $id;
+my %params = %ARGS;
+delete $params{Ticket};
+
+my $url = RT->Config->Get('WebPath') ."/Helpers/TicketHistory?".
+ $m->comp('/Elements/QueryString', %params, id => $Ticket->id );
</%INIT>
diff --git a/share/html/Ticket/Elements/DelayShowHistory b/share/html/Ticket/Elements/DelayShowHistory
index a4200f8..89f390b 100644
--- a/share/html/Ticket/Elements/DelayShowHistory
+++ b/share/html/Ticket/Elements/DelayShowHistory
@@ -52,7 +52,7 @@
</div>
<script type="text/javascript">
jQuery(function(){
- jQuery('#delayed_ticket_history').load('<% $url |n %>', null, function() {
+ jQuery('#delayed_ticket_history').load(<% $url |n %>, null, function() {
jQuery(this).find('.titlebox-content').hide().slideDown(400, function(){
// Jump to any anchor specified after we load the txns into the page
var hash = window.location.hash;
@@ -67,7 +67,16 @@ jQuery(function(){
<%ARGS>
$Ticket
</%ARGS>
+<%ONCE>
+require JSON;
+</%ONCE>
<%INIT>
-my $id = $Ticket->id;
-my $url = RT->Config->Get('WebPath') ."/Helpers/TicketHistory?id=". $id;
+my %params = %ARGS;
+delete $params{Ticket};
+
+my $url = JSON::to_json(
+ RT->Config->Get('WebPath') . "/Helpers/TicketHistory?".
+ $m->comp('/Elements/QueryString', %params, id => $Ticket->id ),
+ { allow_nonref => 1 }
+);
</%INIT>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list