Bug 13670 - Patron holds table not loading when holds tab anchor is used
If a link to a patron record ends with #reserves, the holds tab is selected on page load, but the holds table does not load. Test Plan: 1) Build your holds queue 2) From the holds queue report, open any patron link 3) Note the patron's reserves do not load 4) Apply this patch 5) Clear your browser cache 6) Repeat step 2 7) Note the holds table now loads Signed-off-by: Sean McGarvey <seanm@pascolibraries.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
f19a1777a0
commit
87bcc8b303
1 changed files with 9 additions and 4 deletions
|
@ -1,7 +1,13 @@
|
|||
$(document).ready(function() {
|
||||
// Don't load holds table unless it is clicked on
|
||||
var holdsTable;
|
||||
$("#holds-tab").click( function() {
|
||||
|
||||
// Don't load holds table unless it is clicked on
|
||||
$("#holds-tab").on( "click", function(){ load_holds_table() } );
|
||||
|
||||
// If the holds tab is preselected on load, we need to load the table
|
||||
if ( $("#holds-tab").parent().hasClass('ui-state-active') ) { load_holds_table() }
|
||||
|
||||
function load_holds_table() {
|
||||
if ( ! holdsTable ) {
|
||||
holdsTable = $("#holds-table").dataTable({
|
||||
"bAutoWidth": false,
|
||||
|
@ -127,6 +133,5 @@ $(document).ready(function() {
|
|||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue