mirror of
https://github.com/overte-org/overte.git
synced 2025-08-19 14:21:02 +02:00
Move the "no entities found" message into the entities list table
This commit is contained in:
parent
7e7e421efa
commit
53b86a0b55
2 changed files with 10 additions and 7 deletions
|
@ -363,6 +363,8 @@ td {
|
|||
|
||||
#no-entities {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 54px;
|
||||
font-size: 120%;
|
||||
padding: 10pt;
|
||||
font-weight: bold;
|
||||
|
|
|
@ -224,16 +224,15 @@
|
|||
} else if (data.type == "update") {
|
||||
var newEntities = data.entities;
|
||||
if (newEntities.length == 0) {
|
||||
elEntityTable.style.display = "none";
|
||||
elNoEntitiesMessage.style.display = "block";
|
||||
} else {
|
||||
elEntityTable.style.display = "table";
|
||||
elNoEntitiesMessage.style.display = "none";
|
||||
for (var i = 0; i < newEntities.length; i++) {
|
||||
var id = newEntities[i].id;
|
||||
addEntity(id, newEntities[i].name, newEntities[i].type, newEntities[i].url);
|
||||
}
|
||||
updateSelectedEntities(data.selectedIDs);
|
||||
resize();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -249,8 +248,10 @@
|
|||
// Update the widths of the header cells to match the body
|
||||
var tds = document.querySelectorAll("#entity-table-body tr:first-child td");
|
||||
var ths = document.querySelectorAll("#entity-table thead th");
|
||||
for (var i = 0; i < ths.length; i++) {
|
||||
ths[i].style.width = tds[i].offsetWidth;
|
||||
if (tds.length >= ths.length) {
|
||||
for (var i = 0; i < ths.length; i++) {
|
||||
ths[i].style.width = tds[i].offsetWidth;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -301,10 +302,10 @@
|
|||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="no-entities">
|
||||
No entities found within a <span id="no-entities-radius">100</span> meter radius. Try moving to a different location and refreshing.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="no-entities">
|
||||
No entities found within a <span id="no-entities-radius">100</span> meter radius. Try moving to a different location and refreshing.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue