# HG changeset patch # User cavaliet # Date 1411658069 -7200 # Node ID 9a854bb09f347a12fb6cfa15ddb6fab743e31679 # Parent 6a7bc9190de564de5313064938da905f9b7a1035 big change : facette urls manages with location search parameters, and not anymore with session info. diff -r 6a7bc9190de5 -r 9a854bb09f34 src/hdalab/static/hdalab/js/gomina.js --- a/src/hdalab/static/hdalab/js/gomina.js Thu Sep 25 12:16:51 2014 +0200 +++ b/src/hdalab/static/hdalab/js/gomina.js Thu Sep 25 17:14:29 2014 +0200 @@ -44,7 +44,7 @@ _rgb.push(Math.floor(_exp*gomNs.gradientEnd[i] + (1-_exp)*gomNs.gradientStart[i])); } } - return "rgb(" + _rgb.join(",") + ")" + return "rgb(" + _rgb.join(",") + ")"; } function polygon_to_gmap(polycoords, dbpedia_uri) { @@ -119,7 +119,7 @@ _curView[_type].push(_label); } updateFilters(); - debouncedSaveChanges(); + //debouncedSaveChanges(); } } @@ -128,7 +128,7 @@ if (_curView.type == 'filter') { _curView[_type].splice(_index,1); updateFilters(); - debouncedSaveChanges(); + //debouncedSaveChanges(); } } @@ -161,7 +161,7 @@ _curView.period[_n] = _int; } updateFilters(); - debouncedSaveChanges(); + //debouncedSaveChanges(); } } } @@ -172,7 +172,7 @@ _curView.period[0] = gomNs.minYear; _curView.period[1] = gomNs.maxYear; updateFilters(); - debouncedSaveChanges(); + //debouncedSaveChanges(); } } @@ -198,7 +198,10 @@ } } -function updateFilters() { +function updateFilters(initial) { + if(typeof initial==="undefined"){ + initial = false; + } var _curView = gomNs.sessiondata.views[gomNs.sessiondata.view]; if (_curView.type != 'filter') { return; @@ -261,8 +264,12 @@ }).join(""); } $("#renkan-link").attr("href",url_renkan); + if(!initial){ + history.replaceState(null, null, url_renkan.substr(url_renkan.lastIndexOf("?"))); + } $("#filters").html(_htmFilters).hide(); debouncedGetUpdates(); + } function displayContents(contentdata) { @@ -306,16 +313,16 @@ + ' placeholder' + ''; }).join('') - + '