Skip to content
Snippets Groups Projects
Commit 8a000a95 authored by Demian Katz's avatar Demian Katz
Browse files

Smarter redirectToRecord() behavior for bootstrap3 & jquerymobile.

parent cab41237
No related merge requests found
...@@ -537,7 +537,17 @@ class AbstractRecord extends AbstractBase ...@@ -537,7 +537,17 @@ class AbstractRecord extends AbstractBase
{ {
$details = $this->getRecordRouter() $details = $this->getRecordRouter()
->getTabRouteDetails($this->loadRecord(), $tab); ->getTabRouteDetails($this->loadRecord(), $tab);
$target = $this->url()->fromRoute($details['route'], $details['params']); $target = $this->getLightboxAwareUrl($details['route'], $details['params']);
// Special case: don't use anchors in jquerymobile theme, since they
// mess things up!
if (strlen($params) && substr($params, 0, 1) == '#') {
$themeInfo = $this->getServiceLocator()->get('VuFindTheme\ThemeInfo');
if ($themeInfo->getTheme() == 'jquerymobile') {
$params = '';
}
}
return $this->redirect()->toUrl($target . $params); return $this->redirect()->toUrl($target . $params);
} }
......
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