finish delete recording feature

This commit is contained in:
Zachary Chai
2016-11-08 16:03:24 -05:00
parent 93b5e9a1b3
commit 83bdf4c387
8 changed files with 68 additions and 16 deletions

View File

@ -187,14 +187,18 @@
});
$('#recordings').on('click', '.recording-delete', function(event) {
var btn = $(this);
var row = recordingsTable.api().row($(this).closest('tr')).data();
var url = $('.meeting-url').val();
var id = row.id;
btn.prop('disabled', true);
$.ajax({
method: 'DELETE',
url: url+'/recordings/'+id
}).done(function() {
recordingsTable.api().row("#"+id).remove().draw();
}).fail(function(data) {
btn.prop('disabled', false);
});
});