Add notification center button and fix stat-card/activity board loading

This commit is contained in:
master3395
2026-01-19 17:37:47 +01:00
parent 2d6657a7c5
commit a17d856b76
3316 changed files with 723670 additions and 4579 deletions

View File

@@ -13,6 +13,7 @@
redisplay: function(id) {
// Repopulate HTML select box from cache
const box = document.getElementById(id);
const scroll_value_from_top = box.scrollTop;
box.innerHTML = '';
for (const node of SelectBox.cache[id]) {
if (node.displayed) {
@@ -22,6 +23,7 @@
box.appendChild(new_option);
}
}
box.scrollTop = scroll_value_from_top;
},
filter: function(id, text) {
// Redisplay the HTML select box, displaying only the choices containing ALL
@@ -31,7 +33,7 @@
node.displayed = 1;
const node_text = node.text.toLowerCase();
for (const token of tokens) {
if (node_text.indexOf(token) === -1) {
if (!node_text.includes(token)) {
node.displayed = 0;
break; // Once the first token isn't found we're done
}
@@ -39,6 +41,10 @@
}
SelectBox.redisplay(id);
},
get_hidden_node_count(id) {
const cache = SelectBox.cache[id] || [];
return cache.filter(node => node.displayed === 0).length;
},
delete_from_cache: function(id, value) {
let delete_index = null;
const cache = SelectBox.cache[id];