Some front JS fix
This commit is contained in:
parent
405690094f
commit
372c788396
4 changed files with 7 additions and 2 deletions
|
@ -4,7 +4,7 @@ const day = document.getElementById("day");
|
||||||
const locals = {
|
const locals = {
|
||||||
sandwich: document.querySelector("#oderCreator label").innerHTML,
|
sandwich: document.querySelector("#oderCreator label").innerHTML,
|
||||||
day: document.querySelector("label[for=day]").innerText,
|
day: document.querySelector("label[for=day]").innerText,
|
||||||
give: document.querySelector("p label span").innerText
|
give: document.getElementById("dummy").innerText
|
||||||
};
|
};
|
||||||
|
|
||||||
function lastOrderId() {
|
function lastOrderId() {
|
||||||
|
@ -39,6 +39,8 @@ document.getElementById("addOrder").addEventListener("click", () => {
|
||||||
<a class="btn-floating btn-large waves-effect waves-light red"><i class="material-icons">remove</i></a>
|
<a class="btn-floating btn-large waves-effect waves-light red"><i class="material-icons">remove</i></a>
|
||||||
</div>`);
|
</div>`);
|
||||||
|
|
||||||
|
M.updateTextFields();
|
||||||
|
|
||||||
sandwich.selectedIndex = 0;
|
sandwich.selectedIndex = 0;
|
||||||
day.value = "";
|
day.value = "";
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@ document.getElementById("addOrder").addEventListener("click", () => {
|
||||||
<a class="btn-floating btn-large waves-effect waves-light red"><i class="material-icons">remove</i></a>
|
<a class="btn-floating btn-large waves-effect waves-light red"><i class="material-icons">remove</i></a>
|
||||||
</div>`);
|
</div>`);
|
||||||
|
|
||||||
|
M.updateTextFields();
|
||||||
|
|
||||||
sandwich.selectedIndex = 0;
|
sandwich.selectedIndex = 0;
|
||||||
day.value = "";
|
day.value = "";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
M.AutoInit();
|
M.AutoInit();
|
||||||
M.updateTextFields;
|
M.updateTextFields();
|
||||||
});
|
});
|
||||||
|
|
||||||
function cb(token) {
|
function cb(token) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
extends ../../layout
|
extends ../../layout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
span#dummy.hide=__("admin.given")
|
||||||
div.container
|
div.container
|
||||||
h1=__("admin.ordersManagement")
|
h1=__("admin.ordersManagement")
|
||||||
div.row
|
div.row
|
||||||
|
|
Reference in a new issue