first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
window.addEventListener('load', function() {
|
||||
$('.btn-remove').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const itemId = $(this).data('id');
|
||||
const areaName = $(this).data('area-name');
|
||||
|
||||
$modal = $('#remove-geofence-area-modal');
|
||||
$modal.find('h4.modal-title').text(`Removing area: ${areaName}`);
|
||||
$modal.find('#removeBtn').data('id', itemId);
|
||||
});
|
||||
|
||||
$('#removeBtn').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
const itemId = $(this).data('id');
|
||||
window.__api__.remove(`/geofence_area/${itemId}/delete`, itemId);
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user