2026-02-04 23:31:53 +01:00
|
|
|
const updateHistoryButtons = () => {
|
|
|
|
|
const back = document.querySelector('#global-back');
|
|
|
|
|
const forward = document.querySelector('#global-forward');
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
if (!back && !forward) {return;}
|
2026-02-04 23:31:53 +01:00
|
|
|
|
|
|
|
|
const hasHistory = window.history.length > 1;
|
2026-03-05 12:51:53 +01:00
|
|
|
const setDisabledState = (link, disabled) => {
|
|
|
|
|
link.setAttribute('aria-disabled', disabled ? 'true' : 'false');
|
|
|
|
|
link.classList.toggle('is-disabled', disabled);
|
|
|
|
|
if (disabled) {
|
|
|
|
|
link.setAttribute('tabindex', '-1');
|
|
|
|
|
} else {
|
|
|
|
|
link.removeAttribute('tabindex');
|
|
|
|
|
}
|
|
|
|
|
};
|
2026-02-04 23:31:53 +01:00
|
|
|
|
|
|
|
|
if (back) {
|
2026-03-05 12:51:53 +01:00
|
|
|
setDisabledState(back, !hasHistory);
|
2026-02-04 23:31:53 +01:00
|
|
|
}
|
|
|
|
|
if (forward) {
|
2026-03-05 12:51:53 +01:00
|
|
|
setDisabledState(forward, !hasHistory);
|
2026-02-04 23:31:53 +01:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const initHistoryButtons = () => {
|
|
|
|
|
const back = document.querySelector('#global-back');
|
|
|
|
|
const forward = document.querySelector('#global-forward');
|
|
|
|
|
|
2026-02-11 19:28:12 +01:00
|
|
|
const isEditableTarget = (target) => {
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
if (!target) {return false;}
|
|
|
|
|
if (target.isContentEditable) {return true;}
|
2026-02-11 19:28:12 +01:00
|
|
|
const tag = target.tagName;
|
|
|
|
|
return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
document.addEventListener('keydown', (event) => {
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
if (!event.altKey || event.metaKey || event.ctrlKey) {return;}
|
|
|
|
|
if (isEditableTarget(event.target)) {return;}
|
2026-02-11 19:28:12 +01:00
|
|
|
if (event.key === 'ArrowLeft') {
|
|
|
|
|
if (window.history.length > 1) {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
window.history.back();
|
|
|
|
|
}
|
|
|
|
|
} else if (event.key === 'ArrowRight') {
|
|
|
|
|
if (window.history.length > 1) {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
window.history.forward();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2026-02-04 23:31:53 +01:00
|
|
|
if (back) {
|
|
|
|
|
back.addEventListener('click', (event) => {
|
2026-03-05 12:51:53 +01:00
|
|
|
event.preventDefault();
|
2026-02-04 23:31:53 +01:00
|
|
|
if (window.history.length > 1) {
|
|
|
|
|
window.history.back();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (forward) {
|
|
|
|
|
forward.addEventListener('click', (event) => {
|
2026-03-05 12:51:53 +01:00
|
|
|
event.preventDefault();
|
2026-02-04 23:31:53 +01:00
|
|
|
if (window.history.length > 1) {
|
|
|
|
|
window.history.forward();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateHistoryButtons();
|
|
|
|
|
window.addEventListener('popstate', updateHistoryButtons);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (document.readyState === 'loading') {
|
|
|
|
|
document.addEventListener('DOMContentLoaded', initHistoryButtons);
|
|
|
|
|
} else {
|
|
|
|
|
initHistoryButtons();
|
|
|
|
|
}
|