Bug fix for supporting CKEditor (HTMLAttribute) inside a reloaded form

SVN:trunk[2162]
This commit is contained in:
Denis Flaven
2012-08-31 13:30:12 +00:00
parent f0d87adc87
commit 4eb018ac50

View File

@@ -206,6 +206,16 @@ function WizardHelper(sClass, sFormPrefix, sState)
{ json_obj: this.ToJSON(), operation: 'obj_creation_form', target_state: sTargetState, transaction_id: sTransactionId },
function(data)
{
// Delete any previous instances of CKEditor
$('#'+sFormId).find('.htmlEditor').each(function() {
var sId = $(this).attr('id');
var editorInst = CKEDITOR.instances[sId];
if (editorInst)
{
editorInst.destroy(true);
}
});
$('#'+sFormId).html(data);
onDelayedReady();
$('#'+sFormId).unblock();