mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
Fix new step button on empty task [SCI-3826] (#2026)
* Fix new step button on empty task * Fix markup
This commit is contained in:
parent
fdce4e6c7c
commit
16ae00782a
1 changed files with 2 additions and 4 deletions
|
@ -107,7 +107,6 @@
|
|||
$("[data-action='cancel-edit']")
|
||||
.on("ajax:success", function(e, data) {
|
||||
var $form = $(this).closest("form");
|
||||
|
||||
$form.after(data.html);
|
||||
var $new_step = $(this).next();
|
||||
$(this).remove();
|
||||
|
@ -139,7 +138,6 @@
|
|||
var $edit_step = $step.after(data.html);
|
||||
var $form = $step.next();
|
||||
$step.remove();
|
||||
|
||||
formCallback($form);
|
||||
initEditableHandsOnTable($form);
|
||||
applyCancelCallBack();
|
||||
|
@ -268,8 +266,9 @@
|
|||
|
||||
function toggleButtons(show) {
|
||||
if (show) {
|
||||
$("[data-action='new-step']").show();
|
||||
$("[data-action='new-step']:first").show();
|
||||
$("[data-action='edit-step']").show();
|
||||
if ($('#steps .step').length > 0) $("[data-action='new-step']:last").show();
|
||||
} else {
|
||||
$("[data-action='new-step']").hide();
|
||||
$("[data-action='edit-step']").hide();
|
||||
|
@ -361,7 +360,6 @@
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
event.stopImmediatePropagation();
|
||||
|
||||
var $form = $(this).closest("form");
|
||||
$form.parent().remove().promise().done(function() {
|
||||
newStepHandler();
|
||||
|
|
Loading…
Reference in a new issue