Skip to content
Snippets Groups Projects
Commit 90a991f7 authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

Library card bug fixes (#1041)

- Fix library card selection in holdings screen when the tab is loaded asynchronously.
- Fix username comparison to be case-insensitive.
parent a90c2826
No related merge requests found
......@@ -388,6 +388,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();
......@@ -399,7 +404,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() {
......
/*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;
}
......
......@@ -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>
......
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