[Rt-commit] rt branch, 4.4/preview-checkboxes-sync, created. rt-4.2.9-103-g66ddd55

Alex Vandiver alexmv at bestpractical.com
Mon Nov 24 15:02:48 EST 2014


The branch, 4.4/preview-checkboxes-sync has been created
        at  66ddd5566f6c7f88cc693a41121089d1e34c1670 (commit)

- Log -----------------------------------------------------------------
commit 66ddd5566f6c7f88cc693a41121089d1e34c1670
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Nov 24 14:59:17 2014 -0500

    Ensure that preview is kept in sync with one-time-cc checkboxes
    
    Triggering updates based on the "change" trigger of the one-time-Cc
    checkboxes can lead to out-of-sync previews, as the checkboxes propagate
    into the textarea onclick, whereas the preview happens onchange.
    
    Move the preview hooks to only be on the textarea's change, and update
    the checkboxes to push a change event to the textbox after they update.
    This ensures that the checkboxes have applied their changes before any
    AJAX preview requests are made.

diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 73326a4..5e20cb2 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -242,7 +242,7 @@ jQuery( function() {
    };
    updateScrips();
    CKEDITOR.instances['UpdateContent'].on('blur', updateScrips );
-   jQuery("#ticket-update-metadata :input, input[name^=UpdateCc], input[name^=UpdateBcc]").change( updateScrips );
+   jQuery("#ticket-update-metadata :input, #UpdateCc, #UpdateBcc").change( updateScrips );
 });
 </script>
 % }
diff --git a/share/static/js/util.js b/share/static/js/util.js
index e7cb90b..6094a98 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -200,6 +200,7 @@ function checkboxToInput(target,checkbox,val){
         tar.val(tar.val().replace(val,''));
     }
     jQuery('#UpdateIgnoreAddressCheckboxes').val(true);
+    tar.change();
 }
 
 // ahah for back compatibility as plugins may still use it

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


More information about the rt-commit mailing list