[Rt-commit] rt branch, 4.6/responsive-table, created. rt-4.4.4-724-g01c33eb85c

? sunnavy sunnavy at bestpractical.com
Wed Feb 5 12:07:46 EST 2020


The branch, 4.6/responsive-table has been created
        at  01c33eb85c3cb7a76961dc436a29c9d96ee2f15c (commit)

- Log -----------------------------------------------------------------
commit 01c33eb85c3cb7a76961dc436a29c9d96ee2f15c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Feb 6 00:43:20 2020 +0800

    Make potentionally wide tables responsive
    
    This is to make them horizontally scroll instead of overflowing out of
    their containers

diff --git a/share/html/Admin/Elements/UpgradeHistory b/share/html/Admin/Elements/UpgradeHistory
index 19dbcd08b8..a2b74a27cd 100644
--- a/share/html/Admin/Elements/UpgradeHistory
+++ b/share/html/Admin/Elements/UpgradeHistory
@@ -48,6 +48,7 @@
 % for my $package (@packages) {
 %   my ($version_status, @lines) = RT->System->ParsedUpgradeHistory($package);
 <h4><% $package %> (<% $version_status %>)</h4>
+<div class="table-responsive">
 <table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection upgrade-history">
 <thead>
 <tr class="collection-as-table">
@@ -63,6 +64,7 @@
 <& UpgradeHistoryRow, i => \$i, row => $upgrade &>
 % }
 </table>
+</div>
 % }
 
 <%init>
diff --git a/share/html/Admin/Tools/Queries.html b/share/html/Admin/Tools/Queries.html
index 8d120bcab7..0faf8af190 100644
--- a/share/html/Admin/Tools/Queries.html
+++ b/share/html/Admin/Tools/Queries.html
@@ -84,6 +84,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
           <li>
               <tt><% $request->{Path} %></tt> - <i><&|/l, sprintf('%.4f', $seconds) &>[_1]s</&></i>
               <a href="#" onclick="return hideshow(<% "queries-$r" |n,j%>);"><&|/l, $count &>Toggle [quant,_1,query,queries]</&></a>
+            <div class="table-responsive">
               <table id="queries-<%$r%>" class="tablesorter hidden">
                   <thead>
                       <tr>
@@ -134,6 +135,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
 %                 }
                   </tbody>
               </table>
+            </div>
           </li>
 %     }
     </ol>
diff --git a/share/html/Elements/CollectionList b/share/html/Elements/CollectionList
index 0e95e2a73a..ce74c70e62 100644
--- a/share/html/Elements/CollectionList
+++ b/share/html/Elements/CollectionList
@@ -121,6 +121,7 @@ $Class ||= $Collection->ColumnMapClassName;
 
 $InlineEdit = 0 unless $Collection->isa('RT::Tickets');
 
+$m->out('<div class="table-responsive">');
 $m->out('<table cellspacing="0"');
 $m->out(' class="table ' .  ($Collection->isa('RT::Tickets') ? 'ticket-list' : 'collection') . ($InlineEdit ? ' inline-edit' : '') . ' collection-as-table"');
 $m->out(' data-display-format="' . $m->interp->apply_escapes($DisplayFormat, 'h') . '"');
@@ -184,6 +185,7 @@ while ( my $record = $Collection->Next ) {
 }
 
 $m->out('</table>');
+$m->out('</div>');
 if ( $Rows && $ShowNavigation && $TotalFound > $Rows ) {
   my $oddRows = ($TotalFound && $TotalFound % $Rows == 0 )? 0 : 1;
   my $pages = int( $TotalFound / $Rows ) + $oddRows;
diff --git a/share/html/Elements/QueueSummaryByLifecycle b/share/html/Elements/QueueSummaryByLifecycle
index 0eb870eb57..0a6b574c40 100644
--- a/share/html/Elements/QueueSummaryByLifecycle
+++ b/share/html/Elements/QueueSummaryByLifecycle
@@ -51,6 +51,7 @@
     next unless @cur_statuses;
 </%perl>
 
+<div class="table-responsive">
 <table border="0" cellspacing="0" cellpadding="1" width="100%" class="table queue-summary">
 
 <tr>
@@ -81,6 +82,7 @@ for my $queue (@$queues) {
 </tr>
 % }
 </table>
+</div>
 % }
 <%INIT>
 my $build_search_link = sub {
diff --git a/share/html/Elements/QueueSummaryByStatus b/share/html/Elements/QueueSummaryByStatus
index e0ae8c5235..0106d14070 100644
--- a/share/html/Elements/QueueSummaryByStatus
+++ b/share/html/Elements/QueueSummaryByStatus
@@ -45,6 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
+<div class="table-responsive">
 <table border="0" cellspacing="0" cellpadding="1" width="100%" class="table queue-summary">
 
 <tr>
@@ -80,6 +81,7 @@ for my $queue (@$queues) {
 </tr>
 % }
 </table>
+</div>
 <%INIT>
 my $build_search_link = sub {
     my ($queue_name, $extra_query) = @_;
diff --git a/share/html/Search/CustomDateRanges.html b/share/html/Search/CustomDateRanges.html
index 0eef09ba16..c2768ad5ec 100644
--- a/share/html/Search/CustomDateRanges.html
+++ b/share/html/Search/CustomDateRanges.html
@@ -52,6 +52,7 @@
 
 <&|/Widgets/TitleBox, title => loc('Custom Date Ranges In Config Files') &>
 % if ( $config && keys %{$config->{'RT::Ticket'}} ) {
+<div class="table-responsive">
   <table class="collection-as-table">
     <tr class="collection-as-table">
       <th class="collection-as-table"><&|/l&>Name</&></th>
@@ -76,6 +77,7 @@
     </tr>
 % }
   </table>
+</div>
 % }
 % else {
   <p><&|/l&>No custom date ranges in config files</&></p>
@@ -84,6 +86,7 @@
 
 <form name="CustomDateRanges" method="POST" method="?">
   <&|/Widgets/TitleBox, title => loc('Custom Date Ranges') &>
+  <div class="table-responsive">
     <table class="collection-as-table">
       <tr class="collection-as-table">
         <th class="collection-as-table"><&|/l&>Name</&></th>
@@ -139,6 +142,7 @@
       </tr>
 % }
     </table>
+  </div>
     <& /Elements/Submit, Name => 'Save', Label => loc('Save Changes') &>
   </&>
 </form>

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


More information about the rt-commit mailing list