mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 20:00:05 +01:00
Changes to make the insert-step disable at the first step (#968)
This commit is contained in:
committed by
Jeffrey Warren
parent
690c126f41
commit
985c67847e
@@ -150,9 +150,9 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
|||||||
// Insert the step's UI in the right place
|
// Insert the step's UI in the right place
|
||||||
if (stepOptions.index == _sequencer.steps.length) {
|
if (stepOptions.index == _sequencer.steps.length) {
|
||||||
stepsEl.appendChild(step.ui);
|
stepsEl.appendChild(step.ui);
|
||||||
$("#steps .main:nth-last-child(1) .insert-step").prop('disabled',true);
|
$("#steps .step-container:nth-last-child(1) .insert-step").prop('disabled',true);
|
||||||
if($("#steps .main:nth-last-child(2)"))
|
if($("#steps .step-container:nth-last-child(2)"))
|
||||||
$("#steps .main:nth-last-child(2) .insert-step").prop('disabled',false);
|
$("#steps .step-container:nth-last-child(2) .insert-step").prop('disabled',false);
|
||||||
} else {
|
} else {
|
||||||
stepsEl.insertBefore(step.ui, $(stepsEl).children()[stepOptions.index]);
|
stepsEl.insertBefore(step.ui, $(stepsEl).children()[stepOptions.index]);
|
||||||
}
|
}
|
||||||
@@ -301,7 +301,7 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
|||||||
|
|
||||||
function onRemove(step) {
|
function onRemove(step) {
|
||||||
step.ui.remove();
|
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();
|
$('div[class*=imgareaselect-]').remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user