Possible fix for #649 [skip ci]

This commit is contained in:
James Cole 2017-06-28 15:52:13 +02:00
parent 3947da5e27
commit aae4a78fd4
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -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;
}