From 2defbe17628ad0a93501120903be7405f89d9763 Mon Sep 17 00:00:00 2001 From: Luigi D'Acunto Date: Wed, 1 Jul 2026 16:20:46 +0200 Subject: [PATCH] v2.15.0 - Aggiunti pulsanti Collapse All / Expand All nel menu bar degli accordion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Funziona su edit_host, bulkedit, editfolder (table.nform) e edit_ruleset (div.foldable). Usa getTargetDoc() per compatibilità con e senza sidebar. --- README.md | 14 +++++ user_script/checkmk_swissknife.user.js | 75 +++++++++++++++++++++++++- 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f27a7c7..b7dcd22 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,20 @@ On the **Activate pending changes** page, automatically checks the *Activate for Applies to: `wato.py?mode=changelog` (with or without sidebar). +--- + +### Collapse All / Expand All +Adds two buttons to the top menu bar on any page with expandable sections: + +| Button | Color | Action | +|--------|-------|--------| +| **Collapse All** | Orange | Collapses all open accordion sections at once | +| **Expand All** | Green | Expands all collapsed accordion sections at once | + +Works on both host-edit pages (accordion sections are `table.nform` elements) and ruleset pages (accordion sections are `div.foldable` elements). + +Applies to: `edit_host`, `bulkedit`, `editfolder`, `edit_ruleset` (with or without sidebar). + ## How it works The script injects enhancements at page load and re-applies them on SPA navigation (Checkmk reloads content inside an `