progress
This commit is contained in:
@@ -106,3 +106,18 @@ $('.remove-from-watchlist').on('click', function(e){
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.list-action').on('click', function(e){
|
||||
e.preventDefault();
|
||||
let url = '/lists/' + $(this).data('list') + '/' + $(this).data('id') + '/' + $(this).data('type');
|
||||
var self = this
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
success: function(data){
|
||||
// Show a success message
|
||||
alert('Movie ' + (data.added ? 'added to' : 'removed from') + ' list');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user