mirror of
https://github.com/grocy/grocy.git
synced 2025-10-15 09:46:03 +00:00
Finish API documentation and token auth (references #5)
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
$(document).on('click', '.quantityunit-delete-button', function(e)
|
||||
{
|
||||
var objectName = $(e.currentTarget).attr('data-quantityunit-name');
|
||||
var objectId = $(e.currentTarget).attr('data-quantityunit-id');
|
||||
|
||||
bootbox.confirm({
|
||||
message: L('Are you sure to delete quantity unit "#1"?', $(e.currentTarget).attr('data-quantityunit-name')),
|
||||
message: L('Are you sure to delete quantity unit "#1"?', objectName),
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: 'Yes',
|
||||
@@ -16,7 +19,7 @@
|
||||
{
|
||||
if (result === true)
|
||||
{
|
||||
Grocy.Api.Get('delete-object/quantity_units/' + $(e.currentTarget).attr('data-quantityunit-id'),
|
||||
Grocy.Api.Get('delete-object/quantity_units/' + objectId,
|
||||
function(result)
|
||||
{
|
||||
window.location.href = U('/quantityunits');
|
||||
|
Reference in New Issue
Block a user