Allow marking wishes as fulfilled
This commit is contained in:
parent
1037ccef66
commit
62ec209a5f
5 changed files with 33 additions and 3 deletions
|
@ -296,6 +296,27 @@ $(function () {
|
|||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Mark as Fulfilled
|
||||
*/
|
||||
$(document).on('click', '.wish-fulfilled', function() {
|
||||
var button = $(this);
|
||||
var card = button.closest('.card');
|
||||
|
||||
button.api({
|
||||
action : 'update wish status',
|
||||
method : 'PUT',
|
||||
data : {
|
||||
wish_id : card.attr('data-id'),
|
||||
wish_status : wish_status_fulfilled,
|
||||
},
|
||||
on : 'now',
|
||||
onSuccess : function(response, element, xhr) {
|
||||
card.closest('.column').fadeOut();
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Delete Wish
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue