Bug 33737: Fix undefined variable issues

This patch resolves the undefined bookings_table variable issue reported
and also further fixes a subsequent undefined timeline bug that was
exposed by the original fix.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2024-02-18 17:25:33 +00:00 committed by Katrin Fischer
parent f46453cd89
commit 31af594bb0
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 2 additions and 4 deletions

View File

@ -759,6 +759,7 @@
table_settings_relatives_issues_table = [% TablesSettings.GetTableSettings( 'members', 'moremember', 'relatives-issues-table', 'json' ) | $raw %]
table_settings_holds_table = [% TablesSettings.GetTableSettings( 'members', 'moremember', 'holds-table', 'json' ) | $raw %]
var bookings_table;
$(document).ready(function() {
$("#info_digests").tooltip();
@ -778,7 +779,6 @@
});
// Bookings
var bookings_table;
// Load bookings table on tab selection
$("#bookings-tab").on( "click", function(){
if ( !bookings_table ) {
@ -858,8 +858,6 @@
}, [], 0, { patron_id: "[% patron.borrowernumber | html %]", end_date: { ">=": today.toISOString() } });
};
});
// Bookings
});
function uncheck_sibling(me){

View File

@ -20,7 +20,7 @@ $("#cancelBookingForm").on('submit', function(e) {
if (bookings_table) {
bookings_table.api().ajax.reload();
}
if (timeline) {
if (typeof timeline !== 'undefined') {
timeline.itemsData.remove(Number(booking_id));
}
$('.bookings_count').html(parseInt($('.bookings_count').html(), 10)-1);