diff --git a/module/doc/css/view.ui.css b/module/doc/css/view.ui.css index 800455d5c2..a3c9e93c6d 100644 --- a/module/doc/css/view.ui.css +++ b/module/doc/css/view.ui.css @@ -14,7 +14,7 @@ .main-content-cell > .panel {max-height: calc(100vh - 110px); overflow-y: auto;} .main-content-cell > .panel > .doc-content {padding-right: 0;} -#contentTree {background: #fff; position: sticky; height: calc(100vh - 180px)!important; overflow: auto; top: 3.5rem; right: 1rem; z-index: 100; flex: 0 1 30%; min-width: 160px;} +#contentTree {background: #fff; position: sticky; height: calc(100vh - 180px)!important; overflow: auto; top: 3.5rem; right: 1rem; z-index: 100; flex: 0 1 30%;} #contentTree .tree-item .item-content > a {white-space: nowrap; text-overflow: clip; overflow: hidden;} #docPanel::-webkit-scrollbar, @@ -26,4 +26,3 @@ #outlineToggle {display: block; position: absolute; top: 6.5rem; right: 3.5rem; z-index: 100;} #docPanel .panel-heading > .panel-actions {min-width: 320px;} #docPanel .detail-content {max-width: var(--zt-panel-form-max-width);} -#docPanel.hasOutline .detail-content {max-width: calc(var(--zt-panel-form-max-width) - 160px);} diff --git a/module/doc/js/view.ui.js b/module/doc/js/view.ui.js index 3ce288b519..65e081e52c 100644 --- a/module/doc/js/view.ui.js +++ b/module/doc/js/view.ui.js @@ -6,12 +6,14 @@ window.showHistory = function() $('#history, #closeBtn').removeClass('hidden'); $('#contentTree').addClass('hidden'); $('#outlineToggle .icon').addClass('icon-menu-arrow-left').removeClass('icon-menu-arrow-right') + $('#docPanel .detail-content').css('max-width', 'calc(var(--zt-panel-form-max-width) - 300px)') } else { $('#contentTree').removeClass('hidden'); $('#history, #closeBtn').addClass('hidden'); $('#outlineToggle .icon').removeClass('icon-menu-arrow-left').addClass('icon-menu-arrow-right') + $('#docPanel .detail-content').css('max-width', 'var(--zt-panel-form-max-width)'); } $('#hisTrigger').toggleClass('text-primary'); @@ -30,6 +32,7 @@ $(document).on('click', '#closeBtn', function() { $('#hisTrigger').removeClass('text-primary'); $('#history, #closeBtn').addClass('hidden'); + $('#docPanel .detail-content').css('max-width', 'var(--zt-panel-form-max-width)'); }); window.toggleOutline = function() @@ -37,6 +40,14 @@ window.toggleOutline = function() $('#outlineToggle .icon').toggleClass('icon-menu-arrow-left').toggleClass('icon-menu-arrow-right') $('#contentTree').toggleClass('hidden'); $.cookie.set('hiddenOutline', $('#contentTree').hasClass('hidden')); + if($('#contentTree').hasClass('hidden')) + { + $('#docPanel .detail-content').css('max-width', 'var(--zt-panel-form-max-width)'); + } + else + { + $('#docPanel .detail-content').css('max-width', 'calc(var(--zt-panel-form-max-width) - 300px)'); + } } $("#docPanel").on('enterFullscreen', () => { diff --git a/module/doc/ui/view.html.php b/module/doc/ui/view.html.php index f885824fae..e671a9d43e 100644 --- a/module/doc/ui/view.html.php +++ b/module/doc/ui/view.html.php @@ -125,7 +125,6 @@ if(!empty($editors)) $contentDom = div ( setClass('flex-auto'), - isset($outlineTree) ? setClass('hasOutline') : null, setID('docPanel'), div (