diff --git a/progit/static/progit.css b/progit/static/progit.css index a9806d9..e769b94 100644 --- a/progit/static/progit.css +++ b/progit/static/progit.css @@ -665,3 +665,8 @@ ul.changes { .header { padding: .5em 0; } + +.reply { + cursor: pointer; + padding-right: 1em; +} diff --git a/progit/templates/issue.html b/progit/templates/issue.html index c62f734..d332adf 100644 --- a/progit/templates/issue.html +++ b/progit/templates/issue.html @@ -11,6 +11,11 @@ {{ user.user }} - {{ date | humanize}} +
{% autoescape false %} @@ -113,6 +118,20 @@ $(function() { } } ); + + $( ".reply" ).click( + function() { + var _section = $(this).parent().parent().parent(); + var _comment = _section.find('.comment_body'); + var _text = _comment.text().split("\n"); + var _output = new Array(); + for (cnt = 0; cnt < _text.length - 1; cnt ++) { + _output[cnt] = '> ' + jQuery.trim(_text[cnt + 1]); + } + $( "#comment" ).val(_output.join("\n")); + } + ); + }); {% endblock %}