[Rt-commit] rt branch, 4.4/always-enable-recipient-checkboxes, created. rt-4.4.2-97-g1dcf213f1

? sunnavy sunnavy at bestpractical.com
Mon Mar 12 11:35:13 EDT 2018


The branch, 4.4/always-enable-recipient-checkboxes has been created
        at  1dcf213f10000cd25ef0310236067db86393b60a (commit)

- Log -----------------------------------------------------------------
commit 1dcf213f10000cd25ef0310236067db86393b60a
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 9 21:57:11 2018 +0800

    Always enable recipient checkboxes
    
    The "disable" behavior is introduced in f0a7105d and 4b11cf37, which is
    mainly to indicate that recipients checkboxes are being updated and
    shouldn't be changed. It had a js execute order issue, which was fixed
    in db6ef531. But from real user reports, there is still possibility that
    checkboxes are not enabled in time, which causes RT to not send
    notifications. For example, it could happen if user submits before the
    ajax call returns.
    
    It introduces so much mess but gains so less, not mentioning that the
    0.3 opacity is already an indicator of "watch out, the section is being
    updated".

diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 8b4ba94c2..f90a89a0d 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -217,16 +217,8 @@ jQuery( function() {
        jQuery('#recipients div.titlebox-content').addClass('refreshing');
        jQuery('#previewscrips div.titlebox-content').addClass('refreshing');
 
-       /* temporarily re-enable the checkboxes so they will be included in
-          payload */
-       jQuery("#recipients input[name=TxnSendMailToAll], #recipients input[name=TxnSendMailTo]").attr('disabled', false);
-       jQuery("#previewscrips input[name=TxnSendMailToAll], #previewscrips input[name=TxnSendMailTo]").attr('disabled', false);
-
        var payload = jQuery('form[name=TicketUpdate]').serializeArray();
 
-       jQuery("#recipients input[name=TxnSendMailToAll], #recipients input[name=TxnSendMailTo]").attr('disabled', true);
-       jQuery("#previewscrips input[name=TxnSendMailToAll], #previewscrips input[name=TxnSendMailTo]").attr('disabled', true);
-
        jQuery('#recipients div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/ShowSimplifiedRecipients',
            payload,
            function() {
@@ -266,11 +258,6 @@ jQuery( function() {
 
    jQuery("#ticket-update-metadata :input, #UpdateCc, #UpdateBcc").change( updateScrips );
 
-   jQuery("body").on("submit", "form", function () {
-       jQuery("#recipients input[name=TxnSendMailToAll], #recipients input[name=TxnSendMailTo]").attr('disabled', false);
-       jQuery("#previewscrips input[name=TxnSendMailToAll], #previewscrips input[name=TxnSendMailTo]").attr('disabled', false);
-   });
-
 });
 </script>
 % }

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


More information about the rt-commit mailing list