Optimized returnto-links handling (fixes #1785)

This commit is contained in:
Bernd Bestel
2022-02-13 20:07:29 +01:00
parent d38a5efb3d
commit 2457c2c2fd
3 changed files with 6 additions and 6 deletions

View File

@@ -883,11 +883,11 @@ $('a.link-return').not(".btn").each(function()
var base = $(this).data('href');
if (base.contains('?'))
{
$(this).attr('href', base + '&returnto' + encodeURIComponent(location.pathname));
$(this).attr('href', base + '&returnto' + encodeURIComponent(Grocy.CurrentUrlRelative));
}
else
{
$(this).attr('href', base + '?returnto=' + encodeURIComponent(location.pathname));
$(this).attr('href', base + '?returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative));
}
})