mirror of
https://github.com/grocy/grocy.git
synced 2025-11-06 09:59:29 +00:00
Use absolute URLs everywhere, this should fix #3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
$(document).on('click', '.product-delete-button', function(e)
|
||||
{
|
||||
bootbox.confirm({
|
||||
message: 'Delete product <strong>' + $(e.target).attr('data-product-name') + '</strong>?',
|
||||
message: 'Delete product <strong>' + $(e.currentTarget).attr('data-product-name') + '</strong>?',
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: 'Yes',
|
||||
@@ -16,10 +16,10 @@
|
||||
{
|
||||
if (result === true)
|
||||
{
|
||||
Grocy.FetchJson('/api/delete-object/products/' + $(e.target).attr('data-product-id'),
|
||||
Grocy.Api.Get('delete-object/products/' + $(e.currentTarget).attr('data-product-id'),
|
||||
function(result)
|
||||
{
|
||||
window.location.href = '/products';
|
||||
window.location.href = U('/products');
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user