// Merge -> revision 8984

This commit is contained in:
rMalie
2011-10-03 15:48:07 +00:00
parent b5b2a4ffb6
commit c4780ec67d
60 changed files with 669 additions and 356 deletions
+29
View File
@@ -87,6 +87,7 @@ function initSliders()
function initLayered()
{
initSliders();
initLocationChange();
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
{
var params = window.location.href.split('#')[1];
@@ -312,3 +313,31 @@ function reloadContent(params_plus)
});
ajaxQueries.push(ajaxQuery);
}
function initLocationChange(func, time) {
if(!time) time = 500;
var currLoc = '';
setInterval(function()
{
if(window.location.href != currLoc)
{
currLoc = window.location.href;
// Don't reload page if current_friendly_url and real url match
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
current_url = '#'+window.location.href.split('#')[1];
else
current_url = '';
if (current_friendly_url.replace(/^#(\/)?/, '') == current_url.replace(/^#(\/)?/, ''))
return;
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
{
var params = window.location.href.split('#')[1];
reloadContent('&selected_filters='+params);
}
else
reloadContent('&selected_filters=#');
}
}, time);
}