diff --git a/README.md b/README.md index 26c4aad..48e0c71 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,9 @@ # Development python manage.py runserver - # Log in with username 'test@example.com' and password 'test' \ No newline at end of file + # Log in with username 'test@example.com' and password 'test' + +# TODO + - new list button with form + - ajax spinner (sircon is slow) + - wire up rest of interface. \ No newline at end of file diff --git a/mailadmin/static/app/scripts/main.js b/mailadmin/static/app/scripts/main.js index aadfbcf..13b039b 100644 --- a/mailadmin/static/app/scripts/main.js +++ b/mailadmin/static/app/scripts/main.js @@ -24,5 +24,9 @@ $(document).ready(function() { }); $(".forwards-container").html(forward_html); + + $("input[name=fwd-delete]").click(function() { + $(this).parent().parent().toggleClass('danger'); + }); }); }); \ No newline at end of file diff --git a/mailadmin/static/app/templates/list.html b/mailadmin/static/app/templates/list.html index 1bdd3de..b1df4dc 100644 --- a/mailadmin/static/app/templates/list.html +++ b/mailadmin/static/app/templates/list.html @@ -1,8 +1,8 @@ {% for list,members in lists %}
-
{{ list }}
- +
{{ list }} {{members|length}}
+
@@ -13,9 +13,9 @@ {% for member in members %} {% endfor %} - +
Medlem
{{ member.forward }}
+
-
diff --git a/mailadmin/static/dist/scripts/main.js b/mailadmin/static/dist/scripts/main.js index aadfbcf..13b039b 100644 --- a/mailadmin/static/dist/scripts/main.js +++ b/mailadmin/static/dist/scripts/main.js @@ -24,5 +24,9 @@ $(document).ready(function() { }); $(".forwards-container").html(forward_html); + + $("input[name=fwd-delete]").click(function() { + $(this).parent().parent().toggleClass('danger'); + }); }); }); \ No newline at end of file diff --git a/mailadmin/static/dist/templates/list.js b/mailadmin/static/dist/templates/list.js index 45a2c0c..7155583 100644 --- a/mailadmin/static/dist/templates/list.js +++ b/mailadmin/static/dist/templates/list.js @@ -22,7 +22,9 @@ frame.set("loop.last", t_1 === t_2 - 1); frame.set("loop.length", t_2); output += "\n
\n\t
\n\t
"; output += runtime.suppressValue(t_4, env.autoesc); -output += "
\n\t\t\n\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t \n\t \n\t \n\t\t\t"; +output += " "; +output += runtime.suppressValue(env.getFilter("length").call(context, t_5), env.autoesc); +output += "\n\t\t
MedlemSlett
\n\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t \n\t \n\t \n\t\t\t"; frame = frame.push(); var t_8 = t_5; if(t_8) {var t_7 = t_8.length; @@ -47,7 +49,7 @@ output += "\">\n\t\t\t"; } } frame = frame.pop(); -output += "\n\t\t\t\t\n\t\t\t\n\t\t
MedlemSlett
\n\t\t\t\t
\n\t\t\t\t
\n\t
\n
\n"; +output += "\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\n\t\t\n\t
\n\n"; ; } } else { @@ -67,7 +69,9 @@ frame.set("loop.last", t_1 === t_2 - 1); frame.set("loop.length", t_2); output += "\n
\n\t
\n\t
"; output += runtime.suppressValue(t_10, env.autoesc); -output += "
\n\t\t\n\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t \n\t \n\t \n\t\t\t"; +output += " "; +output += runtime.suppressValue(env.getFilter("length").call(context, t_11), env.autoesc); +output += "\n\t\t
MedlemSlett
\n\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t \n\t \n\t \n\t\t\t"; frame = frame.push(); var t_14 = t_11; if(t_14) {var t_13 = t_14.length; @@ -92,7 +96,7 @@ output += "\">\n\t\t\t"; } } frame = frame.pop(); -output += "\n\t\t\t\t\n\t\t\t\n\t\t
MedlemSlett
\n\t\t\t\t
\n\t\t\t\t
\n\t
\n
\n"; +output += "\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\n"; ; } } diff --git a/mailadmin/templates/base.html b/mailadmin/templates/base.html index c92e4c4..f53d92d 100644 --- a/mailadmin/templates/base.html +++ b/mailadmin/templates/base.html @@ -3,7 +3,7 @@ - {% block "title" %}{% endblock %} + {% block "title" %}Email admin{% endblock %} diff --git a/mailadmin/templates/home.html b/mailadmin/templates/home.html index 8c7ae28..73ef35b 100644 --- a/mailadmin/templates/home.html +++ b/mailadmin/templates/home.html @@ -2,6 +2,7 @@ {% load bootstrap %} {% block "body" %}
+
{% if not user.is_authenticated %}
{{ form|bootstrap }} @@ -12,11 +13,10 @@
Hei, {{ user.username }}
Logg ut. {% endif %} -
-
-
+
+
+
+
API
- -
{% endblock %} \ No newline at end of file