aboutsummaryrefslogtreecommitdiff
path: root/quotes/public
diff options
context:
space:
mode:
Diffstat (limited to 'quotes/public')
-rw-r--r--quotes/public/index.html12
-rw-r--r--quotes/public/script.js3
-rw-r--r--quotes/public/style.css4
3 files changed, 11 insertions, 8 deletions
diff --git a/quotes/public/index.html b/quotes/public/index.html
index b2e4fa2..ae95468 100644
--- a/quotes/public/index.html
+++ b/quotes/public/index.html
@@ -32,17 +32,17 @@
</form>
<button id="open_TGI13.1">TGI13.1</button>
- <ul style="display: none;" id="TGI13.1"></ul>
+ <ul style="display: none" id="TGI13.1"></ul>
<button id="open_TGI13.2">TGI13.2</button>
- <ul style="display: none;" id="TGI13.2"></ul>
+ <ul style="display: none" id="TGI13.2"></ul>
<button id="open_TGM13.1">TGM13.1</button>
- <ul style="display: none;" id="TGM13.1"></ul>
+ <ul style="display: none" id="TGM13.1"></ul>
<button id="open_TGM13.2">TGM13.2</button>
- <ul style="display: none;" id="TGM13.2"></ul>
+ <ul style="display: none" id="TGM13.2"></ul>
<button id="open_TGTM13.1">TGTM13.1</button>
- <ul style="display: none;" id="TGTM13.1"></ul>
+ <ul style="display: none" id="TGTM13.1"></ul>
<button id="open_teacher">Lehrer</button>
- <ul style="display: none;" id="teacher"></ul>
+ <ul style="display: none" id="teacher"></ul>
</main>
<script src="script.js" charset="utf-8"></script>
diff --git a/quotes/public/script.js b/quotes/public/script.js
index cf3229a..3e6f52e 100644
--- a/quotes/public/script.js
+++ b/quotes/public/script.js
@@ -29,12 +29,13 @@ function appendQuote(response) {
"beforeend",
`<li>${elem["name"]} ${elem["middlename"] ? elem["middlename"] + " " : ""}${elem["surname"]}: ${
elem["quote"]
- }${elem["owner"] ? ' <span data-id="' + elem["id"] + '">[x]</span></li>' : ""}`,
+ }${elem["owner"] ? ' <span data-id="' + elem["id"] + '"></span></li>' : ""}`,
);
const span = document.querySelector(`li span[data-id="${elem["id"]}"]`);
if (span)
span.addEventListener("click", (event) => {
+ if (!confirm("Bist du dir sicher, dass du das Zitat löschen willst?")) return;
fetch("api/delete/" + event.target.getAttribute("data-id"), { method: "DELETE" })
.then((response) => response.text())
.then((response) => {
diff --git a/quotes/public/style.css b/quotes/public/style.css
index a4eaf19..f098bda 100644
--- a/quotes/public/style.css
+++ b/quotes/public/style.css
@@ -46,8 +46,10 @@ li {
span {
float: right;
- color: red;
cursor: pointer;
+ background: url("/feather/icons/trash.svg") no-repeat center;
+ width: 30px;
+ height: 30px;
}
input,