Skip to content

Commit

Permalink
Changes to make the insert-step disable at the first step (#968)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithpabbati authored and jywarren committed Apr 1, 2019
1 parent 690c126 commit 985c678
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/lib/defaultHtmlStepUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ function DefaultHtmlStepUi(_sequencer, options) {
// Insert the step's UI in the right place
if (stepOptions.index == _sequencer.steps.length) {
stepsEl.appendChild(step.ui);
$("#steps .main:nth-last-child(1) .insert-step").prop('disabled',true);
if($("#steps .main:nth-last-child(2)"))
$("#steps .main:nth-last-child(2) .insert-step").prop('disabled',false);
$("#steps .step-container:nth-last-child(1) .insert-step").prop('disabled',true);
if($("#steps .step-container:nth-last-child(2)"))
$("#steps .step-container:nth-last-child(2) .insert-step").prop('disabled',false);
} else {
stepsEl.insertBefore(step.ui, $(stepsEl).children()[stepOptions.index]);
}
Expand Down Expand Up @@ -301,7 +301,7 @@ function DefaultHtmlStepUi(_sequencer, options) {

function onRemove(step) {
step.ui.remove();
$("#steps .main:nth-last-child(1) .insert-step").prop('disabled',true);
$("#steps .step-container:nth-last-child(1) .insert-step").prop('disabled',true);
$('div[class*=imgareaselect-]').remove();
}

Expand Down

0 comments on commit 985c678

Please sign in to comment.