From 98f90349d318e207f0afacaedacee4b053c9ce84 Mon Sep 17 00:00:00 2001 From: Julian Hinxlage Date: Fri, 22 Mar 2019 11:16:45 +0100 Subject: [PATCH 01/13] added login.html --- .gitignore | 3 +- src/main/webapp/preview/login.html | 131 +++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 src/main/webapp/preview/login.html diff --git a/.gitignore b/.gitignore index 04e3114..358487f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.iml -/target \ No newline at end of file +/target +.idea \ No newline at end of file diff --git a/src/main/webapp/preview/login.html b/src/main/webapp/preview/login.html new file mode 100644 index 0000000..9b70f8f --- /dev/null +++ b/src/main/webapp/preview/login.html @@ -0,0 +1,131 @@ + + + + Amazon light + + + + + + + + + + + +
+ +
+ +
+ +
+
+

+ Anmeldung +

+
+
+ +
+ +
+ +
+
+ Benutzername: + +
+
+ +
+
+ Passwort: + +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ + + + + + \ No newline at end of file From 7b39ce0ff6bbf95ded548baf2603f96bf702fc04 Mon Sep 17 00:00:00 2001 From: joethei Date: Fri, 22 Mar 2019 11:31:24 +0100 Subject: [PATCH 02/13] slider im katalog --- src/main/webapp/preview/catalog.html | 93 ++++++++- src/main/webapp/preview/css/slick-theme.css | 204 ++++++++++++++++++++ 2 files changed, 288 insertions(+), 9 deletions(-) create mode 100644 src/main/webapp/preview/css/slick-theme.css diff --git a/src/main/webapp/preview/catalog.html b/src/main/webapp/preview/catalog.html index b551310..c66ffcd 100644 --- a/src/main/webapp/preview/catalog.html +++ b/src/main/webapp/preview/catalog.html @@ -21,6 +21,8 @@ + + @@ -47,30 +49,50 @@

Belletristik

-
+ +
Polizei Auto -
Krimis
+
Krimis
Glühbirne -
Thriller
+
Thriller
Rose -
Liebesromane
+
Liebesromane
+
+
+ +
+
+ Adventure +
Abenteuer
+
+
+
+
+ Weltraum +
Science & Fiction
+
+
+
+
+ Fantasy +
Fantasy

Fachbücher

-
+
Tastatur @@ -89,27 +111,66 @@
Medienwissenschaften
+ +
+
+ Microsskope +
Naturwissenschaften
+
+
+
+
+ japanische Schrift +
Sprachen
+
+
+
+
+ Klippen +
Geologie
+
+
+
-

Kinderbücher

+

Ratgeber

