Page routes, Home link, documented-app filters, Overview colors and list fixes
- Every nav page has its own address (/tracked, /status, /devices, ...); the logo and name go to the Overview; back/forward work. - List filters gain an "Only ticked" mode; software columns get a one-click "devices with only documented apps" pick and an easiest-first sort. - Overview: the device list uses the dashboard's table header (sticky, with Excel filters); what opened it is clearly highlighted; locations colored by how much is done (red to green); stages read red / amber / green. - Details: one-line title bar; presence and monitors only in Advanced View. - Presence sweep pings only completed pairs (everything else is pinged by the sweep itself), hourly and at midnight. - Custom View scrollbar smaller, in the table header blue. - Docs: no sideways scroll in the article list; no blank lines around code.
This commit is contained in:
1 parent
e2125c760a
commit
f72e39892c
13 files changed
+332
-117
No files matched your search
+9
-9
@@ -324,6 +324,13 @@
|
||||
// ---------------------------------------------------------------------------------
|
||||
const ALERTS = { NOTE: 'Note', TIP: 'Tip', IMPORTANT: 'Important', WARNING: 'Warning', CAUTION: 'Caution' };
|
||||
function decorate() {
|
||||
// no trailing blank line at the end of a code block
|
||||
document.querySelectorAll('#docContent pre code').forEach(code => {
|
||||
if (code.dataset.kbTrim) return;
|
||||
code.dataset.kbTrim = '1';
|
||||
const last = code.lastChild;
|
||||
if (last && last.nodeType === 3) last.nodeValue = last.nodeValue.replace(/\s+$/, '');
|
||||
});
|
||||
document.querySelectorAll('#docContent blockquote').forEach(bq => {
|
||||
if (bq.dataset.kb) return;
|
||||
bq.dataset.kb = '1';
|
||||
@@ -405,14 +412,7 @@
|
||||
if (!m) ed.value = `<!-- category: ${sel.value} -->\n` + ed.value;
|
||||
}
|
||||
});
|
||||
wrap('switchPage', id => {
|
||||
if (id !== 'docs' && location.pathname.startsWith('/docs')) setUrl('/', false);
|
||||
if (id === 'docs' && currentTitle() && !location.pathname.startsWith('/docs/')) setUrl(permalink(currentTitle()), false);
|
||||
});
|
||||
window.addEventListener('popstate', () => {
|
||||
const doc = findDoc(titleFromPath());
|
||||
if (doc) openDoc(doc);
|
||||
else if (location.pathname === '/' && document.getElementById('docs').style.display !== 'none') switchPage('overview');
|
||||
});
|
||||
// Page routing (including /docs) lives in router.js; it hands /docs/<title> back here
|
||||
window.KB = { open: name => { const d = findDoc(name); if (d) { openDoc(d); return true; } return false; } };
|
||||
});
|
||||
})();
|
||||
Reference in new issue
Block a user