mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Fix RTE editor initialization for new step in protocol [SCI-3511]
This commit is contained in:
parent
0b3b6d593b
commit
d061aec5cd
1 changed files with 10 additions and 5 deletions
|
@ -220,7 +220,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
// Init ajax success/error for edit form
|
||||
// Init ajax success/error for edit form
|
||||
function formEditAjax($form) {
|
||||
$form
|
||||
.on("ajax:beforeSend", function () {
|
||||
|
@ -249,7 +249,7 @@
|
|||
});
|
||||
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);
|
||||
|
@ -364,6 +364,7 @@
|
|||
});
|
||||
toggleButtons(true);
|
||||
DragNDropSteps.clearFiles();
|
||||
tinyMCE.editors.step_description_textarea.remove();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -501,9 +502,13 @@
|
|||
initializeCheckboxSorting();
|
||||
|
||||
$('#step_name').focus();
|
||||
$('#new-step-main-tab a').on('shown.bs.tab', function() {
|
||||
$('#step_name').focus();
|
||||
});
|
||||
$('#new-step-main-tab a')
|
||||
.on('shown.bs.tab', function() {
|
||||
$('#step_name').focus();
|
||||
TinyMCE.init('#step_description_textarea');
|
||||
}).on('hidden.bs.tab', function() {
|
||||
tinyMCE.editors.step_description_textarea.remove();
|
||||
});
|
||||
|
||||
TinyMCE.init('#step_description_textarea');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue