From 14af35b1e11c22fde2bf99ed41570f0114f5bebd Mon Sep 17 00:00:00 2001 From: guofeilong Date: Thu, 23 Mar 2023 17:36:04 +0800 Subject: [PATCH] * Adjust code . --- module/doc/css/tablecontents.css | 5 +++-- module/doc/js/tablecontents.js | 18 +++++++++++++++++- module/doc/view/tablecontents.html.php | 4 ++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index beee0e6595..b810e24908 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -12,7 +12,7 @@ #mainContent #createDropdown ul {position: absolute;} #pageNav .dropdown-menu {max-height: inherit;} #mainContent > .panel {margin-bottom: 0; height: calc(100vh - 125px); overflow-y: auto;} -#mainContent > .main-col {overflow-x: hidden;} +#mainContent > .main-col {padding-left: 0; overflow-x: hidden;} .no-content {width: 100px; height: 100px; margin: 0 auto;} .notice {text-align: center; padding-left: 15px; padding-top: 20px;} @@ -63,7 +63,8 @@ li.drag-shadow ul {display: none!important;} .input-tree {width: 120px;} /* css for sidebar */ -.sidebar-toggle > .icon {position: absolute; top: 50%; left: -12px; width: 12px; height: 30px; margin-top: -10px; line-height: 30px; color: #fff; text-align: center; background: #7dcdfe; border-radius: 6px; cursor: pointer;} +.sidebar-toggle {flex: 0 0 16px;} +.sidebar-toggle > .icon {width: 12px; height: 30px; margin-top: -10px; line-height: 30px; color: #fff; text-align: center; background: #7dcdfe; border-radius: 6px; cursor: pointer;} .spliter {flex: 0 0 12px;} .spliter-btn {height: 28px; width: 10px; background: #fff; position: absolute; top: 30%; left: -1px; border: 1px solid #D9D9D9; border-radius: 2px;} diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index c19b2f92de..49a36376f6 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -123,7 +123,23 @@ $(function() }); $('body').on('click', function(e) { - if(!$.contains(e.target, $('.dropdown-in-tree'))) $('.dropdown-in-tree').remove(); + $('.dropdown-in-tree').remove(); + }).on('click', '.sidebar-toggle', function() + { + var $this = $(this); + var $icon = $this.find('.icon'); + if($('#sideBar').hasClass('hidden')) + { + $icon.addClass('icon-angle-left'); + $icon.removeClass('icon-angle-right'); + $('#sideBar').removeClass('hidden'); + } + else + { + $icon.addClass('icon-angle-right'); + $icon.removeClass('icon-angle-left'); + $('#sideBar').addClass('hidden'); + } }).on('click', '.dropdown-in-tree li', function(e) { var item = $(this).data(); diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index 7ffd9e9943..2d7f79d55d 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -76,7 +76,7 @@ ?> -
+

@@ -93,7 +93,7 @@

- +
>