Unverified Commit c55ba7ed authored by Stefan Brunecker's avatar Stefan Brunecker Committed by GitHub
Browse files

Merge pull request #5 from EmbeddedMontiArc/feature/add-reset-button

feature/add-reset-button
parents ed1a9b57 9a806f69
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -106,8 +131,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -115,8 +145,8 @@
<script>
function exec() {
document.getElementById("outport-field-outArray").innerText = "";
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
setInArray(document.getElementById("inport-field-inArray").value);
......@@ -134,6 +164,25 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
document.getElementById("inport-field-inArray").value = "";
}
function clearOutportFields() {
document.getElementById("outport-field-outArray").innerText = "";
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -106,8 +131,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -115,8 +145,8 @@
<script>
function exec() {
document.getElementById("outport-field-outMatrix").innerText = "";
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
setInMatrix(document.getElementById("inport-field-inMatrix").value);
......@@ -134,6 +164,25 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
document.getElementById("inport-field-inMatrix").value = "";
}
function clearOutportFields() {
document.getElementById("outport-field-outMatrix").innerText = "";
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -143,8 +168,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -152,9 +182,8 @@
<script>
function exec() {
document.getElementById("outport-field-v").innerText = "";
document.getElementById("outport-field-k").innerText = "";
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
setM1(document.getElementById("inport-field-m1").value);
......@@ -175,6 +204,28 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
document.getElementById("inport-field-m1").value = "";
document.getElementById("inport-field-m2").value = "";
document.getElementById("inport-field-c").value = "";
}
function clearOutportFields() {
document.getElementById("outport-field-v").innerText = "";
document.getElementById("outport-field-k").innerText = "";
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -82,8 +107,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -91,7 +121,8 @@
<script>
function exec() {
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
......@@ -107,6 +138,23 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
}
function clearOutportFields() {
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -106,8 +131,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -115,8 +145,8 @@
<script>
function exec() {
document.getElementById("outport-field-outScalar").innerText = "";
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
setInScalar(document.getElementById("inport-field-inScalar").value);
......@@ -134,6 +164,25 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
document.getElementById("inport-field-inScalar").value = "";
}
function clearOutportFields() {
document.getElementById("outport-field-outScalar").innerText = "";
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......