@ -52,6 +53,30 @@ function saveLocation(locationID) {
});
}
functiondeleteLocation(locationID){
if(locationID<0)
alert('Congratulations! You found the secret UI bug easter egg! This button should not be here, yet I left it specifically because I wanted an easter egg and not because of any other reasons! Good for you!')
return;
if(!confirm('Delete the selected location? If there are parts there, this will leave a mess in the database and Marek will be very sad.'))
return;
$.ajax({
url:rootURL+'deleteLocation/'+locationID,
type:'GET',
cache:false,
contentType:false,
processData:false,
success:function(){
alert("location removed.");
overlay_out();
location.reload();
},
fail:function(){
console.log('An error occurred while deleting the entry');