From 7eb761af41ed6ff2c51b0665d69c6268d1885b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sat, 14 Feb 2026 14:52:09 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EB=A9=94=EB=89=B4=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=A0=84=EC=B2=B4=20=EC=A0=91=EA=B8=B0/=ED=8E=BC=EC=B9=98?= =?UTF-8?q?=EA=B8=B0=20=ED=86=A0=EA=B8=80=20=EB=B2=84=ED=8A=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- public/js/menu-tree.js | 18 ++++++++++++++++++ resources/views/menus/index.blade.php | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/public/js/menu-tree.js b/public/js/menu-tree.js index 976aaa07..81d0c9df 100644 --- a/public/js/menu-tree.js +++ b/public/js/menu-tree.js @@ -46,6 +46,24 @@ function hideChildren(parentId) { }); } +// 전체 접기/펼치기 +window.toggleAllChildren = function(collapse) { + const buttons = document.querySelectorAll('.toggle-btn'); + buttons.forEach(btn => { + const menuId = btn.getAttribute('data-menu-id'); + const chevron = btn.querySelector('.chevron-icon'); + if (!chevron) return; + + if (collapse) { + chevron.classList.add('rotate-[-90deg]'); + hideChildren(menuId); + } else { + chevron.classList.remove('rotate-[-90deg]'); + showChildren(menuId); + } + }); +}; + // 재귀적으로 직계 자식만 표시 function showChildren(parentId) { const children = getChildElements(parentId); diff --git a/resources/views/menus/index.blade.php b/resources/views/menus/index.blade.php index ff04d114..90d21438 100644 --- a/resources/views/menus/index.blade.php +++ b/resources/views/menus/index.blade.php @@ -159,6 +159,24 @@ function getCookieValue(name) { })(); + +
+ + +
+