This commit is contained in:
tianshujie
2023-11-08 14:29:43 +08:00
parent d30faee4f3
commit c61d458e3c
3 changed files with 12 additions and 9 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
.panel-heading { justify-content: space-between; }
.panel-actions { margin-left: auto; }
.doc-content .flex .doc-panel {flex: 1 1 100%; margin-right: 1.5rem;}
#docPanel {flex: 1 1 100%; margin-right: 1.5rem;}
.scrollbar-hover { overflow-y: scroll; }
#mainContent .panel+.panel {flex: none}
@@ -15,7 +15,7 @@
#contentTree {background: #fff; position: sticky; height: calc(100vh - 180px)!important; overflow: auto; top: 3rem; right: 1rem; z-index: 100; flex: 0 1 30%;}
#contentTree .tree-item .item-content > a {white-space: nowrap; text-overflow: clip; overflow: hidden;}
#content .detail-content.article-content::-webkit-scrollbar,
#docPanel::-webkit-scrollbar,
#contentTree::-webkit-scrollbar {height: 0px; width: 0px; background: transparent;}
#contentTree::-moz-scrollbar {height: 0px; width: 0px; background: transparent;}
+6 -4
View File
@@ -6,14 +6,15 @@
*/
window.fullScreen = function()
{
var element = document.getElementById('content');
var element = document.getElementById('docPanel');
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen;
if(requestMethod)
{
var afterEnterFullscreen = function()
{
$('#content').addClass('scrollbar-hover');
$('#content').css('background', '#fff');
$('#docPanel').addClass('scrollbar-hover');
$('#docPanel').css('background', '#fff');
$('#docPanel .panel-actions, #docPanel .selelct-version').addClass('hidden');
$.cookie.set('isFullScreen', 1);
};
@@ -49,7 +50,8 @@ window.fullScreen = function()
*/
function exitFullScreen()
{
$('#content').removeClass('scrollbar-hover');
$('#docPanel').removeClass('scrollbar-hover');
$('#docPanel .panel-actions, #docPanel .selelct-version').removeClass('hidden');
$.cookie.set('isFullScreen', 0);
}
+4 -3
View File
@@ -118,7 +118,8 @@ if(!empty($editors))
$contentDom = div
(
setClass('flex-auto doc-panel'),
setClass('flex-auto'),
setID('docPanel'),
div
(
setClass('panel-heading'),
@@ -132,7 +133,7 @@ $contentDom = div
(
btn
(
setClass('ghost btn square btn-default'),
setClass('ghost btn square btn-default selelct-version'),
'V' . ($version ? $version : $doc->version)
),
set::items($versionList)
@@ -145,9 +146,9 @@ $contentDom = div
setClass('toolbar'),
btn
(
set::url('javascript:fullScreen()'),
setClass('btn ghost'),
icon('fullscreen'),
on::click('fullScreen')
),
common::hasPriv('doc', 'collect') ? html($starBtn) : null,
($config->vision == 'rnd' and $config->edition == 'max' and $app->tab == 'project') ? $importLibBtn : null,