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