Remap to noun-adjective on report-table/table-report
This commit is contained in:
parent
7231bf0aad
commit
a049cef651
2 changed files with 6 additions and 8 deletions
|
|
@ -1,6 +1,4 @@
|
|||
// report-table.js
|
||||
|
||||
class ReportTable extends HTMLElement {
|
||||
class TableReport extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.attachShadow({ mode: "open" });
|
||||
|
|
@ -206,4 +204,4 @@ class ReportTable extends HTMLElement {
|
|||
}
|
||||
|
||||
// Register the custom element
|
||||
customElements.define("report-table", ReportTable);
|
||||
customElements.define("table-report", TableReport);
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
<script src="/static/js/map-multipoint.js"></script>
|
||||
<!-- ordering matters since report table depends on time-relative -->
|
||||
<script src="/static/js/time-relative.js"></script>
|
||||
<script src="/static/js/report-table.js"></script>
|
||||
<script src="/static/js/table-report.js"></script>
|
||||
<script>
|
||||
var markers = [];
|
||||
// Because features come from tiled vector data, feature geometries may be split
|
||||
|
|
@ -140,7 +140,7 @@ function onLoad() {
|
|||
console.log("location error", error);
|
||||
})
|
||||
});
|
||||
const report_table = document.querySelector('report-table');
|
||||
const report_table = document.querySelector('table-report');
|
||||
report_table.addEventListener("row-clicked", (e) => {
|
||||
window.location = "/status/" + e.detail.reportId;
|
||||
})
|
||||
|
|
@ -162,7 +162,7 @@ function onLoad() {
|
|||
function renderReports(features) {
|
||||
//console.log("render reports", features);
|
||||
|
||||
const report_table = document.querySelector('report-table');
|
||||
const report_table = document.querySelector('table-report');
|
||||
let reports = [];
|
||||
for (const feature of features) {
|
||||
reports.push({
|
||||
|
|
@ -279,7 +279,7 @@ document.addEventListener('DOMContentLoaded', onLoad);
|
|||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<report-table />
|
||||
<table-report />
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue