[Rt-commit] rt branch, 4.2/scrips-correspond-selectall-checkbox, repushed
Wallace Reis
wreis at bestpractical.com
Wed Jul 23 10:15:30 EDT 2014
The branch 4.2/scrips-correspond-selectall-checkbox was deleted and repushed:
was a4e3f014ad2674723b4073b5af86a9a012cd2673
now 6beec0e48798847738904d8de270c1d9818d8010
1: e162bee ! 1: 70c5797 'Select All' checkbox for scrips correspondences/comments
@@ -34,6 +34,7 @@
<table>
+% if ( scalar(map { keys %{$headers{$_}} } qw(To Cc Bcc)) ) {
+<tr>
++<td> </td>
+<td>
+<input type="checkbox" name="TxnSendMailToAll" value="1" checked="checked" onclick="setCheckbox(this,'TxnSendMailTo')">
+<label for="TxnSendMailToAll"><b><% loc('All recipients') %></b></label>
@@ -44,3 +45,16 @@
% next unless keys %{$headers{$type}};
<tr>
+diff --git a/share/static/js/util.js b/share/static/js/util.js
+--- a/share/static/js/util.js
++++ b/share/static/js/util.js
+@@
+
+ function setCheckbox(input, name, val) {
+ if (val == null) val = input.checked;
++ var allfield = jQuery('input[name=' + input.name + ']');
++ allfield.prop('checked', val);
+
+ // Find inputs within the current form or collection list, whichever is closest.
+ var container = jQuery(input).closest("form, table.collection-as-table").get(0);
+
2: a4e3f01 ! 2: 6beec0e Make 'select all' check/uncheck bi-directional
@@ -47,6 +47,8 @@
+
function setCheckbox(input, name, val) {
if (val == null) val = input.checked;
+ var allfield = jQuery('input[name=' + input.name + ']');
+ allfield.prop('checked', val);
- // Find inputs within the current form or collection list, whichever is closest.
- var container = jQuery(input).closest("form, table.collection-as-table").get(0);
More information about the rt-commit
mailing list