diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php index ce4ca61e9f8341dda140a21b31e4bc943447dc61..3ff17ebcccc277c09c8aca3d4c6875a62460ed79 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchController.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php @@ -228,6 +228,11 @@ class MyResearchController extends AbstractBase { // Don't log in if already logged in! if ($this->getAuthManager()->isLoggedIn()) { + if ($this->inLightbox()) { + $response = $this->getResponse(); + $response->setStatusCode(205); + return $response; + } return $this->redirect()->toRoute('home'); } $this->clearFollowupUrl(); diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index 4c4f0d3c7faee4b0b8b341f136ee7f68ed12b5c7..45dbcd28eb9fcb4ebcdc46a9d6321c591af78e39 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -243,7 +243,14 @@ var Lightbox = { url:url, data:post }) - .done(callback) + .done(function(data, textStatus, jqXHR) { + if (jqXHR.status == 205) { + // No reload since any post params would cause a prompt + window.location.href = window.location.href; + } else { + callback(data, textStatus, jqXHR); + } + }) .fail(function(response, textStatus) { console.log(response, textStatus); // Error reporting console.log(url, post);