From aae4a78fd420b9fa1dc26a7ee7dc166eb95c6d85 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 28 Jun 2017 15:52:13 +0200 Subject: [PATCH] Possible fix for #649 [skip ci] --- public/js/ff/transactions/list.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.js index 39cc72fc9a..d3fdd80214 100644 --- a/public/js/ff/transactions/list.js +++ b/public/js/ff/transactions/list.js @@ -41,7 +41,14 @@ function goToMassEdit() { var checkedArray = getCheckboxes(); // go to specially crafted URL: - window.location.href = 'transactions/mass/edit/' + checkedArray; + var bases = document.getElementsByTagName('base'); + var baseHref = null; + + if (bases.length > 0) { + baseHref = bases[0].href; + } + + window.location.href = baseHref + '/transactions/mass/edit/' + checkedArray; return false; } @@ -50,7 +57,13 @@ function goToMassDelete() { var checkedArray = getCheckboxes(); // go to specially crafted URL: - window.location.href = 'transactions/mass/delete/' + checkedArray; + var bases = document.getElementsByTagName('base'); + var baseHref = null; + + if (bases.length > 0) { + baseHref = bases[0].href; + } + window.location.href = baseHref + '/transactions/mass/delete/' + checkedArray; return false; }