Commit 7db253ba authored by Florian Fittkau's avatar Florian Fittkau

delete tasks

parent dddf61c9
......@@ -65,7 +65,10 @@ class UserStoryController {
}
def deleteTask(int taskId) {
Task.get(taskId).delete()
def task = Task.get(taskId)
task.delete()
render ""
}
def createTask(int userStoryId) {
......
......@@ -18,15 +18,20 @@ class ShowTaskDialogTagLib {
modal: true,
buttons: {
'Save': function() {
var bValid = true;
if ( bValid ) {
\$.ajax({
url: "/scrumboard/userStory/updateTask?" + \$('#showTaskForm').serialize()
}).done(function ( data ) {
\$( '#dialog-showTask' ).dialog( 'close' );
location.reload();
});
}
\$.ajax({
url: "/scrumboard/userStory/updateTask?" + \$('#showTaskForm').serialize()
}).done(function ( data ) {
\$( '#dialog-showTask' ).dialog( 'close' );
location.reload();
});
},
'Delete': function() {
\$.ajax({
url: "/scrumboard/userStory/deleteTask?taskId=" + \$('#taskId').val()
}).done(function ( data ) {
\$( '#dialog-showTask' ).dialog( 'close' );
location.reload();
});
},
Cancel: function() {
\$( this ).dialog( 'close' );
......
<g:form action="none" name="showTaskForm">
<input type="hidden" name="taskId" value="${task.id}" />
<input type="hidden" id="taskId" name="taskId" value="${task.id}" />
<table>
<tbody>
<tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment