mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-10 07:25:50 +01:00
Fix template file names.
This commit is contained in:
33
src/main/twirl/issues/editcomment.scala.html
Normal file
33
src/main/twirl/issues/editcomment.scala.html
Normal file
@@ -0,0 +1,33 @@
|
||||
@(content: String, commentId: Int, owner: String, repository: String)(implicit context: app.Context)
|
||||
@import context._
|
||||
<span id="error-edit-content-@commentId" class="error"></span>
|
||||
<textarea style="width: 730px; height: 100px;" id="edit-content-@commentId">@content</textarea>
|
||||
<input type="button" class="btn btn-small" value="Update Comment"/>
|
||||
<span class="pull-right"><a class="btn btn-small btn-danger" href="#">Cancel</a></span>
|
||||
<script>
|
||||
$(function(){
|
||||
var callback = function(data){
|
||||
$('#commentContent-@commentId').empty().html(data.content);
|
||||
};
|
||||
|
||||
$('#commentContent-@commentId input.btn').click(function(){
|
||||
$.ajax({
|
||||
url: '@path/@owner/@repository/issue_comments/edit/@commentId',
|
||||
type: 'POST',
|
||||
data: {
|
||||
issueId : 0, // TODO
|
||||
content : $('#edit-content-@commentId').val()
|
||||
}
|
||||
}).done(
|
||||
callback
|
||||
).fail(function(req) {
|
||||
$('#error-edit-content-@commentId').text($.parseJSON(req.responseText).content);
|
||||
});
|
||||
});
|
||||
|
||||
$('#commentContent-@commentId a.btn').click(function(){
|
||||
$.get('@path/@owner/@repository/issue_comments/_data/@commentId', callback);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user