Skip to content
Snippets Groups Projects
Commit ebcb75b1 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

client: v1.0.6; Fixed #36 - client: cancel deletion is deleting the corresponding item

parent f0b93a27
Branches
Tags
No related merge requests found
......@@ -35,38 +35,22 @@ $(document).ready(function()
$('.button-delete-roadmap').click(function(event)
{
var response = confirm("Do you really want to delete this roadmap?");
if(response === true)
{
header("location: " + this.href);
}
confirmDelete("Do you really want to delete this roadmap?", this.href, event);
});
$('.button-delete-milestone').click(function(event)
{
var response = confirm("Do you really want to delete this milestone?");
if(response === true)
{
header("location: " + this.href);
}
confirmDelete("Do you really want to delete this milestone?", this.href, event);
});
$('.button-delete-task').click(function(event)
{
var response = confirm("Do you really want to delete this task?");
if(response === true)
{
header("location: " + this.href);
}
confirmDelete("Do you really want to delete this task?", this.href, event);
});
$('.button-delete-subtask').click(function(event)
{
var response = confirm("Do you really want to delete this subtask?");
if(response === true)
{
header("location: " + this.href);
}
confirmDelete("Do you really want to delete this subtask?", this.href, event);
});
$('#checkbox-done').click(function()
......@@ -96,6 +80,19 @@ $(document).ready(function()
createTrainMap();
});
function confirmDelete(message, redirectURL, event)
{
var response = confirm(message);
if(response === true)
{
header("location: " + redirectURL);
}
else
{
event.preventDefault();
}
}
function isNull(object)
{
return object === "" || object === undefined;
......
{
"version": {
"name": "v1.0.5",
"code": 6,
"date": "25.09.19"
"name": "v1.0.6",
"code": 7,
"date": "27.09.19"
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment