mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 06:25:51 +01:00
(refs #246)Fix issue editing
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
<input type="text" style="width: 680px;" id="edit-title" value="@title"/>
|
<input type="text" style="width: 680px;" id="edit-title" value="@title"/>
|
||||||
<textarea style="width: 680px; height: 100px; max-height: 300px;" id="edit-content">@content.getOrElse("")</textarea>
|
<textarea style="width: 680px; height: 100px; max-height: 300px;" id="edit-content">@content.getOrElse("")</textarea>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" class="btn btn-small">Update Issue</button>
|
<input type="button" id="update" class="btn btn-small" value="Update Issue"/>
|
||||||
<button type="button" class="btn btn-small btn-danger pull-right">Cancel</button>
|
<input type="button" id="cancel" class="btn btn-small btn-danger pull-right" value="Cancel"/>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
@@ -16,7 +16,7 @@ $(function(){
|
|||||||
$('#issueContent').empty().html(data.content);
|
$('#issueContent').empty().html(data.content);
|
||||||
};
|
};
|
||||||
|
|
||||||
$('#issueContent input.btn').click(function(){
|
$('#update').click(function(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '@path/@owner/@repository/issues/edit/@issueId',
|
url: '@path/@owner/@repository/issues/edit/@issueId',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@@ -31,7 +31,7 @@ $(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#issueContent a.btn').click(function(){
|
$('#cancel').click(function(){
|
||||||
$.get('@path/@owner/@repository/issues/_data/@issueId', callback);
|
$.get('@path/@owner/@repository/issues/_data/@issueId', callback);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user