mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Optimized returnto-links handling (fixes #1785)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user