[Rt-commit] rt branch, 4.4/ajax-preview-scrips, repushed

? sunnavy sunnavy at bestpractical.com
Sat Jul 12 04:33:09 EDT 2014


The branch 4.4/ajax-preview-scrips was deleted and repushed:
       was 23513bdba66aeb0e9b4696d39368efd146012c16
       now e79c9a623320ffb89fe8ba0204c6e95178febf86

1:  9b43949 = 1:  9b43949 ajaxify PrviewScrips and ShowSimplifiedRecipients on ticket update page
2:  355ed02 = 2:  355ed02 trigger ajax call for all inputs in "Ticket and Transaction"
3:  23513bd ! 3:  e79c9a6 respect one-time Cc/Bcc too
    @@ -2,9 +2,11 @@
     
         respect one-time Cc/Bcc too
         
    -    they couldn't been squelched, so checkbox is misleading there, radio is better
    -    instead. the reason to add a radio rather than simply removing checkbox is for
    -    vertical alignment.
    +    note that it's convenient to automatically update preview scrips when user
    +    selects autocomplete users, so we need to trigger the change on select.
    +    
    +    the css tweak is to make sure simplified recipients are vertical aligned,
    +    the normal preview scrips part doesn't have this issue.
     
     diff --git a/share/html/Helpers/PreviewScrips b/share/html/Helpers/PreviewScrips
     --- a/share/html/Helpers/PreviewScrips
    @@ -33,9 +35,7 @@
     +%                 if ( $show_checkbox ) {
     +                      <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" />
     +%                 }
    -+%                 else {
    -+                      <input type="radio" readonly="readonly" disabled="disabled" checked="checked" />
    -+%                 }
    ++
                        <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 ) {
    @@ -76,7 +76,6 @@
      %         $m->callback(CallbackName => 'AfterAddress', Ticket => $TicketObj, Address => $addr, Type => $type);
      <br />
     +%         if ( $no_squelch{$type}{$addr} ) {
    -+<input type="radio" readonly="readonly" disabled="disabled" checked="checked" />
     +<label><& /Elements/ShowUser, Address => $addr &></label>
     +%             if ( $type eq 'Cc' ) {
     +(<&|/l&>explicit one-time Cc</&>)
    @@ -111,3 +110,31 @@
             jQuery('#previewscrips div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/PreviewScrips',
                 jQuery('form[name=TicketUpdate]').serialize(),
                 function() {
    +
    +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
    +@@
    +     float: right;
    + }
    + 
    ++#recipients label {
    ++    padding-left: 2em;
    ++}
    ++
    ++#recipients input.checkbox {
    ++    position: absolute;
    ++    margin-left: 0.5em;
    ++}
    +
    +diff --git a/share/static/js/autocomplete.js b/share/static/js/autocomplete.js
    +--- a/share/static/js/autocomplete.js
    ++++ b/share/static/js/autocomplete.js
    +@@
    +                 }
    +                 terms.push(''); // add trailing delimeter so user can input another value directly
    +                 this.value = terms.join(what == 'Tickets' ? ' ' : ", ");
    ++                jQuery(this).change();
    +                 return false;
    +             }
    +         }



More information about the rt-commit mailing list