From 1c84a63e66bcf3d1ab82b85af012119d563e131c Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Fri, 15 Apr 2022 19:31:15 +0200 Subject: [PATCH] working on list management scripts --- .../widerhall/data/MailingList.java | 1 + static/templates/js.st | 28 +++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/main/java/de/srsoftware/widerhall/data/MailingList.java b/src/main/java/de/srsoftware/widerhall/data/MailingList.java index a368612..3d7cc14 100644 --- a/src/main/java/de/srsoftware/widerhall/data/MailingList.java +++ b/src/main/java/de/srsoftware/widerhall/data/MailingList.java @@ -21,6 +21,7 @@ public class MailingList { private static final String SMTP_USER = "smtp_user"; private static final String SMTP_PASS = "smtp_pass"; private static final int ENABLED = 1; + private static final int PUBLIC = 2; private final String name; private final String email; public static final String TABLE_NAME = "Lists"; diff --git a/static/templates/js.st b/static/templates/js.st index 0218b35..5b228a6 100644 --- a/static/templates/js.st +++ b/static/templates/js.st @@ -10,6 +10,10 @@ function enableList(listEmail){ console.log('enableList('+listEmail+')'); } +function hideList(listEmail){ + console.log('hideList('+listEmail+')'); +} + function loadListList(){ $.getJSON("/api/list/list", showListList); } @@ -18,24 +22,30 @@ function loadUserList(){ $.getJSON("/api/user/list", showUserList); } +function showList(listEmail){ + console.log('showList('+listEmail+')'); +} + function showListList(data){ for (let i in data.lists){ let list = data.lists[i]; let row = $(''); - let drop = $('