fix #4326 管理画面のオプション部分などのアコーディオンの開閉を記録・復元する機能を追加#4328
Open
kaburk wants to merge 1 commit intobaserproject:5.2.xfrom
Open
fix #4326 管理画面のオプション部分などのアコーディオンの開閉を記録・復元する機能を追加#4328kaburk wants to merge 1 commit intobaserproject:5.2.xfrom
kaburk wants to merge 1 commit intobaserproject:5.2.xfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a feature to save and restore the open/close state of accordion sections (options, detailed settings, etc.) in the baserCMS admin panel. The state is persisted per plugin+controller path using localStorage, so accordion sections remain in the same open/close state across page reloads.
Changes:
- Added
getAccordionStorageKey(),loadAccordionState(), andsaveAccordionState()helper functions to manage accordion state inlocalStorage, scoped by URL path segments. - Added DOM-ready initialization code to restore accordion states from
localStorageon page load. - Updated the accordion click handler to persist state changes to
localStorageand added a guard for missingdata-bca-target.
Reviewed changes
Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
plugins/bc-admin-third/src/js/admin/startup.js |
Core logic: added localStorage-based accordion state persistence and restoration functions, and updated click handler |
plugins/bc-admin-third/webroot/js/admin/startup.bundle.js |
Rebuilt minified bundle reflecting the source changes |
plugins/bc-admin-third/webroot/js/admin/startup.bundle.js.map |
Updated source map for the rebuilt bundle |
You can also share your feedback on Copilot code review. Take the survey.
ryuring
reviewed
Mar 15, 2026
| } | ||
|
|
||
| // 初期状態の復元 | ||
| $(function() { |
Collaborator
There was a problem hiding this comment.
startup は、defer 前提で読み込んでいるので、 $(function() { は、なくてもいいです
ryuring
reviewed
Mar 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
よろしくお願いします!