Skip to content
Snippets Groups Projects
Commit 7db253ba authored by Florian Fittkau's avatar Florian Fittkau
Browse files

delete tasks

parent dddf61c9
No related branches found
No related tags found
No related merge requests found
......@@ -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();
});
}
},
'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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment