Lines 302-310
Link Here
|
302 |
localStorage.selectedWaitingHolds = JSON.stringify(this_dt.$(".select_hold:checked", {"page": "all"}).toArray().map(el => $(el).data('id'))); |
302 |
localStorage.selectedWaitingHolds = JSON.stringify(this_dt.$(".select_hold:checked", {"page": "all"}).toArray().map(el => $(el).data('id'))); |
303 |
}); |
303 |
}); |
304 |
|
304 |
|
305 |
var activeTab = localStorage.getItem("waitingreserves_activetab"); |
305 |
var hash = document.location.hash; |
306 |
if( activeTab ){ |
306 |
if( hash !== "" ){ |
307 |
$("div#resultlist li:eq(" + activeTab + ") a").tab("show"); |
307 |
/* The existence of location.hash means someone clicked a link which targets a specific tab */ |
|
|
308 |
$( hash ).tab("show"); |
309 |
} else { |
310 |
/* If no specific tab was linked to, use the last active tab */ |
311 |
var activeTab = localStorage.getItem("waitingreserves_activetab"); |
312 |
if( activeTab ){ |
313 |
$("div#resultlist li:eq(" + activeTab + ") a").tab("show"); |
314 |
} |
308 |
} |
315 |
} |
309 |
$("div#resultlist a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) { |
316 |
$("div#resultlist a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) { |
310 |
var thisTab = $(e.target).parent(); |
317 |
var thisTab = $(e.target).parent(); |