[Rt-commit] rt branch, 4.4/preview-scrip-recipients-checkbox, created. rt-4.4.1-319-gad8c5c0

Dave Goehrig dave at bestpractical.com
Mon Mar 13 11:03:32 EDT 2017


The branch, 4.4/preview-scrip-recipients-checkbox has been created
        at  ad8c5c01c59d92fe12643605dde074309b8b9518 (commit)

- Log -----------------------------------------------------------------
commit ad8c5c01c59d92fe12643605dde074309b8b9518
Author: Dave Goehrig <dave at bestpractical.com>
Date:   Thu Mar 2 11:57:55 2017 -0500

    Disable checkbox while scrip loading
    
    To prevent you from clicking on the checkbox
    while the PreviewScrips widget is loading,
    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
index ecc2a3e..bd1de9f 100644
--- a/share/html/Helpers/PreviewScrips
+++ b/share/html/Helpers/PreviewScrips
@@ -93,7 +93,7 @@ $submitted{$_} = 1 for split /,/, $ARGS{TxnRecipients};
 %          my $action = $s->ActionObj->Action;
 %          scalar(map { $action->$_ } qw(To Cc Bcc))
 %        } @scrips ) {
-<input type="checkbox" class="checkbox" id="TxnSendMailToAll" name="TxnSendMailToAll" value="1">
+<input type="checkbox" class="checkbox" id="TxnSendMailToAll" name="TxnSendMailToAll" <% $ARGS{TxnSendMailToAll} ? 'checked="checked"' : ''  %> value="1">
 <label for="TxnSendMailToAll"><b><% loc('All recipients') %></b></label><br />
 %   }
 %     for my $scrip (@scrips) {
@@ -141,6 +141,5 @@ $submitted{$_} = 1 for split /,/, $ARGS{TxnRecipients};
 % }
 
 % $m->callback( CallbackName => 'AfterRecipients', TicketObj => $TicketObj );
-
 <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
index 8540600..6d32edb 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -225,9 +225,11 @@ jQuery( function() {
                }
            }
        );
+       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() {
+               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) } );
@@ -237,6 +239,7 @@ jQuery( function() {
                }
            }
        );
+       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
index f70f4b5..70ddfca 100644
--- a/share/static/css/base/ticket-form.css
+++ b/share/static/css/base/ticket-form.css
@@ -91,3 +91,7 @@ iframe.richtext-editor {
     position: absolute;
     margin-left: 0.5em;
 }
+
+.refreshing {
+    opacity: 0.3;
+}

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


More information about the rt-commit mailing list