[Rt-commit] rt branch, 4.2/generic-history-rendering, updated. rt-4.0.8-528-gef793e2

Thomas Sibley trs at bestpractical.com
Fri Nov 30 14:05:53 EST 2012


The branch, 4.2/generic-history-rendering has been updated
       via  ef793e2f2e8f79ec61dff6f35b39d72a3210f0a5 (commit)
      from  d78cf7af01cd2076cab9fbd29859d9a525ce892c (commit)

Summary of changes:
 share/html/Elements/ShowHistory | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit ef793e2f2e8f79ec61dff6f35b39d72a3210f0a5
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Nov 30 10:56:11 2012 -0800

    Stay at the top of the history when toggling full/brief headers
    
    Suggested by cloos to avoid potentially needing to scroll back down.
    
    Moves the record-specific history id attribute (add by this branch, so
    not yet used anywhere else) to the outermost container instead of the
    inner container to preserve the visibility of the toggle link itself.

diff --git a/share/html/Elements/ShowHistory b/share/html/Elements/ShowHistory
index 4b9258f..3c48a97 100644
--- a/share/html/Elements/ShowHistory
+++ b/share/html/Elements/ShowHistory
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<div class="history <% lc $record_type %>">
+<div class="history <% lc $record_type %>" id="<% $histid %>">
 <%perl>
 if ( $ShowDisplayModes or $ShowTitle ) {
     my $title = $ShowTitle
@@ -63,12 +63,12 @@ if ( $ShowDisplayModes or $ShowTitle ) {
 
         if ($ShowHeaders) {
             $titleright .= qq{<a href="?ForceShowHistory=1;id=} .
-                           $Object->id.qq{">} .
+                           $Object->id.qq{#$histid">} .
                            loc("Show brief headers") .
                            qq{</a>};
         } else {
             $titleright .= qq{<a href="?ForceShowHistory=1;ShowHeaders=1;id=} .
-                           $Object->id.qq{">} .
+                           $Object->id.qq{#$histid">} .
                            loc("Show full headers") .
                            qq{</a>};
         }
@@ -77,7 +77,7 @@ if ( $ShowDisplayModes or $ShowTitle ) {
 <& /Widgets/TitleBoxStart, title => $title, titleright_raw => $titleright &>
 % }
 
-<div id="<% lc $record_type %>-<% $Object->id %>-history" class="history-container">
+<div class="history-container">
 <%perl>
 my $i = 1;
 while ( my $Transaction = $Transactions->Next ) {
@@ -144,6 +144,7 @@ for my $attachment (@{$Attachments->ItemsArrayRef()}) {
 }
 
 my $record_type = $Object->RecordType;
+my $histid      = "\L$record_type\E-" . $Object->id . "-history";
 </%INIT>
 <%ARGS>
 $Object

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


More information about the Rt-commit mailing list