From 20b626d791b4b7d2b2e3b0eaf5bab5663452d0f2 Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Mon, 20 May 2019 11:19:53 +0200 Subject: [PATCH] Fix warning message issue in step description [SCI-3479] (#1778) * Fix warning message issue --- app/assets/javascripts/protocols/steps.js.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index f7f2f960d..3064a2d7e 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -218,7 +218,7 @@ }); } - // Init ajax success/error for edit form + // Init ajax success/error for edit form function formEditAjax($form) { $form .on("ajax:beforeSend", function () { @@ -242,12 +242,12 @@ $new_step.find(".panel-collapse:first").addClass("collapse in"); //Rerender tables - $new_step.find("[data-role='step-hot-table']").each(function() { + $new_step.find("[data-role='step-hot-table']").each(function() { renderTable($(this)); }); setupAssetsLoading(); }) - .on("ajax:error", function(e, xhr, status, error) { + .on("ajax:error", function(e, xhr, status, error) { $form.renderFormErrors('step', xhr.responseJSON, true, e); formCallback($form); @@ -257,7 +257,7 @@ SmartAnnotation.preventPropagation('.atwho-user-popover'); //Rerender tables - $form.find("[data-role='step-hot-table']").each(function() { + $form.find("[data-role='step-hot-table']").each(function() { renderTable($(this)); }); }); @@ -596,6 +596,8 @@ toggleButtons(true); SmartAnnotation.preventPropagation('.atwho-user-popover'); + tinyMCE.editors.step_description_textarea.remove(); + //Rerender tables $new_step.find("div.step-result-hot-table").each(function() { $(this).handsontable("render");