Custom fields: not all the values were correctly recorded (event name collision)

SVN:trunk[3946]
This commit is contained in:
Romain Quetiez
2016-03-11 15:05:59 +00:00
parent 44ba3d7bf8
commit f29af948be
2 changed files with 5 additions and 3 deletions

View File

@@ -1950,7 +1950,7 @@ EOF
$oPage->add_ready_script("$('#{$iId}_console_form').console_form_handler('alignColumns');");
$oPage->add_ready_script("$('#{$iId}_console_form').console_form_handler('option', 'field_set', $('#{$iId}_field_set'));");
// field_change must be processed to refresh the hidden value at anytime
$oPage->add_ready_script("$('#{$iId}_console_form .field_set').bind('field_change', function() { $('#{$iId}').val(JSON.stringify($('#{$iId}_field_set').triggerHandler('get_current_values'))); });");
$oPage->add_ready_script("$('#{$iId}_console_form').bind('value_change', function() { $('#{$iId}').val(JSON.stringify($('#{$iId}_field_set').triggerHandler('get_current_values'))); });");
// update_value is triggered when preparing the wizard helper object for ajax calls
$oPage->add_ready_script("$('#{$iId}').bind('update_value', function() { $(this).val(JSON.stringify($('#{$iId}_field_set').triggerHandler('get_current_values'))); });");
// validate is triggered by CheckFields, on all the input fields, once at page init and once before submitting the form

View File

@@ -99,7 +99,8 @@ class ConsoleSimpleFieldRenderer extends FieldRenderer
id: $(me).attr("id"),
name: $(me).closest(".form_field").attr("data-field-id"),
value: $(me).val()
});
})
.closest('.form_handler').trigger('value_change');
});
EOF
);
@@ -114,7 +115,8 @@ EOF
id: $(me).attr("id"),
name: $(me).closest(".form_field").attr("data-field-id"),
value: $(me).val()
});
})
.closest('.form_handler').trigger('value_change');
});
EOF
);