Revert "fix wacky aspect filtering bug (tabs being selected seemingly at random"
This reverts commit 14f14d005b.
This commit is contained in:
parent
24fffc0220
commit
d1c3326867
1 changed files with 10 additions and 15 deletions
|
|
@ -7,10 +7,19 @@ $(document).ready(function(){
|
||||||
var selectedGUIDS = [],
|
var selectedGUIDS = [],
|
||||||
requests = 0;
|
requests = 0;
|
||||||
|
|
||||||
|
$("#aspect_nav li").each(function(){
|
||||||
|
var button = $(this),
|
||||||
|
guid = button.attr('data-guid');
|
||||||
|
|
||||||
|
if(guid && location.href.search("a_ids..="+guid+"(&|$)") != -1){
|
||||||
|
button.addClass('selected');
|
||||||
|
selectedGUIDS.push(guid);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// popstate
|
// popstate
|
||||||
$(window).bind("popstate", function(){
|
$(window).bind("popstate", function(){
|
||||||
$.getScript(location.href);
|
$.getScript(location.href);
|
||||||
setGUIDS();
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -147,7 +156,6 @@ $(document).ready(function(){
|
||||||
// some browsers (Firefox for example) don't support pushState
|
// some browsers (Firefox for example) don't support pushState
|
||||||
if (typeof(history.pushState) == 'function') {
|
if (typeof(history.pushState) == 'function') {
|
||||||
history.pushState(null, document.title, newURL);
|
history.pushState(null, document.title, newURL);
|
||||||
setGUIDS();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
@ -190,17 +198,4 @@ $(document).ready(function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setGUIDS(){
|
|
||||||
selectedGUIDS = [];
|
|
||||||
$("li", "#aspect_nav").each(function(){
|
|
||||||
var button = $(this),
|
|
||||||
guid = button.attr('data-guid');
|
|
||||||
if(guid && location.href.search("a_ids..="+guid+"(&|$)") != -1){
|
|
||||||
button.addClass('selected');
|
|
||||||
selectedGUIDS.push(guid);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
console.log(selectedGUIDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue