IMPR: Minor fixtures

This commit is contained in:
Tony Air 2024-07-03 15:24:11 +02:00
parent 7cb3a2dbeb
commit 25309db2b3
3 changed files with 11 additions and 1 deletions

View File

@ -11,7 +11,7 @@ window.addEventListener('prefetch-loaded', () => {
const MainContentContainer = document.getElementById('MainContent')
const MainContent = document.createElement('div')
if (!MainContentContainer.dataset['legacy']) {
if (!MainContentContainer.dataset.legacy) {
MainContent.classList.add('page--container')
MainContentContainer.append(MainContent)
@ -30,5 +30,12 @@ window.addEventListener('prefetch-loaded', () => {
})
}
}
document.querySelectorAll('a.legacy').forEach((el) => {
el.addEventListener('click', (e) => {
window.location = e.currentTarget.getAttribute('href')
})
})
window.initAjaxOnce = true
})

View File

@ -4,6 +4,7 @@
// extends global PageController class
//namespace App\Pages;
use A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx;
use SilverStripe\CMS\Controllers\ContentController;
@ -12,6 +13,7 @@ use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\View\SSViewer;
use A2nt\CMSNiceties\Templates\DeferredRequirements;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
/**
* Class \PageController

View File

@ -11,6 +11,7 @@
.breadcrumb{list-style:none}
.breadcrumb-item{display:inline-block}
.d-none{display:none!important}
.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;width:1px!important;clip:rect(0,0,0,0)!important;border:0!important;white-space:nowrap!important}
<%-- always show scroll bar --%>
html {overflow-y:scroll}
.meta-MetaWindow-overlay{display:none}