Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions administrator/templates/atum/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@
<?php endif; ?>

<?php // container-fluid ?>
<div class="container-fluid container-main">
<div class="container-fluid container-main" id="main-container">
<?php if (!$cpanel) : ?>
<?php // Subheader ?>
<button class="navbar-toggler toggler-toolbar toggler-burger collapsed" type="button" data-toggle="collapse" data-target=".subhead" aria-controls="subhead" aria-expanded="false" aria-label="<?php echo Text::_('TPL_ATUM_TOOLBAR'); ?>">
<button class="navbar-toggler toggler-toolbar toggler-burger" type="button" data-toggle="collapse" data-target=".subhead" aria-controls="subhead" aria-expanded="false" aria-label="<?php echo Text::_('TPL_ATUM_TOOLBAR'); ?>">
<span class="toggler-toolbar-icon"></span>
</button>
<div id="subhead" class="subhead mb-3">
<div id="subhead" class="subhead mb-3 collapse show">
<div id="container-collapse" class="container-collapse"></div>
<div class="row">
<div class="col-md-12">
Expand Down
8 changes: 8 additions & 0 deletions build/media_source/templates/atum/js/template.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,15 @@
* @since 4.0.0
*/
function reactToResize() {
const toolbar = doc.getElementById('main-container');
window.addEventListener('resize', () => {
if (window.innerWidth >= 576) {
if (toolbar && !toolbar.querySelector('#subhead').classList.contains('show')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cpanel #subhead doesn't exist and this causes a JS error getting the property classList of null

toolbar.querySelector('#subhead').classList.add('show');
toolbar.querySelector('.toggler-toolbar').setAttribute('aria-expanded', 'true');
toolbar.querySelector('.toggler-toolbar').classList.remove('collapsed');
}
}
if (mobile.matches) {
setMobile();
} else {
Expand Down