diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index b58310d703c4256b5734e78759b6225802b03155..2963b97669ea3cc9575169e2b32ac5751b9a80e4 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -376,6 +376,11 @@ function setupIeSupport() { } } +function setupJumpMenus(_container) { + var container = _container || $('body'); + container.find('select.jumpMenu').change(function jumpMenu(){ $(this).parent('form').submit(); }); +} + $(document).ready(function commonDocReady() { // Start up all of our submodules VuFind.init(); @@ -387,7 +392,7 @@ $(document).ready(function commonDocReady() { keyboardShortcuts(); // support "jump menu" dropdown boxes - $('select.jumpMenu').change(function jumpMenu(){ $(this).parent('form').submit(); }); + setupJumpMenus(); // Checkbox select all $('.checkbox-select-all').change(function selectAllCheckboxes() { diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index 07dfebbf637a91d562429e51d5995825facf398c..9681b4090e4f184b560e9e3d1040a7881692fe1f 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -1,4 +1,4 @@ -/*global deparam, getUrlRoot, grecaptcha, recaptchaOnLoad, resetCaptcha, syn_get_widget, userIsLoggedIn, VuFind */ +/*global deparam, getUrlRoot, grecaptcha, recaptchaOnLoad, resetCaptcha, syn_get_widget, userIsLoggedIn, VuFind, setupJumpMenus */ /*exported ajaxTagUpdate, recordDocReady */ /** @@ -180,6 +180,7 @@ function ajaxLoadTab($newTab, tabid, setHash) { } else { removeHashFromLocation(); } + setupJumpMenus($newTab); }); return false; } diff --git a/themes/bootstrap3/templates/librarycards/selectcard.phtml b/themes/bootstrap3/templates/librarycards/selectcard.phtml index 1622d4410e40c4c78e869d1995f5d131ca4e83ad..c0ba02e53b2bda6f7246cf6852e8b3b0651e1bd6 100644 --- a/themes/bootstrap3/templates/librarycards/selectcard.phtml +++ b/themes/bootstrap3/templates/librarycards/selectcard.phtml @@ -15,7 +15,7 @@ $display .= ' (' . $this->transEsc("source_$target", null, $target) . ')'; } ?> - <option value="<?=$this->escapeHtmlAttr($card->id)?>"<?=$card->cat_username == $this->user->cat_username ? ' selected="selected"' : ''?>><?=$display ?></option> + <option value="<?=$this->escapeHtmlAttr($card->id)?>"<?=strcasecmp($card->cat_username, $this->user->cat_username) == 0 ? ' selected="selected"' : ''?>><?=$display ?></option> <? endforeach; ?> </select> <noscript><input type="submit" class="btn btn-default" value="<?=$this->transEsc("Set")?>" /></noscript>