Create issue comment.

This commit is contained in:
shimamoto
2013-06-24 19:57:16 +09:00
parent 36e5b11ec0
commit ecd049092e
3 changed files with 34 additions and 9 deletions

View File

@@ -19,15 +19,13 @@
@markdown(issue.content getOrElse "No description given.", repository, false, true, true)
</div>
</div>
<form action="@path/@repository.owner/@repository.name/issue_comments" method="POST">
<span id="comment-area"></span>
<div class="box">
<div class="box-content">
@html.preview(repository, "", false, true, true, "width: 730px; height: 100px;")
</div>
</div>
<input type="hidden" name="issueId" value="@issue.issueId"/>
<input type="submit" class="btn btn-success" value="Comment"/>
</form>
<input type="button" class="btn btn-success" value="Comment" id="comment"/>
</div>
<div class="span2">
@if(issue.closed) {
@@ -40,4 +38,18 @@
<strong>Labels</strong>
</div>
</div>
}
}
<script>
$(function(){
$('#comment').click(function(){
$.post('@path/@repository.owner/@repository.name/issue_comments',
{
issueId : @issue.issueId,
content : $('#content').val()
},
function(data){
$('#comment-area').html(data.content);
});
});
});
</script>