(refs #246)Fix issue editing

This commit is contained in:
takezoe
2014-01-18 01:52:34 +09:00
parent 226a8af262
commit ccc1e9bc8b

View File

@@ -4,8 +4,8 @@
<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>
<div>
<button type="button" class="btn btn-small">Update Issue</button>
<button type="button" class="btn btn-small btn-danger pull-right">Cancel</button>
<input type="button" id="update" class="btn btn-small" value="Update Issue"/>
<input type="button" id="cancel" class="btn btn-small btn-danger pull-right" value="Cancel"/>
</div>
<script>
$(function(){
@@ -16,7 +16,7 @@ $(function(){
$('#issueContent').empty().html(data.content);
};
$('#issueContent input.btn').click(function(){
$('#update').click(function(){
$.ajax({
url: '@path/@owner/@repository/issues/edit/@issueId',
type: 'POST',
@@ -31,7 +31,7 @@ $(function(){
});
});
$('#issueContent a.btn').click(function(){
$('#cancel').click(function(){
$.get('@path/@owner/@repository/issues/_data/@issueId', callback);
return false;
});