From 2589f1e270b4cc2cc8bb83ffd0d770feaedffc72 Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 7 Jun 2016 18:06:40 +0200 Subject: allow editing --- templates/index.html | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'templates/index.html') diff --git a/templates/index.html b/templates/index.html index 1394f53..e49514a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -76,17 +76,31 @@ {{ joke.reports }} + +
+ {% if joke.mine %} +
+ + + +
+ + + +
+
+ {% endif %} +
+ {{ joke.html|safe }} +
{% if joke.mine %}
- +
{% endif %}
-
- {{ joke.text|safe }} -
{% endfor %} @@ -119,6 +133,11 @@ $(document).ready(function() { $('#main').smoothState({prefetch: true}); }); + function openEditor(me) { + var joke = $(me).closest('.joke'); + $('.editor', joke).removeClass('hide'); + $('.noteditor', joke).addClass('hide'); + } -- cgit v1.3.1