[Rt-commit] rt branch, 4.2/functionalize-custom-field-syncing, created. rt-4.2.0-42-gdd85b5c

Kevin Falcone falcone at bestpractical.com
Thu Nov 7 12:42:36 EST 2013


The branch, 4.2/functionalize-custom-field-syncing has been created
        at  dd85b5cd4e4bb751569aba00cfe4c7ce215da3a5 (commit)

- Log -----------------------------------------------------------------
commit dd85b5cd4e4bb751569aba00cfe4c7ce215da3a5
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Nov 7 12:28:57 2013 -0500

    Move the code that syncs CF edits to a function
    
    This code keeps CFs which are in multiple groupings (and thus show up
    more than 1 time on an edit page) in sync while you type/select.
    
    If you display a CF for editing after a page loads (say from a JS
    lightbox) you need to re-trigger this, so make it a function that other
    things can call, rather than an inline function.

diff --git a/share/static/js/late.js b/share/static/js/late.js
index 4fa3878..92a8279 100644
--- a/share/static/js/late.js
+++ b/share/static/js/late.js
@@ -1,7 +1,8 @@
 // Lower the speed limit for hover intent event
 jQuery.event.special.hover.speed = 80; // pixels per second
 
-jQuery(function() {
+jQuery(function() { sync_grouped_custom_fields() } );
+function sync_grouped_custom_fields() {
     var all_inputs = jQuery("input,textarea,select");
     var parse_cf = /^Object-([\w:]+)-(\d*)-CustomField(?::\w+)?-(\d+)-(.*)$/;
     all_inputs.each(function() {
@@ -35,4 +36,4 @@ jQuery(function() {
         else
             elem.change( trigger_func );
     });
-});
+}

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


More information about the Rt-commit mailing list