[Bps-public-commit] rt-extension-commentoncreate branch master updated. 1.01-5-gbb25564

BPS Git Server git at git.bestpractical.com
Tue Apr 26 21:51:46 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-commentoncreate".

The branch, master has been updated
       via  bb25564ad3cd5189d6a0e212991f13b2e08935dd (commit)
       via  61f7147d4216c4ea0a6a0d7a69974fe88f94876d (commit)
       via  34449eb11fcb832f1c985ca234194ad135c70a91 (commit)
       via  840c5a8d366007d3c975e8918bdd94f9a1d8abd0 (commit)
       via  909d06aee0430e24c309f57afde1f734fe1d5e9d (commit)
      from  e9d2db1957db72b1d8eecdb1bcfb876193cbfb83 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bb25564ad3cd5189d6a0e212991f13b2e08935dd
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Apr 27 05:43:59 2022 +0800

    Prep 1.02

diff --git a/Changes b/Changes
index 23b8712..12271a7 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
 Revision history for RT-Extension-CommentOnCreate
 
+1.02 2022-04-26
+  - Use the same box modal for comment on create
+  - Add new config $CommentOnCreateRichTextHeight to set ckeditor height
+  - Set input color to yellow just like comment inputs in core
+
 1.01 2021-06-11
   - Add RT 5 support
 
diff --git a/MANIFEST b/MANIFEST
index d2d2a25..0a6e153 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -19,3 +19,4 @@ Makefile.PL
 MANIFEST			This list of files
 META.yml
 README
+static/css/rt-extension-commentoncreate.css
diff --git a/META.yml b/META.yml
index 8e1b455..0d6f09b 100644
--- a/META.yml
+++ b/META.yml
@@ -18,10 +18,11 @@ no_index:
   directory:
     - html
     - inc
+    - static
 requires:
   perl: 5.8.3
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: '1.01'
+version: '1.02'
 x_module_install_rtx_version: '0.43'
 x_requires_rt: 4.0.7
diff --git a/README b/README
index cd4d7bd..444cd62 100644
--- a/README
+++ b/README
@@ -50,7 +50,7 @@ BUGS
         L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-CommentOnCreate>.
 
 LICENSE AND COPYRIGHT
-    This software is Copyright (c) 2014-2021 by Best Practical Solutions
+    This software is Copyright (c) 2014-2022 by Best Practical Solutions
 
     This is free software, licensed under:
 
diff --git a/lib/RT/Extension/CommentOnCreate.pm b/lib/RT/Extension/CommentOnCreate.pm
index ea33048..57ad6c4 100644
--- a/lib/RT/Extension/CommentOnCreate.pm
+++ b/lib/RT/Extension/CommentOnCreate.pm
@@ -1,6 +1,6 @@
 package RT::Extension::CommentOnCreate;
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 use warnings;
 use strict;
@@ -73,7 +73,7 @@ or via the web at
 
 =head1 LICENSE AND COPYRIGHT
 
-This software is Copyright (c) 2014-2021 by Best Practical Solutions
+This software is Copyright (c) 2014-2022 by Best Practical Solutions
 
 This is free software, licensed under:
 

commit 61f7147d4216c4ea0a6a0d7a69974fe88f94876d
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Apr 27 05:41:22 2022 +0800

    Update M:I:RTx

diff --git a/META.yml b/META.yml
index 04edc2c..8e1b455 100644
--- a/META.yml
+++ b/META.yml
@@ -23,5 +23,5 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
 version: '1.01'
-x_module_install_rtx_version: '0.42'
+x_module_install_rtx_version: '0.43'
 x_requires_rt: 4.0.7
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 2dd9489..2889ece 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -9,7 +9,7 @@ no warnings 'once';
 use Term::ANSIColor qw(:constants);
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 use FindBin;
 use File::Glob     ();
@@ -134,7 +134,7 @@ lexicons ::
     if( $extra_args->{'remove_files'} ){
         $self->include('Module::Install::RTx::Remove');
         our @remove_files;
-        eval { require "etc/upgrade/remove_files" }
+        eval { require "./etc/upgrade/remove_files" }
           or print "No remove file located, no files to remove\n";
         $remove_files = join ",", map {"q(\$(DESTDIR)$plugin_path/$name/$_)"} @remove_files;
     }

commit 34449eb11fcb832f1c985ca234194ad135c70a91
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Apr 27 05:38:50 2022 +0800

    Use the same box modal for comment on create
    
    This is to make sure the inputs for main content and comment content
    have the same width. Without this, the comment input would be a bit
    wider than the main input.

diff --git a/lib/RT/Extension/CommentOnCreate.pm b/lib/RT/Extension/CommentOnCreate.pm
index f7f0a7a..ea33048 100644
--- a/lib/RT/Extension/CommentOnCreate.pm
+++ b/lib/RT/Extension/CommentOnCreate.pm
@@ -6,6 +6,7 @@ use warnings;
 use strict;
 use Carp;
 
+RT->AddStyleSheets('rt-extension-commentoncreate.css');
 
 =head1 NAME
 
