From f0c8ca437adda2337e2067e2b97ec50935d691d7 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 19 Sep 2024 14:56:02 +0200 Subject: [PATCH] Filter menu button properties for Card forms --- CHANGES | 2 ++ .../source/class/callbackery/ui/plugin/Action.js | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ddccd0c..4a107bf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ + - filter menuButtonProperties + 0.50.1 2024-08-30 12:27:22 +0200 Tobias Oetiker - show a popup before reloading the page diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Action.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Action.js index 3956936..be91c30 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Action.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Action.js @@ -245,9 +245,12 @@ qx.Class.define("callbackery.ui.plugin.Action", { } } if (mbs) { - mmButton.set(mbs); + let mbsFiltered = Object.fromEntries( + ['visibility', 'enabled', 'label', 'icon'].filter(key => key in mbs).map(key => [key, mbs[key]]) + ); + mmButton.set(mbsFiltered); if (btCfg.key) { - this._menuButtonSetMap[btCfg.key] = mbs; + this._menuButtonSetMap[btCfg.key] = mbsFiltered; } }