Commit 0e028f7e authored by Dominik Rosiek's avatar Dominik Rosiek

zaraz umre, przynajmniej po śniadaniu

parent 601647cd
...@@ -59,4 +59,15 @@ function show_beacons_list(){ ...@@ -59,4 +59,15 @@ function show_beacons_list(){
$("#container2__").html(html.join("")); $("#container2__").html(html.join(""));
} }
}); });
}
function removeProject(event, id){
event.stopPropagation();
$.ajax({
url: "/api/user_project/" + project_id,
type: 'DELETE',
success: function(result) {
document.location.reload()
}
});
} }
\ No newline at end of file
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="info"> <div class="info">
<h4 class="text-center">{{ project.name }}</h4> <h4 class="text-center">{{ project.name }}</h4>
<p>{{ project.description }}</p> <p>{{ project.description }}</p>
<button type="button" class="btn btn-danger">Delete</button> <button type="button" class="btn btn-danger" onclick="removeProject(event, {{ project.id }})">Delete</button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -19,4 +19,23 @@ ...@@ -19,4 +19,23 @@
}); });
</script> </script>
<script async defer <script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAaYyVEcLFqwKP_VnzfRSIMkWWWrLtMiGQ&signed_in=true"></script> src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAaYyVEcLFqwKP_VnzfRSIMkWWWrLtMiGQ&signed_in=true"></script>
\ No newline at end of file
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body" id="modal-content">
</div>
<div class="modal-footer" id="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Add to category</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
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