2 Kinder beim lesen -
Lesen lernen
+
Kinderbücher
Farben -
Malbücher
+
Kochbücher
Puzzle -
Puzzle
+
Selbsthilfe
+
+
+ +
+
+ Puzzle +
Heimwerken
+
+
+
+
+ Puzzle +
Computer & Internet
+
+
+
+
+ Puzzle +
Reiseführer
@@ -164,5 +225,19 @@ + + + + + + \ No newline at end of file diff --git a/src/main/webapp/preview/css/slick-theme.css b/src/main/webapp/preview/css/slick-theme.css new file mode 100644 index 0000000..1232fca --- /dev/null +++ b/src/main/webapp/preview/css/slick-theme.css @@ -0,0 +1,204 @@ +@charset 'UTF-8'; +/* Slider */ +.slick-loading .slick-list +{ + background: #fff url('./ajax-loader.gif') center center no-repeat; +} + +/* Icons */ +@font-face +{ + font-family: 'slick'; + font-weight: normal; + font-style: normal; + + src: url('./fonts/slick.eot'); + src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg'); +} +/* Arrows */ +.slick-prev, +.slick-next +{ + font-size: 0; + line-height: 0; + + position: absolute; + top: 50%; + + display: block; + + width: 20px; + height: 20px; + padding: 0; + -webkit-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); + + cursor: pointer; + + color: transparent; + border: none; + outline: none; + background: transparent; +} +.slick-prev:hover, +.slick-prev:focus, +.slick-next:hover, +.slick-next:focus +{ + color: transparent; + outline: none; + background: transparent; +} +.slick-prev:hover:before, +.slick-prev:focus:before, +.slick-next:hover:before, +.slick-next:focus:before +{ + opacity: 1; +} +.slick-prev.slick-disabled:before, +.slick-next.slick-disabled:before +{ + opacity: .25; +} + +.slick-prev:before, +.slick-next:before +{ + font-family: 'slick'; + font-size: 20px; + line-height: 1; + + opacity: .75; + color: white; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.slick-prev +{ + left: -25px; +} +[dir='rtl'] .slick-prev +{ + right: -25px; + left: auto; +} +.slick-prev:before +{ + content: '←'; +} +[dir='rtl'] .slick-prev:before +{ + content: '→'; +} + +.slick-next +{ + right: -25px; +} +[dir='rtl'] .slick-next +{ + right: auto; + left: -25px; +} +.slick-next:before +{ + content: '→'; +} +[dir='rtl'] .slick-next:before +{ + content: '←'; +} + +/* Dots */ +.slick-dotted.slick-slider +{ + margin-bottom: 30px; +} + +.slick-dots +{ + position: absolute; + bottom: -25px; + + display: block; + + width: 100%; + padding: 0; + margin: 0; + + list-style: none; + + text-align: center; +} +.slick-dots li +{ + position: relative; + + display: inline-block; + + width: 20px; + height: 20px; + margin: 0 5px; + padding: 0; + + cursor: pointer; +} +.slick-dots li button +{ + font-size: 0; + line-height: 0; + + display: block; + + width: 20px; + height: 20px; + padding: 5px; + + cursor: pointer; + + color: transparent; + border: 0; + outline: none; + background: transparent; +} +.slick-dots li button:hover, +.slick-dots li button:focus +{ + outline: none; +} +.slick-dots li button:hover:before, +.slick-dots li button:focus:before +{ + opacity: 1; +} +.slick-dots li button:before +{ + font-family: 'slick'; + font-size: 6px; + line-height: 20px; + + position: absolute; + top: 0; + left: 0; + + width: 20px; + height: 20px; + + content: '•'; + text-align: center; + + opacity: .25; + color: black; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.slick-dots li.slick-active button:before +{ + opacity: .75; + color: black; +} From 3891268b8df0f9cb61c152435948904799b154f9 Mon Sep 17 00:00:00 2001 From: Julian Hinxlage Date: Fri, 22 Mar 2019 11:31:35 +0100 Subject: [PATCH 03/13] added register.html --- src/main/webapp/preview/register.html | 138 ++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 src/main/webapp/preview/register.html diff --git a/src/main/webapp/preview/register.html b/src/main/webapp/preview/register.html new file mode 100644 index 0000000..fb26bdd --- /dev/null +++ b/src/main/webapp/preview/register.html @@ -0,0 +1,138 @@ + + + + Amazon light + + + + + + + + + + + +
+ +
+ +
+ +
+
+

+ Registrierung +

+
+
+ +
+ +
+ +
+
+ Email: + +
+
+ +
+
+ Benutzername: + +
+
+ +
+
+ Passwort: + +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ + + + + + \ No newline at end of file From 597684ea74224ad540164277146c51c5a50e4950 Mon Sep 17 00:00:00 2001 From: Charlotte Friedemann Date: Fri, 22 Mar 2019 11:31:55 +0100 Subject: [PATCH 04/13] detailpage von den Krimis --- src/main/webapp/preview/detailpage.html | 179 ++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 src/main/webapp/preview/detailpage.html diff --git a/src/main/webapp/preview/detailpage.html b/src/main/webapp/preview/detailpage.html new file mode 100644 index 0000000..c16622f --- /dev/null +++ b/src/main/webapp/preview/detailpage.html @@ -0,0 +1,179 @@ + + + + Amazon light + + + + + + + + + + + +
+ +
+ +
+ +
+ +

Kriminalromane

+
+
+
+ Polizei Auto +
Die Suche
Charlotte Link

+
+
+
+
+ Glühbirne +
Todesschmerz
Tim Svart

+
+
+
+
+ Rose +
Leid und letzter Tag
Elias Haller

+
+
+
+
+ Polizei Auto +
Tiefe Havel
Tim Pieper

+
+
+
+
+
+
+ Polizei Auto +
Wie der Tod so still
Roxann Hill

+
+
+
+
+ Glühbirne +
Erfolgreich tot
Margot Jung

+
+
+
+
+ Rose +
Engelsschlaf
Catherine Shepherd

+
+
+
+
+ Polizei Auto +
Die ewigen Toten
Simon Beckett

+
+
+
+
+
+
+ Polizei Auto +
Die Suche
Charlotte Link

+
+
+
+
+ Glühbirne +
Die Suche
Charlotte Link

+
+
+
+
+ Rose +
Die Suche
Charlotte Link

+
+
+
+
+ Polizei Auto +
Die Suche
Charlotte Link

+
+
+
+ +
+ +
+ + + + + + \ No newline at end of file From 358f80ffe2d0014150213aafa04f800d237c9360 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Fri, 22 Mar 2019 13:06:46 +0100 Subject: [PATCH 05/13] =?UTF-8?q?~=20Katalog=20fertig=20+=20mehr=20maven?= =?UTF-8?q?=20config=20f=C3=BCr=20mariadb,=20gson,=20jsf,=20java=20beans?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Theiner --- pom.xml | 18 ++++++++++++ src/main/webapp/preview/catalog.html | 41 +++++++++++++++------------- src/main/webapp/preview/index.html | 7 +++-- 3 files changed, 45 insertions(+), 21 deletions(-) diff --git a/pom.xml b/pom.xml index b875234..45dab66 100644 --- a/pom.xml +++ b/pom.xml @@ -208,6 +208,13 @@ 4.0.1 provided + + javax.faces + jsf-api + 2.1 + provided + + @@ -223,6 +230,17 @@ 13.0 compile + + com.google.code.gson + gson + 2.8.0 + + + + org.mariadb.jdbc + mariadb-java-client + 2.4.1 + diff --git a/src/main/webapp/preview/catalog.html b/src/main/webapp/preview/catalog.html index c66ffcd..3b6e4fc 100644 --- a/src/main/webapp/preview/catalog.html +++ b/src/main/webapp/preview/catalog.html @@ -48,7 +48,7 @@
-

Belletristik

+

Geschichten

@@ -135,41 +135,41 @@

Ratgeber

-
+
2 Kinder beim lesen -
Kinderbücher
+
Erziehung
- Farben + Pfanne
Kochbücher
- Puzzle + Person auf Gleisen
Selbsthilfe
- Puzzle + Bohrer
Heimwerken
- Puzzle + Laptop
Computer & Internet
- Puzzle + Person mit Karte im Wald
Reiseführer
@@ -186,25 +186,28 @@
-

Contact

+

Amazon light

@@ -217,8 +220,8 @@
-

Your Brand. Copyright © You, - 2017. All rights reserved.

+

Amazon light. Copyright © Amazon, + 2019. All rights reserved.

diff --git a/src/main/webapp/preview/index.html b/src/main/webapp/preview/index.html index e9bfbe0..4da800c 100644 --- a/src/main/webapp/preview/index.html +++ b/src/main/webapp/preview/index.html @@ -1,2 +1,5 @@ -suche -Katalog \ No newline at end of file +suche
+Katalog
+Login
+Registrierung
+Bücherliste \ No newline at end of file From 1acd6b65461a8fd31eb01b9fd485c0b0fedfbcd0 Mon Sep 17 00:00:00 2001 From: joethei Date: Sat, 23 Mar 2019 08:37:31 +0100 Subject: [PATCH 06/13] + Buchdetail Seite --- src/main/webapp/preview/book.html | 169 +++++++++++++++++++++++++++ src/main/webapp/preview/catalog.html | 27 ++--- src/main/webapp/preview/index.html | 3 +- 3 files changed, 185 insertions(+), 14 deletions(-) create mode 100644 src/main/webapp/preview/book.html diff --git a/src/main/webapp/preview/book.html b/src/main/webapp/preview/book.html new file mode 100644 index 0000000..266c350 --- /dev/null +++ b/src/main/webapp/preview/book.html @@ -0,0 +1,169 @@ + + + + Amazon light + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ +
+ Buchcover +
+
+

Your soul is a river

+
+

Nikita Gill

+
+ + Lorem ipsum dolor sit amet, consectetuer adipiscing elit, + sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. + Ut wisi enim ad minim veniam, + quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. + +
+
+
+

19,99 €

+
+ gewöhnlich versandfertig in 2-3 Tagen +
+
+ +
+
+
+
+ +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/preview/catalog.html b/src/main/webapp/preview/catalog.html index 3b6e4fc..9994be6 100644 --- a/src/main/webapp/preview/catalog.html +++ b/src/main/webapp/preview/catalog.html @@ -35,8 +35,8 @@
@@ -102,7 +102,7 @@
Münzen -
Finanzen
+
Wirtschaft
@@ -145,7 +145,7 @@
Pfanne -
Kochbücher
+
Kochen
@@ -186,18 +186,18 @@
-

Amazon light. Copyright © Amazon, +

Amazon light. Copyright © B1, 2019. All rights reserved.

diff --git a/src/main/webapp/preview/index.html b/src/main/webapp/preview/index.html index 4da800c..c33e264 100644 --- a/src/main/webapp/preview/index.html +++ b/src/main/webapp/preview/index.html @@ -2,4 +2,5 @@ Katalog
Login
Registrierung
-Bücherliste \ No newline at end of file +Bücherliste
+Buchdetails \ No newline at end of file From 319c4b64f9f05d1bfffd212e473133893a0bdc24 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Mon, 25 Mar 2019 18:56:05 +0100 Subject: [PATCH 07/13] + Anfang Startseite Signed-off-by: Johannes Theiner --- src/main/webapp/preview/index.html | 1 + src/main/webapp/preview/start.html | 225 +++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 src/main/webapp/preview/start.html diff --git a/src/main/webapp/preview/index.html b/src/main/webapp/preview/index.html index c33e264..dbc6507 100644 --- a/src/main/webapp/preview/index.html +++ b/src/main/webapp/preview/index.html @@ -1,4 +1,5 @@ suche
+Startseite
Katalog
Login
Registrierung
diff --git a/src/main/webapp/preview/start.html b/src/main/webapp/preview/start.html new file mode 100644 index 0000000..cacc4d3 --- /dev/null +++ b/src/main/webapp/preview/start.html @@ -0,0 +1,225 @@ + + + + Amazon light + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+
+
+

Amazon light

+
+
+

Sie haben noch nie ein richtig gutes Buch gelesen ?

+
+
+

Dann können wir auch nicht helfen

+
+
+ + +
+ + +
+
+ +
+
+

Aktuelle Angebote

+ +
+
+
+ Polizei Auto +
20% auf Krimis
+
+
+
+
+ Glühbirne +
10% auf Kochbücher
+
+
+
+
+ Code +
13% auf Code
+
+
+ +
+
+ Adventure +
17% auf Geologie
+
+
+
+
+ Weltraum +
5% auf Romane
+
+
+
+
+ Fantasy +
4% auf nichts
+
+
+ +
+
+ Adventure +
1% auf alles
+
+
+
+
+ Weltraum +
3% auf BGB
+
+
+
+
+ Fantasy +
100% auf alles
+
+
+
+
+
+ +
+ + + + + + + + + + + + \ No newline at end of file From 77591be6052f76949fc4551ade236ee51a680471 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Mon, 25 Mar 2019 19:57:25 +0100 Subject: [PATCH 08/13] + Startseite fertig Signed-off-by: Johannes Theiner --- src/main/webapp/preview/start.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/preview/start.html b/src/main/webapp/preview/start.html index cacc4d3..1f986d2 100644 --- a/src/main/webapp/preview/start.html +++ b/src/main/webapp/preview/start.html @@ -35,7 +35,7 @@ + + @@ -156,10 +160,25 @@ - @@ -32,15 +19,48 @@
@@ -227,6 +247,8 @@
+ + @@ -234,12 +256,27 @@ diff --git a/src/main/webapp/preview/confirmation.html b/src/main/webapp/preview/confirmation.html index d27306f..418faea 100644 --- a/src/main/webapp/preview/confirmation.html +++ b/src/main/webapp/preview/confirmation.html @@ -3,28 +3,14 @@ Amazon light - - - + @@ -35,7 +21,7 @@
@@ -164,6 +166,8 @@
+ + @@ -171,6 +175,21 @@ - - + @@ -55,6 +41,22 @@ +
    +
  1. + +
      +
    1. Dark Theme +
      + + +
      +
    2. +
    +
  2. +
@@ -212,6 +214,21 @@ - + + @@ -30,15 +19,48 @@
@@ -136,44 +158,79 @@
-

Your Brand. Copyright © You, - 2017. All rights reserved.

+

Amazon light. Copyright © B1, + 2019. All rights reserved.

+ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/preview/index.html b/src/main/webapp/preview/index.html index 638daa0..1e35b4f 100644 --- a/src/main/webapp/preview/index.html +++ b/src/main/webapp/preview/index.html @@ -4,4 +4,5 @@ Registrierung
Bücherliste
Buchdetails
-Bestätigung
\ No newline at end of file +Bestätigung
+Warenkorb
\ No newline at end of file diff --git a/src/main/webapp/preview/login.html b/src/main/webapp/preview/login.html index 9b70f8f..623393a 100644 --- a/src/main/webapp/preview/login.html +++ b/src/main/webapp/preview/login.html @@ -3,24 +3,13 @@ Amazon light - - + + @@ -30,15 +19,48 @@
@@ -88,44 +110,79 @@
-

Your Brand. Copyright © You, - 2017. All rights reserved.

+

Amazon light. Copyright © B1, + 2019. All rights reserved.

+ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/preview/orderinfo.html b/src/main/webapp/preview/orderinfo.html new file mode 100644 index 0000000..16665f8 --- /dev/null +++ b/src/main/webapp/preview/orderinfo.html @@ -0,0 +1,358 @@ + + + + Amazon light + + + + + + + + + + + + + + + + +
+

All form fields are required.

+ +
+
+ + + + + + + + + +
+
+
+ +
+

All form fields are required.

+ +
+
+ + + + + + + + + +
+
+
+ +
+ +
+ +
+ +
+

Addresse

+
+
+
+ Max Mustermann
+ Musterstraße 42
+ 12345 Musterstadt +
+
+
+
+ Max Mustermann
+ Musterstraße 43
+ 12345 Musterstadt +
+
+
+
+ Max Mustermann
+ Musterstraße 45
+ 12345 Musterstadt +
+
+
+
+ Max Mustermann
+ Musterstraße 1
+ 12345 Musterstadt +
+
+
+
+
+
+ Max Mustermann
+ Musterstraße 30
+ 12345 Musterstadt +
+
+
+
+ +
+
+
+ +

Zahlungsart

+ +
+
+
+ PayPal
+ m••••••@•••••.de +
+
+
+
+ Bankeinzug
+ IBAN: 12345••••••••••••••••••••••••111
+ Inhaber: Max Mustermann +
+
+
+
+ +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/preview/register.html b/src/main/webapp/preview/register.html index fb26bdd..8fb71cd 100644 --- a/src/main/webapp/preview/register.html +++ b/src/main/webapp/preview/register.html @@ -3,24 +3,13 @@ Amazon light - - + + @@ -30,15 +19,48 @@
@@ -95,44 +117,79 @@
-

Your Brand. Copyright © You, - 2017. All rights reserved.

+

Amazon light. Copyright © B1, + 2019. All rights reserved.

+ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/preview/shoppingcart.html b/src/main/webapp/preview/shoppingcart.html new file mode 100644 index 0000000..ccd201c --- /dev/null +++ b/src/main/webapp/preview/shoppingcart.html @@ -0,0 +1,234 @@ + + + + Amazon light + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+
+ Buchcover +
+
+

Your soul is a river - Nikita Gill

+
+
+
+

19,99 €

+
+
+
+ +
+
+
+
+ Entfernen +
+
+
+
+
+
+ Buchcover +
+
+

Your soul is a river - Nikita Gill

+
+
+
+

19,99 €

+
+
+
+ +
+
+
+
+ Entfernen +
+
+
+
+
+
+ Buchcover +
+
+

Your soul is a river - Nikita Gill

+
+
+
+

19,99 €

+
+
+
+ +
+
+
+
+ Entfernen +
+
+
+
+ +
+
+

Summe(3 Items): 99,95 €

+
+
+ +
+ +
+
+ +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/preview/start.html b/src/main/webapp/preview/start.html index 0e62712..b8ba79f 100644 --- a/src/main/webapp/preview/start.html +++ b/src/main/webapp/preview/start.html @@ -29,15 +29,13 @@
  1. Katalog
  2. -
  3. (1) Warenkorb
  4. +
  5. Warenkorb
  1. - Mein Account + Anmelden
      -
    1. Meine Bestellungen
    2. -
    3. Adressen & Konten
    4. -
    5. Abmelden
    6. +
    7. Registrieren
@@ -70,7 +68,7 @@
-

Amazon light

+

Amazon light

Sie haben noch nie ein richtig gutes Buch gelesen ?

@@ -80,7 +78,7 @@

-
+
Zum Katalog @@ -217,16 +215,17 @@ function changeTheme() { if(document.getElementById('myonoffswitch').checked) { - swapStyleSheet("dark", "#22272e"); + swapStyleSheet("dark", "#22272e", "8muUTAmcWU4"); }else { - swapStyleSheet("light", "#cb4b16"); + swapStyleSheet("light", "#cb4b16", "o0Qqw21-0NI"); } } - function swapStyleSheet(sheet, color) { + function swapStyleSheet(sheet, color, image) { document.getElementById("pagestyle").setAttribute("href", "css/m-" + sheet + ".css"); document.getElementById("pagecolor").setAttribute("content", color); + document.getElementById("m-landing-image").style.backgroundImage = "url('https://source.unsplash.com/" + image + "/1920x1280')"; } $(document).ready(function () { From 6bbd6346c36ab83ff43211c57cc399c4e86d3326 Mon Sep 17 00:00:00 2001 From: joethei Date: Fri, 5 Apr 2019 10:08:06 +0200 Subject: [PATCH 13/13] Orderinfo fertig --- src/main/webapp/preview/index.html | 3 +- src/main/webapp/preview/orderinfo.html | 103 ++++++++++--------------- 2 files changed, 43 insertions(+), 63 deletions(-) diff --git a/src/main/webapp/preview/index.html b/src/main/webapp/preview/index.html index 1e35b4f..e80215c 100644 --- a/src/main/webapp/preview/index.html +++ b/src/main/webapp/preview/index.html @@ -5,4 +5,5 @@ Bücherliste
Buchdetails
Bestätigung
-Warenkorb
\ No newline at end of file +Warenkorb
+Bestellinfos \ No newline at end of file diff --git a/src/main/webapp/preview/orderinfo.html b/src/main/webapp/preview/orderinfo.html index 16665f8..5c7b3db 100644 --- a/src/main/webapp/preview/orderinfo.html +++ b/src/main/webapp/preview/orderinfo.html @@ -18,17 +18,15 @@ -
-

All form fields are required.

- +
- - - - - + + + + + @@ -36,17 +34,15 @@
-
-

All form fields are required.

- +
- - - - - - + + + + + + @@ -260,7 +256,7 @@ $( function() { - var dialog, form, + var address, account, account_form, address_form, // From http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29 emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, @@ -270,26 +266,6 @@ allFields = $( [] ).add( name ).add( email ).add( password ), tips = $( ".validateTips" ); - function updateTips( t ) { - tips - .text( t ) - .addClass( "ui-state-highlight" ); - setTimeout(function() { - tips.removeClass( "ui-state-highlight", 1500 ); - }, 500 ); - } - - function checkLength( o, n, min, max ) { - if ( o.val().length > max || o.val().length < min ) { - o.addClass( "ui-state-error" ); - updateTips( "Length of " + n + " must be between " + - min + " and " + max + "." ); - return false; - } else { - return true; - } - } - function checkRegexp( o, regexp, n ) { if ( !( regexp.test( o.val() ) ) ) { o.addClass( "ui-state-error" ); @@ -301,35 +277,16 @@ } function addUser() { - var valid = true; - allFields.removeClass( "ui-state-error" ); - valid = valid && checkLength( name, "username", 3, 16 ); - valid = valid && checkLength( email, "email", 6, 80 ); - valid = valid && checkLength( password, "password", 5, 16 ); - - valid = valid && checkRegexp( name, /^[a-z]([0-9a-z_\s])+$/i, "Username may consist of a-z, 0-9, underscores, spaces and must begin with a letter." ); - valid = valid && checkRegexp( email, emailRegex, "eg. ui@jquery.com" ); - valid = valid && checkRegexp( password, /^([0-9a-zA-Z])+$/, "Password field only allow : a-z 0-9" ); - - if ( valid ) { - $( "#users tbody" ).append( "" + - "" + name.val() + "" + - "" + email.val() + "" + - "" + password.val() + "" + - "" ); - dialog.dialog( "close" ); - } - return valid; } - dialog = $( "#add-account-form" ).dialog({ + address = $( "#add-address-form" ).dialog({ autoOpen: false, height: 400, width: 350, modal: true, buttons: { - "Create an account": addUser, + "hinzufügen": addUser, Cancel: function() { dialog.dialog( "close" ); } @@ -340,16 +297,38 @@ } }); - form = dialog.find( "form" ).on( "submit", function( event ) { + account = $( "#add-account-form" ).dialog({ + autoOpen: false, + height: 400, + width: 350, + modal: true, + buttons: { + "hinzufügen": addUser, + Cancel: function() { + dialog.dialog( "close" ); + } + }, + close: function() { + form[ 0 ].reset(); + allFields.removeClass( "ui-state-error" ); + } + }); + + account_form = account.find( "form" ).on( "submit", function( event ) { + event.preventDefault(); + addUser(); + }); + + address_form = account.find( "form" ).on( "submit", function( event ) { event.preventDefault(); addUser(); }); $( "#add-account" ).button().on( "click", function() { - dialog.dialog( "open" ); + account.dialog( "open" ); }); $( "#add-address" ).button().on( "click", function() { - dialog.dialog( "open" ); + address.dialog( "open" ); }); } );