From 6bab70ad093125903fffe53c211b4f8087e2418a Mon Sep 17 00:00:00 2001 From: divy123 Date: Mon, 17 Dec 2018 16:02:32 +0530 Subject: [PATCH] Add step butoon disabled for last step --- examples/lib/defaultHtmlStepUi.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/lib/defaultHtmlStepUi.js b/examples/lib/defaultHtmlStepUi.js index a4538dc8..3a889efe 100644 --- a/examples/lib/defaultHtmlStepUi.js +++ b/examples/lib/defaultHtmlStepUi.js @@ -173,6 +173,9 @@ function DefaultHtmlStepUi(_sequencer, options) { // Insert the step's UI in the right place if (stepOptions.index == _sequencer.images.image1.steps.length) { stepsEl.appendChild(step.ui); + $("#steps .container:nth-last-child(1) .insert-step").prop('disabled',true); + if($("#steps .container:nth-last-child(2)")) + $("#steps .container:nth-last-child(2) .insert-step").prop('disabled',false); } else { stepsEl.insertBefore(step.ui, $(stepsEl).children()[stepOptions.index]); } @@ -238,6 +241,7 @@ function DefaultHtmlStepUi(_sequencer, options) { function onRemove(step) { step.ui.remove(); + $("#steps .container:nth-last-child(1) .insert-step").prop('disabled',true); } function getPreview() {