[Bps-public-commit] rt-extension-announce branch, support-html-content-as-banner, repushed

Craig Kaiser craig at bestpractical.com
Fri Sep 20 14:51:57 EDT 2019


The branch support-html-content-as-banner was deleted and repushed:
       was 73307bd4e8d1d23a37b7e69d3330c74c556d2ea4
       now 62a496bfa004960c48f1d24c0fc62f8dbffd009f

1:  345ed41 = 1:  345ed41 Update Module::Install
2:  ee93d11 ! 2:  a6e1bf0 Add configuration variable to allow HTML content as announce banner
    @@ -20,7 +20,10 @@
      
     +  $RTAnnounceAllowHTML
     +    If set to true, the banner content will be set to 'text/html' and allow
    -+    HTML rendering.
    ++    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.
     +
      AUTHOR
          Best Practical Solutions, LLC <modules at bestpractical.com>
    @@ -36,6 +39,7 @@
     -  my $content = $txns->First->Content(Type => 'text/plain');
     +
     +  my $show_html = RT::Config->Get('RTAnnounceAllowHTML') || 0;
    ++  my $advanced_mode = RT::Config->Get('RTAnnounceAdvancedMode') || 0;
     +  my $content = $show_html ? $txns->First->Content(Type => 'text/html') : $txns->First->Content(Type => 'text/plain');
     +
        if( length $content > $MaxMessageLength ){
    @@ -46,11 +50,13 @@
        }
      </%perl>
     -<% $content %>
    ++<div id="RTAnnounceScrollable" class="RTAnnounceScrollable">
     +% if ( $show_html ) {
     +  <% $content |n %>
     +% } else {
     +  <% $content %>
     +% }
    ++</div>
      %if( $show_ticket_links{$ticket->Id} ){
       (<a class="announcements_detail" href="<% RT->Config->Get('WebPath') %>/Ticket/Display.html?id=<% $ticket->Id %>">more</a>)
      %}
    @@ -64,9 +70,29 @@
      
     +=head2 C<$RTAnnounceAllowHTML>
     +
    -+If set to true, the banner content will be set to 'text/html' and allow HTML rendering.
    ++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.
     +
      =head1 AUTHOR
      
      Best Practical Solutions, LLC E<lt>modules at bestpractical.comE<gt>
     
    +diff --git a/static/css/announce.css b/static/css/announce.css
    +--- a/static/css/announce.css
    ++++ b/static/css/announce.css
    +@@
    +   font-size: smaller;
    +   color: #777;
    + }
    ++
    ++.RTAnnounceBannerOverflow {
    ++  height: 0px;
    ++  white-space: nowrap;
    ++}
    ++
    ++.RTAnnounceScrollable {
    ++  overflow: auto;
    ++}
    +
3:  0cc5479 < -:  ------- Allow the overflow content of the announce banner to be set
4:  73307bd = 3:  62a496b Hide banner scrollbar



More information about the Bps-public-commit mailing list