[Rt-commit] rt branch, 4.2/message-box-type, repushed

? sunnavy sunnavy at bestpractical.com
Sun Mar 2 03:01:03 EST 2014


The branch 4.2/message-box-type was deleted and repushed:
       was 9648bd7d3ce552db26389d3ca2f8820fe41e18ca
       now e2bdb73a57166af38f24ece0eb34afe7d3e2582c

1:  9648bd7 ! 1:  e2bdb73 add $Type to %ARGS so we can specify the type of the textarea in the caller
    @@ -10,6 +10,42 @@
         tool page(/RTIR/Tools/ScriptedAction.html), where rich texts are not useful at
         all(actually harmful as the backend doesn't handle the rich format).
     
    +diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
    +--- a/lib/RT/Interface/Web.pm
    ++++ b/lib/RT/Interface/Web.pm
    +@@
    + =cut
    + 
    + sub JSFiles {
    +-    return qw/
    ++    return qw{
    +       jquery-1.9.1.min.js
    +       jquery_noconflict.js
    +       jquery-ui-1.10.0.custom.min.js
    +@@
    +       forms.js
    +       event-registration.js
    +       late.js
    +-      /, RT->Config->Get('JSFiles');
    ++      /static/RichText/ckeditor.js
    ++      }, RT->Config->Get('JSFiles');
    + }
    + 
    + =head2 ClearSquished
    +
    +diff --git a/lib/RT/Squish/JS.pm b/lib/RT/Squish/JS.pm
    +--- a/lib/RT/Squish/JS.pm
    ++++ b/lib/RT/Squish/JS.pm
    +@@
    +     my $content = "";
    + 
    +     for my $file ( RT::Interface::Web->JSFiles ) {
    +-        my $uri = "/static/js/$file";
    ++        my $uri = $file =~ m{^/} ? $file : "/static/js/$file";
    +         my $res = RT::Interface::Web::Handler->GetStatic($uri);
    + 
    +         if ($res->is_success) {
    +
     diff --git a/share/html/Elements/HeaderJavascript b/share/html/Elements/HeaderJavascript
     --- a/share/html/Elements/HeaderJavascript
     +++ b/share/html/Elements/HeaderJavascript
    @@ -18,21 +54,32 @@
      % }
      
     -% if ( $RichText and RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'}) ) {
    - <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/static/RichText/ckeditor.js"></script>
    +-<script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/static/RichText/ckeditor.js"></script>
     -% }
      <script type="text/javascript"><!--
      jQuery( loadTitleBoxStates );
      % if ( $focus ) {
     @@
    + % if ( $onload ) {
          jQuery( <% $onload |n %> );
      % }
    - 
    +-
     -% if ( $RichText and RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'})) {
    -     jQuery().ready(function ()  { ReplaceAllTextareas() });
    +-    jQuery().ready(function ()  { ReplaceAllTextareas() });
     -% }
      --></script>
    - <%ARGS>
    - $RichText => 1
    +-<%ARGS>
    +-$RichText => 1
    +-</%ARGS>
    + <%INIT>
    + 
    + my @js_files;
    + if ( RT->Config->Get('DevelMode') ) {
    +-    @js_files = map { "/static/js/$_" } RT::Interface::Web->JSFiles();
    ++    @js_files = map { $_ =~ m{^/} ? $_ : "/static/js/$_" } RT::Interface::Web->JSFiles();
    + }
    + else {
    +     my $key = RT::Interface::Web::SquishedJS()->Key;
     
     diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
     --- a/share/html/Elements/MessageBox
    @@ -101,3 +148,9 @@
                  // Turn the original plain text content into HTML
                  var type = jQuery("#"+textArea.name+"Type");
                  if (type.val() != "text/html")
    +@@
    +             return true;
    +         });
    +     });
    ++    ReplaceAllTextareas();
    + });



More information about the rt-commit mailing list