Keep report-id alive.

parent 01509d26
......@@ -453,8 +453,8 @@ var failmap = {
vueReport.load(organization_id, vueMap.week);
} else {
// trigger load of organization data and jump to Report view.
vueReport.selected = organization_id;
location.href = '#report';
vueReport.selected = organization_id;
}
}
};
......@@ -669,7 +669,9 @@ $(document).ready(function () {
vueReport.name = data.name;
vueReport.twitter_handle = data.twitter_handle;
// include id in anchor to allow url sharing
location.href = '#report-' + OrganizationID;
let newHash = 'report-' + OrganizationID;
$('a#report-anchor').attr('name', newHash)
history.replaceState({}, '', '#' + newHash);
});
},
show_in_browser: function(){
......
......@@ -286,7 +286,7 @@
<div class="page-header" id="report">
<div>
<div class="page-header">
<a name="report" class="jumptonav"></a>
<a name="report" id="report-anchor" class="jumptonav"></a>
<h2><span class="organization_points"></span>{% trans "Report" %}</h2>
<a href="#" class="backtomap">back to map ↑</a>
</div>
......
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