Archived
1
0
Fork 0

Some front JS fix

This commit is contained in:
Ethanell 2020-09-30 11:39:46 +02:00
parent 405690094f
commit 372c788396
4 changed files with 7 additions and 2 deletions

View file

@ -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 = "";

View file

@ -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 = "";

View file

@ -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) {

View file

@ -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