mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-06 07:40:01 +01:00
Fix comment editing in pull request diff view
This commit is contained in:
@@ -210,7 +210,7 @@ $(function(){
|
||||
$(document).on('click', '.commit-comment-box i.octicon-pencil', function(){
|
||||
var id = $(this).closest('a').data('comment-id');
|
||||
var url = '@url(repository)/commit_comments/_data/' + id;
|
||||
var $content = $('.commit-commentContent-' + id, $(this).closest('.box'));
|
||||
var $content = $('.commit-commentContent-' + id, $(this).closest('.commit-comment-box'));
|
||||
|
||||
$.get(url,
|
||||
{
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
Merge pull request #@issue.issueId from @{pullreq.requestUserName}/@{pullreq.requestBranch}
|
||||
</div>
|
||||
<span id="error-message" class="error"></span>
|
||||
<textarea name="message" style="width: 635px; height: 80px;">@issue.title</textarea>
|
||||
<textarea name="message" style="height: 80px;" class="form-control">@issue.title</textarea>
|
||||
<div>
|
||||
<input type="button" class="btn" value="Cancel" id="cancel-merge-pull-request"/>
|
||||
<input type="submit" class="btn btn-success" value="Confirm merge"/>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
@import context._
|
||||
<span class="error-edit-content-@commentId error"></span>
|
||||
@helper.html.attached(owner, repository){
|
||||
<textarea style="width: 635px; height: 100px;" id="edit-content-@commentId">@content</textarea>
|
||||
<textarea style="height: 100px;" id="edit-content-@commentId" class="form-control">@content</textarea>
|
||||
}
|
||||
<div>
|
||||
<input type="button" class="cancel-comment-@commentId btn btn-small btn-danger" value="Cancel"/>
|
||||
<input type="button" class="update-comment-@commentId btn btn-small pull-right" value="Update comment"/>
|
||||
<input type="button" class="update-comment-@commentId btn btn-small btn-default pull-right" value="Update comment"/>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -19,7 +19,7 @@ $(function(){
|
||||
}
|
||||
|
||||
$(document).on('click', '.update-comment-@commentId', function(){
|
||||
$box = $(this).closest('.box');
|
||||
$box = $(this).closest('.commit-comment-box');
|
||||
$('.update-comment-@commentId, .cancel-comment-@commentId', $box).attr('disabled', 'disabled');
|
||||
$.ajax({
|
||||
url: '@path/@owner/@repository/commit_comments/edit/@commentId',
|
||||
|
||||
Reference in New Issue
Block a user