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