[Bps-public-commit] rt-extension-announce branch, master, updated. 1.00-6-g51b8a97

Jim Brandt jbrandt at bestpractical.com
Mon Sep 30 11:45:14 EDT 2019


The branch, master has been updated
       via  51b8a9758479e7760dc8a188f467858f27fd331e (commit)
       via  f134580c71a79aa6ee27c6565adaf45ba3ab93bb (commit)
       via  62a496bfa004960c48f1d24c0fc62f8dbffd009f (commit)
       via  a6e1bf09428195173f86fb2cb7f77d66ebd78877 (commit)
       via  345ed4178e66c13aad14b4cd25de2c8d53833455 (commit)
      from  9be80eb935a9648b7288bbd41efef732ec651f44 (commit)

Summary of changes:
 META.yml                                           |   6 +-
 README                                             |  14 +-
 .../Elements/PageLayout/BeforeBody                 |  20 +-
 inc/Module/Install.pm                              |  35 +-
 inc/Module/Install/Base.pm                         |   2 +-
 inc/Module/Install/Can.pm                          |  13 +-
 inc/Module/Install/Fetch.pm                        |   2 +-
 inc/Module/Install/Include.pm                      |   2 +-
 inc/Module/Install/Makefile.pm                     |   2 +-
 inc/Module/Install/Metadata.pm                     |   2 +-
 inc/Module/Install/RTx.pm                          |  49 ++-
 inc/Module/Install/RTx/Runtime.pm                  |   1 +
 inc/Module/Install/ReadmeFromPod.pm                |  76 +++-
 inc/Module/Install/Win32.pm                        |   2 +-
 inc/Module/Install/WriteAll.pm                     |   2 +-
 inc/YAML/Tiny.pm                                   |  37 +-
 inc/unicore/Name.pm                                | 417 ---------------------
 lib/RT/Extension/Announce.pm                       |  11 +
 static/css/announce.css                            |  27 ++
 19 files changed, 219 insertions(+), 501 deletions(-)
 delete mode 100644 inc/unicore/Name.pm

- Log -----------------------------------------------------------------
commit f134580c71a79aa6ee27c6565adaf45ba3ab93bb
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Sep 30 11:43:55 2019 -0400

    Additional style updates

diff --git a/README b/README
index a50df58..f0cc804 100644
--- a/README
+++ b/README
@@ -115,10 +115,15 @@ CONFIGURATION
 
   $RTAnnounceAllowHTML
     If set to true, the banner content will be set to 'text/html' and allow
-    HTML rendering. If the content of the banner is rather large there is an
-    option to wrap the content in overflow divs. By wrapping any content in
-    the following: <div class="RTAnnounceBannerOverflow"></div> the content
-    within the divs will be available as scrollable overflow content.
+    HTML rendering.
+
+    If the content of the message is large there is an option to wrap the
+    content in overflow divs. In the source HTML of the message, wrap the
+    bottom part of the message in the following: <div
+    class="RTAnnounceBannerOverflow"></div>. The top part of the message
+    will be shown with a scrollbar and the part contained in the div will be
+    hidden. Users can view the bottom section by scrolling without taking up
+    too much room at the top of the page.
 
 AUTHOR
     Best Practical Solutions, LLC <modules at bestpractical.com>
diff --git a/html/Callbacks/RT-Extension-Announce/Elements/PageLayout/BeforeBody b/html/Callbacks/RT-Extension-Announce/Elements/PageLayout/BeforeBody
index fe72759..2c8a47c 100644
--- a/html/Callbacks/RT-Extension-Announce/Elements/PageLayout/BeforeBody
+++ b/html/Callbacks/RT-Extension-Announce/Elements/PageLayout/BeforeBody
@@ -50,7 +50,7 @@
 <table class="announce">
 %my $rows = 1;
 %foreach my $ticket ( @tickets ){
-  <tr><td class="announce_subject">
+  <tr><td class="announce_subject announce_cell">
 % if( $show_ticket_links{$ticket->Id} ){
   <a class="announce_subject"
      href="<% RT->Config->Get('WebPath') %>/Ticket/Display.html?id=<% $ticket->Id %>">
@@ -59,7 +59,7 @@
   <% $ticket->Subject %>
 % }
   </td>
-  <td>
+  <td class="announce_cell">
 <%perl>
   my $txns = $ticket->Transactions;
   for my $type ( qw(Create Correspond) ){
@@ -91,7 +91,7 @@
  (<a class="announcements_detail" href="<% RT->Config->Get('WebPath') %>/Ticket/Display.html?id=<% $ticket->Id %>">more</a>)
 %}
 </td>
-<td class="date">
+<td class="date announce_cell">
 <% $ticket->LastUpdatedObj->AsString %>
 </td>
 </tr>
diff --git a/lib/RT/Extension/Announce.pm b/lib/RT/Extension/Announce.pm
index 009b89d..af85a0b 100644
--- a/lib/RT/Extension/Announce.pm
+++ b/lib/RT/Extension/Announce.pm
@@ -222,10 +222,14 @@ the regular privileged RT page.
 
 =head2 C<$RTAnnounceAllowHTML>
 
-If set to true, the banner content will be set to 'text/html' and allow HTML rendering. If the content of
-the banner is rather large there is an option to wrap the content in overflow divs. By wrapping any content in
-the following: C<E<lt>div class="RTAnnounceBannerOverflow"E<gt>E<lt>/divE<gt>> the content within the divs will be available as
-scrollable overflow content.
+If set to true, the banner content will be set to 'text/html' and allow HTML rendering.
+
+If the content of the message is large there is an option to wrap the content
+in overflow divs. In the source HTML of the message, wrap the bottom part of the message
+in the following: C<E<lt>div class="RTAnnounceBannerOverflow"E<gt>E<lt>/divE<gt>>.
+The top part of the message will be shown with a scrollbar and the part contained in
+the div will be hidden. Users can view the bottom section by scrolling without taking
+up too much room at the top of the page.
 
 =head1 AUTHOR
 
diff --git a/static/css/announce.css b/static/css/announce.css
index 9d86ad1..8f69748 100644
--- a/static/css/announce.css
+++ b/static/css/announce.css
@@ -56,6 +56,14 @@ td.announce_subject {
   font-weight: bold;
 }
 
+td.date {
+  width: 15%;
+}
+
+td.announce_cell {
+  padding: 1em;
+}
+
 a.announce_subject:link, span.announce_subject {
   color: red;
   font-weight: bold;
@@ -86,7 +94,6 @@ table.announce td.date {
 .RTAnnounceBannerOverflow {
   height: 0px;
   white-space: nowrap;
-  margin-right: -5px;
 }
 
 .RTAnnounceScrollable {
@@ -96,7 +103,9 @@ table.announce td.date {
 }
 
 /* Chrome */
+/* Leave these as an optional note. It looks better, but the scroll behavior is very
+   difficult to discover without the visual queue of the scroll bar. */
 .RTAnnounceScrollable::-webkit-scrollbar {
-  width: 0px;  /* Remove scrollbar space */
-  background: transparent;  /* Optional: just make scrollbar invisible */
+/*  width: 0px;  */ /* Remove scrollbar space */
+/*  background: #fcc;  */ /* Optional: just make scrollbar invisible */
 }

commit 51b8a9758479e7760dc8a188f467858f27fd331e
Merge: 9be80eb f134580
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Sep 30 11:44:27 2019 -0400

    Merge branch 'support-html-content-as-banner'


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


More information about the Bps-public-commit mailing list