Lines 471-482
function LoadIssuesTable() {
Link Here
|
471 |
var loadIssuesTableDelayTimeoutId; |
471 |
var loadIssuesTableDelayTimeoutId; |
472 |
var barcodefield = $("#barcode"); |
472 |
var barcodefield = $("#barcode"); |
473 |
|
473 |
|
474 |
$('#issues-table-load-now-button').click(function(){ |
474 |
if ( AlwaysLoadCheckoutsTable ) { |
475 |
if ( loadIssuesTableDelayTimeoutId ) clearTimeout(loadIssuesTableDelayTimeoutId); |
475 |
if ( LoadCheckoutsTableDelay ) { |
476 |
LoadIssuesTable(); |
476 |
setTimeout( function(){ LoadIssuesTable() }, LoadCheckoutsTableDelay * 1000); |
477 |
barcodefield.focus(); |
477 |
} else { |
478 |
return false; |
478 |
LoadIssuesTable(); |
479 |
}); |
479 |
} |
|
|
480 |
|
481 |
} else { |
482 |
$('#issues-table-load-immediately').change(function(){ |
483 |
if ( this.checked && typeof issuesTable === 'undefined') { |
484 |
$('#issues-table-load-now-button').click(); |
485 |
} |
486 |
barcodefield.focus(); |
487 |
}); |
488 |
$('#issues-table-load-now-button').click(function(){ |
489 |
if ( loadIssuesTableDelayTimeoutId ) clearTimeout(loadIssuesTableDelayTimeoutId); |
490 |
LoadIssuesTable(); |
491 |
barcodefield.focus(); |
492 |
return false; |
493 |
}); |
494 |
|
495 |
if ( Cookies.get("issues-table-load-immediately-" + script) == "true" ) { |
496 |
if ( LoadCheckoutsTableDelay ) { |
497 |
setTimeout( function(){ LoadIssuesTable() }, LoadCheckoutsTableDelay * 1000); |
498 |
} else { |
499 |
LoadIssuesTable(); |
500 |
} |
501 |
$('#issues-table-load-immediately').prop('checked', true); |
502 |
} else { |
503 |
$('#issues-table-load-delay').hide(); |
504 |
} |
505 |
$('#issues-table-load-immediately').on( "change", function(){ |
506 |
Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: 'Lax' }); |
507 |
}); |
508 |
} |
480 |
|
509 |
|
481 |
$(document).ready(function() { |
510 |
$(document).ready(function() { |
482 |
|
511 |
|
Lines 771-797
$(document).ready(function() {
Link Here
|
771 |
|
800 |
|
772 |
var ymd = flatpickr.formatDate(new Date(), "Y-m-d"); |
801 |
var ymd = flatpickr.formatDate(new Date(), "Y-m-d"); |
773 |
|
802 |
|
774 |
$('#issues-table-load-immediately').change(function(){ |
|
|
775 |
if ( this.checked && typeof issuesTable === 'undefined') { |
776 |
$('#issues-table-load-now-button').click(); |
777 |
} |
778 |
barcodefield.focus(); |
779 |
}); |
780 |
|
781 |
if ( Cookies.get("issues-table-load-immediately-" + script) == "true" ) { |
782 |
if ( LoadCheckoutsTableDelay ) { |
783 |
loadIssuesTableDelayTimeoutId = setTimeout( function(){ LoadIssuesTable() }, LoadCheckoutsTableDelay * 1000); |
784 |
} else { |
785 |
LoadIssuesTable(); |
786 |
} |
787 |
$('#issues-table-load-immediately').prop('checked', true); |
788 |
} else { |
789 |
$('#issues-table-load-delay').hide(); |
790 |
} |
791 |
$('#issues-table-load-immediately').on( "change", function(){ |
792 |
Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: 'Lax' }); |
793 |
}); |
794 |
|
795 |
// Don't load relatives' issues table unless it is clicked on |
803 |
// Don't load relatives' issues table unless it is clicked on |
796 |
var relativesIssuesTable; |
804 |
var relativesIssuesTable; |
797 |
$("#relatives-issues-tab").click( function() { |
805 |
$("#relatives-issues-tab").click( function() { |
798 |
- |
|
|