|
Lines 264-297
$(document).ready(function() {
Link Here
|
| 264 |
}); |
264 |
}); |
| 265 |
|
265 |
|
| 266 |
var ymd = flatpickr.formatDate(new Date(), "Y-m-d"); |
266 |
var ymd = flatpickr.formatDate(new Date(), "Y-m-d"); |
| 267 |
|
267 |
if ( AlwaysLoadCheckoutsTable ) { |
| 268 |
$('#issues-table-load-immediately').change(function(){ |
|
|
| 269 |
if ( this.checked && typeof issuesTable === 'undefined') { |
| 270 |
$('#issues-table-load-now-button').click(); |
| 271 |
} |
| 272 |
barcodefield.focus(); |
| 273 |
}); |
| 274 |
$('#issues-table-load-now-button').click(function(){ |
| 275 |
if ( loadIssuesTableDelayTimeoutId ) clearTimeout(loadIssuesTableDelayTimeoutId); |
| 276 |
LoadIssuesTable(); |
| 277 |
barcodefield.focus(); |
| 278 |
return false; |
| 279 |
}); |
| 280 |
|
| 281 |
if ( Cookies.get("issues-table-load-immediately-" + script) == "true" ) { |
| 282 |
if ( LoadCheckoutsTableDelay ) { |
268 |
if ( LoadCheckoutsTableDelay ) { |
| 283 |
loadIssuesTableDelayTimeoutId = setTimeout( function(){ LoadIssuesTable() }, LoadCheckoutsTableDelay * 1000); |
269 |
setTimeout( function(){ LoadIssuesTable() }, LoadCheckoutsTableDelay * 1000); |
| 284 |
} else { |
270 |
} else { |
| 285 |
LoadIssuesTable(); |
271 |
LoadIssuesTable(); |
| 286 |
} |
272 |
} |
| 287 |
$('#issues-table-load-immediately').prop('checked', true); |
|
|
| 288 |
} else { |
273 |
} else { |
| 289 |
$('#issues-table-load-delay').hide(); |
274 |
$('#issues-table-load-immediately').change(function(){ |
| 290 |
} |
275 |
if ( this.checked && typeof issuesTable === 'undefined') { |
| 291 |
$('#issues-table-load-immediately').on( "change", function(){ |
276 |
$('#issues-table-load-now-button').click(); |
| 292 |
Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: 'Lax' }); |
277 |
} |
| 293 |
}); |
278 |
barcodefield.focus(); |
|
|
279 |
}); |
| 280 |
$('#issues-table-load-now-button').click(function(){ |
| 281 |
if ( loadIssuesTableDelayTimeoutId ) clearTimeout(loadIssuesTableDelayTimeoutId); |
| 282 |
LoadIssuesTable(); |
| 283 |
barcodefield.focus(); |
| 284 |
return false; |
| 285 |
}); |
| 294 |
|
286 |
|
|
|
287 |
if ( Cookies.get("issues-table-load-immediately-" + script) == "true" ) { |
| 288 |
if ( LoadCheckoutsTableDelay ) { |
| 289 |
loadIssuesTableDelayTimeoutId = setTimeout( function(){ LoadIssuesTable() }, LoadCheckoutsTableDelay * 1000); |
| 290 |
} else { |
| 291 |
LoadIssuesTable(); |
| 292 |
} |
| 293 |
$('#issues-table-load-immediately').prop('checked', true); |
| 294 |
} else { |
| 295 |
$('#issues-table-load-delay').hide(); |
| 296 |
} |
| 297 |
$('#issues-table-load-immediately').on( "change", function(){ |
| 298 |
Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: 'Lax' }); |
| 299 |
}); |
| 300 |
} |
| 295 |
function RefreshIssuesTable() { |
301 |
function RefreshIssuesTable() { |
| 296 |
var table = $('#issues-table').DataTable(); |
302 |
var table = $('#issues-table').DataTable(); |
| 297 |
var renewchecked = $('input[name=renew]:checked').map(function(){ |
303 |
var renewchecked = $('input[name=renew]:checked').map(function(){ |
| 298 |
- |
|
|