Commit 0585666d authored by Maxim's avatar Maxim
Browse files

(bug) Download KML link not synchronized

parent 360d4111
......@@ -63,7 +63,7 @@
<span><spring:message code="view.accessions"/></span>
</a>--%>
<form style="display: inline-block" method="post" action="<c:url value="/explore/kml" />">
<form style="display: inline-block" method="post" id="downloadKml" action="<c:url value="/explore/kml" />">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />"/>
<button class="btn btn-default" type="submit">
......@@ -795,6 +795,9 @@
}
function refreshLinks() {
$.each($("#downloadKml").find("input[name='filter']"), function () {
$(this).val(JSON.stringify(jsonData));
});
var re = /filter=(.*)/;
$("#exploreLink").attr("href", $("#exploreLink").attr("href").replace(re, "filter=" + encodeURIComponent(JSON.stringify(jsonData))));
$("#overviewLink").attr("href", $("#overviewLink").attr("href").replace(re, "filter=" + encodeURIComponent(JSON.stringify(jsonData))));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment