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