Commit e4f61b2c authored by Dominik Rosiek's avatar Dominik Rosiek

usuwanie linkóœ

parent 11526cae
......@@ -70,4 +70,26 @@ function removeProject(event, project_id){
document.location.reload()
}
});
}
function removeLink(beacon_manager, link){
event.stopPropagation();
$.ajax({
url: beacon_manager,
type: 'GET',
success: function(result) {
var index = result.sites.indexOf(link);
result.sites = result.sites.slice(index, -1);
$.ajax({
url: beacon_manager,
type: 'PUT',
data: JSON.stringify(result),
contentType: "application/json",
success: function(result) {
document.location.reload();
}
});
}
});
}
\ 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