[Rt-commit] rt branch, 4.2/updatetype-coloring, created. rt-4.2.9rc1-2-g2355f0f

Alex Vandiver alexmv at bestpractical.com
Tue Oct 28 13:07:29 EDT 2014


The branch, 4.2/updatetype-coloring has been created
        at  2355f0f0109943f721b21d10f7839e21807e64cc (commit)

- Log -----------------------------------------------------------------
commit 2355f0f0109943f721b21d10f7839e21807e64cc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Oct 28 13:07:09 2014 -0400

    Apply red background to all UpdateType/MessageBox locations
    
    This adds the behavior to Jumbo and Bulk Update pages.

diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index 69adea1..ff69eaf 100644
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -123,7 +123,7 @@
 <&| /Widgets/TitleBox, title => loc('Add comments or replies to selected tickets') &>
 <table>
 <tr><td align="right"><&|/l&>Update Type</&>:</td>
-<td><select name="UpdateType">
+<td><select name="UpdateType" id="UpdateType">
   <option value="private" <% $ARGS{UpdateType} && $ARGS{UpdateType} eq 'private' ? 'selected="selected"' : '' %> ><&|/l&>Comments (Not sent to requestors)</&></option>
 <option value="response" <% $ARGS{UpdateType} && $ARGS{UpdateType} eq 'response' ? 'selected="selected"' : '' %>><&|/l&>Reply to requestors</&></option>
 </select> 
@@ -142,7 +142,8 @@ size="60" value="<% $ARGS{UpdateSubject} || "" %>" /></td></tr>
 
 <& /Ticket/Elements/AddAttachments, %ARGS &>
 
- <tr><td class="labeltop"><&|/l&>Message</&>:</td><td>
+ <tr><td class="labeltop"><&|/l&>Message</&>:</td>
+ <td class="messagebox-container action-<% $ARGS{UpdateType} || 'private' %>">
 %# Currently, bulk update always starts with Comment not Reply selected, so we check this unconditionally
 % my $IncludeSignature = RT->Config->Get('MessageBoxIncludeSignatureOnComment');
 <& /Elements/MessageBox, Name => "UpdateContent", 
diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index cbe24aa..6d8d744 100644
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -95,7 +95,7 @@
   <tr>
     <td class="label"><&|/l&>Update Type</&>:</td>
     <td class="entry">
-      <select name="UpdateType">
+      <select name="UpdateType" id="UpdateType">
 % if ($CanComment) {
         <option value="private" ><&|/l&>Comments (Not sent to requestors)</&></option>
 % }
@@ -119,7 +119,7 @@
 
   <tr>
     <td class="labeltop"><&|/l&>Content</&>:</td>
-    <td class="entry">
+    <td class="entry messagebox-container action-<% $ARGS{UpdateType} || ($CanComment ? 'private' : 'response') %>">
 % $m->callback( %ARGS, CallbackName => 'BeforeMessageBox' );
 % if (defined $ARGS{UpdateContent} && length($ARGS{UpdateContent})) {
     <& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0 &>
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 6ccaddf..d9b7d80 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -83,13 +83,6 @@
 
 <script type="text/javascript">
     jQuery(function() {
-        jQuery("#UpdateType").change(function(ev) {
-            jQuery(".messagebox-container")
-                .removeClass("action-response action-private")
-                .addClass("action-"+ev.target.value);
-        });
-    });
-    jQuery(function() {
         jQuery("input[name=TxnSendMailTo]").change(function(ev) {
             jQuery("input[name=TxnSendMailTo]").filter( function() { return this.value == ev.target.value; } ).prop("checked",jQuery(ev.target).prop('checked'));
         });
diff --git a/share/static/js/event-registration.js b/share/static/js/event-registration.js
index aec1742..4595879 100644
--- a/share/static/js/event-registration.js
+++ b/share/static/js/event-registration.js
@@ -100,3 +100,11 @@ jQuery( function() {
         }
     });
 });
+
+jQuery(function() {
+    jQuery("#UpdateType").change(function(ev) {
+        jQuery(".messagebox-container")
+            .removeClass("action-response action-private")
+            .addClass("action-"+ev.target.value);
+    });
+});

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


More information about the rt-commit mailing list