[Rt-commit] rt branch, 4.4/squelching-all, repushed
Alex Vandiver
alexmv at bestpractical.com
Wed Jul 30 16:39:43 EDT 2014
The branch 4.4/squelching-all was deleted and repushed:
was 50a3ea4cf3e22c7c57e669981ea1c4f221c05717
now c28a5999e840df60c3024c2f776cc188df4f0c7a
1: e9df999 = 1: 55d5a91 Sync the ckeditor output before updating messages
2: 910a666 = 2: e8d4433 Roll back on failure to Comment, as Correspond does
3: a25d722 = 3: c8a24b1 DryRun now wraps in a rollback, and records all transactions
4: aacb253 = 4: c948e50 Display all scrips which are triggered
5: 9c47817 = 5: 4a33c66 Re-use squelching information for future updates to a ticket in same request
6: d0fc383 = 6: 5cf9d5d Remove mostly-duplicate code for Rules which can never trigger
7: 9746853 ! 7: c167921 Add squelched recipients as preference
@@ -66,3 +66,51 @@
WidgetArguments => {
Description => 'Enable quote folding?' # loc
+diff --git a/share/html/Helpers/PreviewScrips b/share/html/Helpers/PreviewScrips
+--- a/share/html/Helpers/PreviewScrips
++++ b/share/html/Helpers/PreviewScrips
+@@
+ $m->abort unless @dryrun;
+
+ my %squelched = ProcessTransactionSquelching( \%ARGS );
++my $squelched_config = !( RT->Config->Get('SquelchedRecipients', $session{'CurrentUser'}) );
++if ($ARGS{TxnRecipients}) {
++ $squelched_config = undef;
++}
+ </%init>
+ <p>
+ <&|/l, RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$TicketObj->Id,
+@@
+ <ul>
+ % for my $addr (@addresses) {
+ <li>
+-% my $checked = not $squelched{$addr->address};
++% my $checked = $squelched_config // not $squelched{$addr->address};
+ % $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => $addr, Type => $type, Checked => \$checked);
+ % $recips{$addr->address}++;
+ <b><%loc($type)%></b>:
+
+diff --git a/share/html/Helpers/ShowSimplifiedRecipients b/share/html/Helpers/ShowSimplifiedRecipients
+--- a/share/html/Helpers/ShowSimplifiedRecipients
++++ b/share/html/Helpers/ShowSimplifiedRecipients
+@@
+ }
+ my %recips;
+ my %squelched = ProcessTransactionSquelching( \%ARGS );
++my $squelched_config = !( RT->Config->Get('SquelchedRecipients', $session{'CurrentUser'}) );
++if ($ARGS{TxnRecipients}) {
++ $squelched_config = undef;
++}
+ </%init>
+ <table>
+ % for my $type (qw(To Cc Bcc)) {
+@@
+ <td valign="top"><% $type %>:</td>
+ <td valign="top">
+ % for my $addr (sort {$a->address cmp $b->address} values %{$headers{$type}}) {
+-% my $checked = not $squelched{$addr->address};
++% my $checked = $squelched_config // not $squelched{$addr->address};
+ % $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => $addr, Type => $type, Checked => \$checked);
+ % $recips{$addr->address}++;
+ <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" />
+
8: d44ca9f ! 8: 0afa352 'Select All' checkbox for scrips correspondences/comments
@@ -10,18 +10,16 @@
--- a/share/html/Helpers/PreviewScrips
+++ b/share/html/Helpers/PreviewScrips
@@
- $m->abort unless @dryrun;
my %squelched = ProcessTransactionSquelching( \%ARGS );
-+my $squelched_config = !( RT->Config->Get('SquelchedRecipients', $session{'CurrentUser'}) );
+ my $squelched_config = !( RT->Config->Get('SquelchedRecipients', $session{'CurrentUser'}) );
+my $all_checkbox = $squelched_config ? 'checked="checked"' : "";
-+if ($ARGS{TxnRecipients}) {
-+ $squelched_config = undef;
+ if ($ARGS{TxnRecipients}) {
+ $squelched_config = undef;
+ $all_checkbox = scalar(grep {$_} values %squelched) ? "" : 'checked="checked"';
-+}
+ }
</%init>
<p>
- <&|/l, RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$TicketObj->Id,
@@
% my @scrips = grep {$_->ActionObj->Action->isa('RT::Action::SendEmail')}
% map {@{$_->Scrips->Prepared}} @dryrun;
@@ -37,40 +35,19 @@
% for my $scrip (@scrips) {
<b><% $scrip->Description || loc('Scrip #[_1]',$scrip->id) %></b><br />
<&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->Template)&>[_1] [_2] with template [_3]</&>
-@@
- <ul>
- % for my $addr (@addresses) {
- <li>
--% my $checked = not $squelched{$addr->address};
-+% my $checked = $squelched_config // not $squelched{$addr->address};
- % $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => $addr, Type => $type, Checked => \$checked);
- % $recips{$addr->address}++;
- <b><%loc($type)%></b>:
-@@
- % }
-
- % if ( $show_checkbox ) {
-- <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" />
-+ <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" onclick="checkboxSetEvent(this,'TxnSendMailTo','TxnSendMailToAll')" />
- % }
--
- <label for="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>"><& /Elements/ShowUser, Address => $addr &></label>
- % $m->callback(CallbackName => 'AfterAddress', Ticket => $TicketObj, Address => $addr, Type => $type);
- % unless ( $show_checkbox ) {
diff --git a/share/html/Helpers/ShowSimplifiedRecipients b/share/html/Helpers/ShowSimplifiedRecipients
--- a/share/html/Helpers/ShowSimplifiedRecipients
+++ b/share/html/Helpers/ShowSimplifiedRecipients
@@
- }
my %recips;
my %squelched = ProcessTransactionSquelching( \%ARGS );
-+my $squelched_config = !( RT->Config->Get('SquelchedRecipients', $session{'CurrentUser'}) );
+ my $squelched_config = !( RT->Config->Get('SquelchedRecipients', $session{'CurrentUser'}) );
+my $all_checkbox = $squelched_config ? 'checked="checked"' : "";
-+if ($ARGS{TxnRecipients}) {
-+ $squelched_config = undef;
+ if ($ARGS{TxnRecipients}) {
+ $squelched_config = undef;
+ $all_checkbox = scalar(grep {$_} values %squelched) ? "" : 'checked="checked"';
-+}
+ }
</%init>
<table>
+% if ( scalar(map { keys %{$headers{$_}} } qw(To Cc Bcc)) ) {
@@ -85,19 +62,6 @@
% for my $type (qw(To Cc Bcc)) {
% next unless keys %{$headers{$type}} or keys %{$no_squelch{$type}};
<tr>
- <td valign="top"><% $type %>:</td>
- <td valign="top">
-+% my $squelched_recipients = RT->Config->Get('SquelchedRecipients', $session{'CurrentUser'});
- % for my $addr (sort {$a->address cmp $b->address} values %{$headers{$type}}) {
--% my $checked = not $squelched{$addr->address};
-+% my $checked = $squelched_config // not $squelched{$addr->address};
- % $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => $addr, Type => $type, Checked => \$checked);
- % $recips{$addr->address}++;
--<input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" />
-+<input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" onclick="checkboxSetEvent(this,'TxnSendMailTo','TxnSendMailToAll')" />
- <label for="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>"><& /Elements/ShowUser, Address => $addr &></label>
- % $m->callback(CallbackName => 'AfterAddress', Ticket => $TicketObj, Address => $addr, Type => $type);
- <br />
diff --git a/share/static/js/util.js b/share/static/js/util.js
--- a/share/static/js/util.js
9: 50a3ea4 ! 9: c28a599 Make 'select all' check/uncheck bi-directional
@@ -5,6 +5,34 @@
If I uncheck "All $thing", and then I re-check all of the items by hand,
then "All $thing" pops back to being checked as soon as I re-checked
the last item.
+
+diff --git a/share/html/Helpers/PreviewScrips b/share/html/Helpers/PreviewScrips
+--- a/share/html/Helpers/PreviewScrips
++++ b/share/html/Helpers/PreviewScrips
+@@
+ % }
+
+ % if ( $show_checkbox ) {
+- <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" />
++ <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" onclick="checkboxSetEvent(this,'TxnSendMailTo','TxnSendMailToAll')" />
+ % }
+-
+ <label for="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>"><& /Elements/ShowUser, Address => $addr &></label>
+ % $m->callback(CallbackName => 'AfterAddress', Ticket => $TicketObj, Address => $addr, Type => $type);
+ % unless ( $show_checkbox ) {
+
+diff --git a/share/html/Helpers/ShowSimplifiedRecipients b/share/html/Helpers/ShowSimplifiedRecipients
+--- a/share/html/Helpers/ShowSimplifiedRecipients
++++ b/share/html/Helpers/ShowSimplifiedRecipients
+@@
+ % my $checked = $squelched_config // not $squelched{$addr->address};
+ % $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => $addr, Type => $type, Checked => \$checked);
+ % $recips{$addr->address}++;
+-<input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" />
++<input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" onclick="checkboxSetEvent(this,'TxnSendMailTo','TxnSendMailToAll')" />
+ <label for="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>"><& /Elements/ShowUser, Address => $addr &></label>
+ % $m->callback(CallbackName => 'AfterAddress', Ticket => $TicketObj, Address => $addr, Type => $type);
+ <br />
diff --git a/share/static/js/util.js b/share/static/js/util.js
--- a/share/static/js/util.js
More information about the rt-commit
mailing list