diff --git a/static/css/rt-extension-commentoncreate.css b/static/css/rt-extension-commentoncreate.css
new file mode 100644
index 0000000..890db1a
--- /dev/null
+++ b/static/css/rt-extension-commentoncreate.css
@@ -0,0 +1,4 @@
+#cke_CommentContent {
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}

commit 840c5a8d366007d3c975e8918bdd94f9a1d8abd0
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Apr 27 05:37:21 2022 +0800

    Add new config $CommentOnCreateRichTextHeight to set ckeditor height

diff --git a/README b/README
index 9eda33b..cd4d7bd 100644
--- a/README
+++ b/README
@@ -29,11 +29,13 @@ CONFIGURATION
     Optional configuration options to control the width and height of the
     Comment textbox:
 
-        Set($CommentOnCreateWidth, 80);
-        Set($CommentOnCreateHeight, 190);
+        Set($CommentOnCreateWidth, 80); # For RT 4 only
+        Set($CommentOnCreateHeight, 15);
 
-    These only apply if you have MessageBoxRichText enabled; otherwise it
-    will inherit the global MessageBoxRichTextHeight attribute.
+    If MessageBoxRichText is enabled, use this to control the height of the
+    editor:
+
+        Set($CommentOnCreateRichTextHeight, 200);
 
 AUTHOR
     Best Practical Solutions, LLC <modules at bestpractical.com>
diff --git a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
index b99f20f..4c00b28 100644
--- a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
+++ b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
@@ -59,7 +59,7 @@
 <tr><td colspan="6">
 % }
 
-<div class="messagebox-container action-private">
+<div class="messagebox-container action-private comment-content">
 % if (exists $ARGS{CommentContent}) {
 <& /Elements/MessageBox, Name => 'CommentContent',
                          Default => $ARGS{CommentContent},
@@ -75,6 +75,20 @@
 &>
 % }
 </div>
+
+% if ( my $ckeditor_height = RT->Config->Get('CommentOnCreateRichTextHeight') ) {
+<script type="text/javascript">
+jQuery( function() {
+    CKEDITOR.on('instanceReady', function(e) {
+    var container = jQuery(e.editor.element.$.closest('div.messagebox-container'));
+        if ( container.hasClass('comment-content') ) {
+            // true is to apply height to the editing area, to be consistent with MessageBoxRichTextHeight.
+            e.editor.resize( '100%', <% $ckeditor_height |j %>, true );
+        }
+    });
+});
+</script>
+% }
 <%ARGS>
 $QueueObj => undef
 </%ARGS>
diff --git a/lib/RT/Extension/CommentOnCreate.pm b/lib/RT/Extension/CommentOnCreate.pm
index 565877c..f7f0a7a 100644
--- a/lib/RT/Extension/CommentOnCreate.pm
+++ b/lib/RT/Extension/CommentOnCreate.pm
@@ -48,11 +48,13 @@ or add C<RT::Extension::CommentOnCreate> to your existing C<@Plugins> line.
 Optional configuration options to control the width and height of the
 Comment textbox:
 
-    Set($CommentOnCreateWidth, 80);
-    Set($CommentOnCreateHeight, 190);
+    Set($CommentOnCreateWidth, 80); # For RT 4 only
+    Set($CommentOnCreateHeight, 15);
 
-These only apply if you have C<MessageBoxRichText> enabled; otherwise it
-will inherit the global C<MessageBoxRichTextHeight> attribute.
+If C<MessageBoxRichText> is enabled, use this to control the height of the
+editor:
+
+    Set($CommentOnCreateRichTextHeight, 200);
 
 =head1 AUTHOR
 

commit 909d06aee0430e24c309f57afde1f734fe1d5e9d
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Apr 27 05:27:58 2022 +0800

    Set input color to yellow just like comment inputs in core

diff --git a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
index a557063..b99f20f 100644
--- a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
+++ b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
@@ -59,6 +59,7 @@
 <tr><td colspan="6">
 % }
 
+<div class="messagebox-container action-private">
 % if (exists $ARGS{CommentContent}) {
 <& /Elements/MessageBox, Name => 'CommentContent',
                          Default => $ARGS{CommentContent},
@@ -73,6 +74,7 @@
                          ($height ? (Height => $height) : ())
 &>
 % }
+</div>
 <%ARGS>
 $QueueObj => undef
 </%ARGS>

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

Summary of changes:
 Changes                                                  |  5 +++++
 MANIFEST                                                 |  1 +
 META.yml                                                 |  5 +++--
 README                                                   | 12 +++++++-----
 .../Ticket/Create.html/AfterMessageBox                   | 16 ++++++++++++++++
 inc/Module/Install/RTx.pm                                |  4 ++--
 lib/RT/Extension/CommentOnCreate.pm                      | 15 +++++++++------
 static/css/rt-extension-commentoncreate.css              |  4 ++++
 8 files changed, 47 insertions(+), 15 deletions(-)
 create mode 100644 static/css/rt-extension-commentoncreate.css


hooks/post-receive
-- 
rt-extension-commentoncreate


More information about the Bps-public-commit mailing list