From f69a9571c08185e920ccf2d7d264686096bade46 Mon Sep 17 00:00:00 2001 From: Will Larson Date: Mon, 7 Jul 2008 13:44:48 +0900 Subject: [PATCH] Added ability to edit body of a tag. The implementation is a bit sloppy, and will likely need to be revisted by the touchup fairy, but at least the raw functionality is now accessible. --- templates/lifeflow/editor/comments.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/templates/lifeflow/editor/comments.html b/templates/lifeflow/editor/comments.html index 0ae772b..367dc18 100644 --- a/templates/lifeflow/editor/comments.html +++ b/templates/lifeflow/editor/comments.html @@ -7,6 +7,16 @@ var id = "#comment_" + pk; $(id).fadeOut('slow'); } +var update_comment = function(pk) { + var data = { body:$("#"+pk).val() } + update_model("comment", pk, data); +} + +$(document).ready(function() { + $("textarea").hover(function(){},function(){ update_comment(this.id); }); +}); + +
@@ -24,7 +34,11 @@
  • {{ comment.name }} ({{ comment.email }}) at {{ comment.date }} on {{ comment.entry }}.

    -

    {{ comment.html|safe }}

    + {% ifequal comment.body "" %} +

    {{ comment.html|safe }}

    + {% else %} + + {% endifequal %}