Fixed Endabgabe Second (3.0)

This commit is contained in:
Ben 2020-07-24 16:20:46 +02:00
parent a208455bf0
commit 606b4cd4dd
9 changed files with 13 additions and 9 deletions

View File

@ -9,7 +9,7 @@
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="../html-landing-page/landing-page-03-desktop.css">
<link rel="stylesheet" href="../index.css">
<link rel="stylesheet" href="memes.css">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin="anonymous" SameSite="Secure"></script>
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
<script src='../script-frontend/memes.js' defer></script>
<title>MEMS!</title>
</head>

View File

@ -62,9 +62,9 @@
<div id="topping3"></div>
</div>
<div id="buttonContainer">
<button id="resetButton"><a href="#topContainer">Eis zurücksetzen</a></button>
<button id="nextButton"><a href="#topContainer">Nächstes Eis</a></button>
<button id="sendButton"><a href="../html-warenkorb/warenkorb.html">Bestellung speichern</a></button>
<button id="resetButton">Eis zurücksetzen</button>
<button id="nextButton">Nächstes Eis</button>
<button id="sendButton">Bestellung speichern</button>
</div>
</main>
<footer>

View File

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../index.css">
<link rel="stylesheet" href="warenkorb.css">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin="anonymous" SameSite="Secure"></script>
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
<script src="../script-frontend/warenkorb.js" defer></script>
</head>

View File

@ -12,7 +12,7 @@ function previousImage() {
function changeImage(_vorzeichen) {
for (const iterator of pictureNames) {
let currentImage = document.querySelector("#imageBox img").getAttribute("src");
if (iterator == currentImage) {
if (("images/" + iterator) == currentImage) {
if (pictureNames.indexOf(iterator) == pictureNames.length - 1 && _vorzeichen == +1)
document.querySelector("#imageBox img").setAttribute("src", `images/${pictureNames[0]}`);
else if (pictureNames.indexOf(iterator) == 0 && _vorzeichen == -1)

View File

@ -1 +1 @@
{"version":3,"file":"memes.js","sourceRoot":"","sources":["memes.ts"],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E,UAAU,YAAY,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;gBAEhH,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAE,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;YACzI,MAAM;SACT;KACJ;AACL,CAAC"}

View File

@ -15,7 +15,7 @@ function previousImage(): void {
function changeImage(_vorzeichen: number): void {
for (const iterator of pictureNames) {
let currentImage: string = (<string>document.querySelector("#imageBox img")!.getAttribute("src"));
if (iterator == currentImage) {
if (("images/" + iterator) == currentImage) {
if (pictureNames.indexOf(iterator) == pictureNames.length - 1 && _vorzeichen == +1)
document.querySelector("#imageBox img")!.setAttribute("src", `images/${pictureNames[0]}`);
else if (pictureNames.indexOf(iterator) == 0 && _vorzeichen == -1)

View File

@ -114,6 +114,7 @@ var frontShop;
function clearCombination() {
combinationArray = [];
displayOrder();
document.querySelector("#topContainer").scrollIntoView(true);
}
function fixCartCount() {
if (localStorage["CartCount"] != undefined)
@ -130,6 +131,7 @@ var frontShop;
function addToLocal() {
combinationArray.push(tisch);
localStorage.setItem(`Combination${combinationCount}`, "[" + combinationArray.toLocaleString() + "]");
window.location.href = "../html-warenkorb/warenkorb.html";
}
function displayOrder() {
document.querySelector("#displayContainer").innerHTML = "";

File diff suppressed because one or more lines are too long

View File

@ -131,6 +131,7 @@ namespace frontShop {
function clearCombination(): void {
combinationArray = [];
displayOrder();
(<HTMLDivElement>document.querySelector("#topContainer")).scrollIntoView(true);
}
function fixCartCount(): void {
@ -149,6 +150,7 @@ namespace frontShop {
function addToLocal(): void {
combinationArray.push(tisch);
localStorage.setItem(`Combination${combinationCount}`, "[" + combinationArray.toLocaleString() + "]");
window.location.href = "../html-warenkorb/warenkorb.html";
}
function displayOrder(): void {