Skip to content
Snippets Groups Projects
Commit f1633f28 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Cart save success message fixes.

parent 5fea5376
No related merge requests found
......@@ -395,7 +395,7 @@ class CartController extends AbstractBase
];
$this->flashMessenger()->addMessage($message, 'success');
if (!empty($list)) {
return $listUrl;
return $this->redirect()->toUrl($listUrl);
} else {
return $this->redirectToSource();
}
......
......@@ -410,7 +410,9 @@ function getListUrlFromHTML(html) {
var listUrl = fakePage.find('a.gotolist').attr('href');
if (typeof listUrl === 'undefined') {
var listID = fakePage.find('[name="listID"]');
listUrl = VuFind.getPath() + '/MyResearch/MyList/'+listID.val();
if(listID.length > 0) {
listUrl = VuFind.getPath() + '/MyResearch/MyList/'+listID.val();
}
}
var message = VuFind.translate('bulk_save_success');
if (listUrl) {
......@@ -455,7 +457,6 @@ $(document).ready(function() {
location.reload();
});
Lightbox.addFormCallback('bulkSave', function(html) {
Lightbox.addCloseAction(refreshPageForLogin);
// go to list link
var msg = getListUrlFromHTML(html);
Lightbox.success(msg);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment