[Rt-commit] rt branch, 4.4/preview-scrip-recipients-checkbox, repushed
Dave Goehrig
dave at bestpractical.com
Mon Mar 13 11:03:34 EDT 2017
The branch 4.4/preview-scrip-recipients-checkbox was deleted and repushed:
was 7d11eb830bc2a19c56c712676757cb0e1afaad30
now ad8c5c01c59d92fe12643605dde074309b8b9518
1: 7d11eb8 ! 1: ad8c5c0 Disable checkbox while scrip loading
@@ -4,15 +4,9 @@
To prevent you from clicking on the checkbox
while the PreviewScrips widget is loading,
- I've overridden the click handler to return false
- preventing the click event from working.
-
- It should be noted that "disabled" and "readonly"
- attributres do not have the desired behavior on
- checkboxes as they impact the value and not the
- check state.
-
- Fixes: I#32290
+ disable the checkbox, and set the opacity for
+ the preview scrip box opacity to 0.3 while
+ reloading.
diff --git a/share/html/Helpers/PreviewScrips b/share/html/Helpers/PreviewScrips
--- a/share/html/Helpers/PreviewScrips
@@ -33,7 +27,6 @@
-
<input type="hidden" name="TxnRecipients" value="<% join ",",sort keys %recips %>" />
% $m->abort();
-+
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
--- a/share/html/Ticket/Update.html
@@ -42,19 +35,31 @@
}
}
);
-+
-+ jQuery("#previewscrips input[name=TxnSendMailToAll]").click(function() { return false; });
++ jQuery('#previewscrips div.titlebox-content').addClass('refreshing');
jQuery('#previewscrips div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/PreviewScrips',
jQuery('form[name=TicketUpdate]').serializeArray(),
function() {
-+ console.log("Loading preview scrips helper");
++ jQuery('#previewscrips div.titlebox-content').removeClass('refreshing');
var txn_send_field = jQuery("#previewscrips input[name=TxnSendMailTo]");
txn_send_field.change( syncCheckboxes );
txn_send_field.click( function () { setCheckbox(this) } );
-- jQuery("#previewscrips input[name=TxnSendMailToAll]").click( function() { setCheckbox(this, 'TxnSendMailTo'); } );
-+ jQuery("#previewscrips input[name=TxnSendMailToAll]").click( function() {
-+ setCheckbox(this, 'TxnSendMailTo');
-+ } );
- if (txn_send_field.length > 0) {
- setCheckbox(txn_send_field[0]);
+@@
}
+ }
+ );
++ jQuery("#previewscrips input[name=TxnSendMailToAll], #previewscrips input[name=TxnSendMailTo]").attr('disabled', true);
+ };
+ updateScrips();
+
+
+diff --git a/share/static/css/base/ticket-form.css b/share/static/css/base/ticket-form.css
+--- a/share/static/css/base/ticket-form.css
++++ b/share/static/css/base/ticket-form.css
+@@
+ position: absolute;
+ margin-left: 0.5em;
+ }
++
++.refreshing {
++ opacity: 0.3;
++}
More information about the rt-commit
mailing list