mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 23:49:55 +02:00
Fix footer entities count not being updated when change filter value
This commit is contained in:
parent
68499f49ad
commit
a06f49f791
1 changed files with 14 additions and 10 deletions
|
@ -206,10 +206,23 @@ function loaded() {
|
||||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'refresh' }));
|
EventBridge.emitWebEvent(JSON.stringify({ type: 'refresh' }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function refreshFooter() {
|
||||||
|
if (selectedEntities.length > 1) {
|
||||||
|
elFooter.firstChild.nodeValue = selectedEntities.length + " entities selected";
|
||||||
|
} else if (selectedEntities.length === 1) {
|
||||||
|
elFooter.firstChild.nodeValue = "1 entity selected";
|
||||||
|
} else if (entityList.visibleItems.length === 1) {
|
||||||
|
elFooter.firstChild.nodeValue = "1 entity found";
|
||||||
|
} else {
|
||||||
|
elFooter.firstChild.nodeValue = entityList.visibleItems.length + " entities found";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function refreshEntityListObject() {
|
function refreshEntityListObject() {
|
||||||
refreshEntityListTimer = null;
|
refreshEntityListTimer = null;
|
||||||
entityList.sort(currentSortColumn, { order: currentSortOrder });
|
entityList.sort(currentSortColumn, { order: currentSortOrder });
|
||||||
entityList.search(elFilter.value);
|
entityList.search(elFilter.value);
|
||||||
|
refreshFooter();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSelectedEntities(selectedEntities) {
|
function updateSelectedEntities(selectedEntities) {
|
||||||
|
@ -227,16 +240,6 @@ function loaded() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedEntities.length > 1) {
|
|
||||||
elFooter.firstChild.nodeValue = selectedEntities.length + " entities selected";
|
|
||||||
} else if (selectedEntities.length === 1) {
|
|
||||||
elFooter.firstChild.nodeValue = "1 entity selected";
|
|
||||||
} else if (entityList.visibleItems.length === 1) {
|
|
||||||
elFooter.firstChild.nodeValue = "1 entity found";
|
|
||||||
} else {
|
|
||||||
elFooter.firstChild.nodeValue = entityList.visibleItems.length + " entities found";
|
|
||||||
}
|
|
||||||
|
|
||||||
// HACK: Fixes the footer and header text sometimes not displaying after adding or deleting entities.
|
// HACK: Fixes the footer and header text sometimes not displaying after adding or deleting entities.
|
||||||
// The problem appears to be a bug in the Qt HTML/CSS rendering (Qt 5.5).
|
// The problem appears to be a bug in the Qt HTML/CSS rendering (Qt 5.5).
|
||||||
document.getElementById("radius").focus();
|
document.getElementById("radius").focus();
|
||||||
|
@ -371,6 +374,7 @@ function loaded() {
|
||||||
|
|
||||||
window.onresize = resize;
|
window.onresize = resize;
|
||||||
elFilter.onchange = resize;
|
elFilter.onchange = resize;
|
||||||
|
elFilter.onblur = refreshFooter;
|
||||||
|
|
||||||
|
|
||||||
var showExtraInfo = false;
|
var showExtraInfo = false;
|
||||||
|
|
Loading…
Reference in a new issue