mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 11:50:02 +01:00
simplified demo ui (#224)
* simplified demo ui * show description * smaller, labelled example image
This commit is contained in:
@@ -165,41 +165,13 @@ window.onload = function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// File handling
|
|
||||||
|
|
||||||
$('#addStep select').on('change', selectNewStepUI);
|
$('#addStep select').on('change', selectNewStepUI);
|
||||||
|
|
||||||
function selectNewStepUI() {
|
function selectNewStepUI() {
|
||||||
$('#options').html('');
|
|
||||||
var m = $('#addStep select').val();
|
var m = $('#addStep select').val();
|
||||||
for(var input in modulesInfo[m].inputs) {
|
$('#addStep .info').html(sequencer.modulesInfo(m).description);
|
||||||
var inputUI = "";
|
|
||||||
var inputDesc = modulesInfo[m].inputs[input];
|
|
||||||
if (inputDesc.type.toLowerCase() == "select") {
|
|
||||||
inputUI += "<select class=\"form-control\" name=\""+input+"\">";
|
|
||||||
for (var option in inputDesc.values) {
|
|
||||||
inputUI += "<option>"+inputDesc.values[option]+"</option>";
|
|
||||||
}
|
|
||||||
inputUI += "</select>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
inputUI = "<input class=\"form-control\" type=\""+inputDesc.type+"\" name=\""+input+"\">";
|
|
||||||
}
|
|
||||||
$('#options').append(
|
|
||||||
'<div class="row">\
|
|
||||||
<div class="col-md-5 labels">\
|
|
||||||
'+input+':\
|
|
||||||
</div>\
|
|
||||||
<div class="col-md-5">\
|
|
||||||
'+inputUI+'\
|
|
||||||
</div>\
|
|
||||||
</div>'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function addStepUI() {
|
function addStepUI() {
|
||||||
var options = {};
|
var options = {};
|
||||||
var inputs = $('#options input, #options select');
|
var inputs = $('#options input, #options select');
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 663 KiB After Width: | Height: | Size: 489 KiB |
@@ -48,18 +48,20 @@
|
|||||||
|
|
||||||
<section id="steps" class="row"></section>
|
<section id="steps" class="row"></section>
|
||||||
|
|
||||||
<section id="addStep">
|
<hr />
|
||||||
<div class="row">
|
|
||||||
<select class="form-control">
|
<section id="addStep" class="panel panel-primary">
|
||||||
<option value="none" disabled selected>Select a new step...</option>
|
<div class="form-inline">
|
||||||
</select>
|
<div class="panel-body">
|
||||||
</div>
|
<div style="text-align:center;">
|
||||||
<hr />
|
<select class="form-control input-lg">
|
||||||
<div class="row">
|
<option value="none" disabled selected>Select a new step...</option>
|
||||||
<div id="options"></div>
|
</select>
|
||||||
</div>
|
<button class="btn btn-success btn-lg" name="add">Add Step</button>
|
||||||
<div class="row add">
|
</div>
|
||||||
<button class="btn btn-success btn-lg" name="add">Add Step</button>
|
<br />
|
||||||
|
<p class="info" style="padding:8px;">Select a new module to add to your sequence.</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -68,7 +70,6 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var sequencer;
|
var sequencer;
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user