Add a 'Start a new sequence' button (#589)

* add start a new sequence button

* changes

* reset sequence

* changes

* changes

* changes

* changes

* changes
This commit is contained in:
Mridul97
2019-01-08 04:52:51 +05:30
committed by Jeffrey Warren
parent 4e5f8728fa
commit 89345f32b3
3 changed files with 12 additions and 1 deletions

View File

@@ -223,6 +223,10 @@ h1 {
transform: translate(-50%, -50%);
}
#resetButton {
margin-top: 20px;
}
.no-border {
border: 0px;
}

View File

@@ -65,8 +65,15 @@ window.onload = function() {
sequencer.loadImage("images/tulips.png", ui.onLoad);
}
var resetSequence = function(){
var r=confirm("Do you want to reset the sequence?");
if (r)
window.location = "/";
}
$("#addStep select").on("change", ui.selectNewStepUi);
$("#addStep #add-step-btn").on("click", ui.addStepUi);
$("#resetButton").on("click",resetSequence);
//Module button radio selection
$('.radio-group .radio').on("click", function() {

View File

@@ -171,6 +171,7 @@
<div class="panel-body">
<div style="text-align:center;">
<button class="btn btn-success btn-lg" id="download-btn" name="download">Download PNG</button>
<button id="resetButton" class="btn btn-default btn-lg">Clear All Steps</button>
</div>
</div>
</div>
@@ -181,7 +182,6 @@
<footer>
<hr style="margin:20px;"><center><a class="color:grey;" id="clear-cache">Clear offline cache</a></center>
</footer>
<form class="move-up" action="#up">
<button><i class="fa fa-arrow-circle-o-up"></i></button>
</form>