From f23eab17b6b3fc55d7d0811d947378c79f90c526 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Tue, 17 Dec 2013 12:29:48 -0500 Subject: [PATCH] Place hold lightbox fixes, redirect to holds. --- module/VuFind/src/VuFind/Controller/RecordController.php | 3 +++ themes/bootstrap/js/lightbox.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/Controller/RecordController.php b/module/VuFind/src/VuFind/Controller/RecordController.php index f986c0d2dc9..df0193af6dc 100644 --- a/module/VuFind/src/VuFind/Controller/RecordController.php +++ b/module/VuFind/src/VuFind/Controller/RecordController.php @@ -128,6 +128,9 @@ class RecordController extends AbstractRecord if (isset($results['success']) && $results['success'] == true) { $this->flashMessenger()->setNamespace('info') ->addMessage('hold_place_success'); + if ($this->inLightbox()) { + return false; + } return $this->redirect()->toRoute('myresearch-holds'); } else { // Failure: use flash messenger to display messages, stay on diff --git a/themes/bootstrap/js/lightbox.js b/themes/bootstrap/js/lightbox.js index e55ccec99bc..da43805e79b 100644 --- a/themes/bootstrap/js/lightbox.js +++ b/themes/bootstrap/js/lightbox.js @@ -476,7 +476,9 @@ $(document).ready(function() { $('.placehold').click(function() { var params = deparam($(this).attr('href')); params.hashKey = params.hashKey.split('#')[0]; // Remove #tabnav - return getLightbox('Record', 'Hold', params, {}); + return getLightbox('Record', 'Hold', params, {}, function(op) { + document.location.href = path+'/MyResearch/Holds'; + }, false); }); // Save record links $('.save-record').click(function() { -- GitLab