From eb4f782e6f4c76af78e1bc533ba34a34987ef92a Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Thu, 27 Jun 2024 11:57:07 +0200 Subject: [PATCH] release 0.49.5 (#231) --- CHANGES | 4 ++++ lib/CallBackery.pm | 2 +- .../callbackery/source/class/callbackery/ui/Card.js | 10 +++++----- .../source/class/callbackery/ui/plugin/Action.js | 7 +++++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 673c200..525446f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +0.49.5 2024-06-26 18:03:12 +0200 Tobias Oetiker + + - fix translation regressions in card list + 0.49.4 2024-06-12 11:11:06 +0200 Tobias Oetiker - resolve gui object leakage this will result in smaller processes! diff --git a/lib/CallBackery.pm b/lib/CallBackery.pm index 83aeff2..043b891 100644 --- a/lib/CallBackery.pm +++ b/lib/CallBackery.pm @@ -38,7 +38,7 @@ use CallBackery::Database; use CallBackery::User; use Scalar::Util qw(weaken); -our $VERSION = '0.49.4'; +our $VERSION = '0.49.5'; =head2 config diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Card.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Card.js index fefaa3a..a77a93f 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Card.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Card.js @@ -66,7 +66,7 @@ qx.Class.define("callbackery.ui.Card", { fld[k].setValue(''); } else { - fld[k].setValue(String(this.xtr(data[k]) || '')); + fld[k].setValue(this.xtr(data[k]).toString() || ''); } } last[k] = data[k]; @@ -126,7 +126,7 @@ qx.Class.define("callbackery.ui.Card", { if (labelCfg.set) { ['value','tooltip'].forEach(key => { if (key in labelCfg.set){ - labelCfg.set[key] = this.xtr(labelCfg.set[key]); + labelCfg.set[key] = this.xtr(labelCfg.set[key]).toString(); } }); label.set(labelCfg.set); @@ -147,7 +147,7 @@ qx.Class.define("callbackery.ui.Card", { if (fieldCfg.set) { ['placeholder','tooltip'].forEach(key => { if (key in fieldCfg.set){ - fieldCfg.set[key] = this.xtr(fieldCfg.set[key]); + fieldCfg.set[key] = this.xtr(fieldCfg.set[key]).toString(); } }); field.set(fieldCfg.set); @@ -160,7 +160,7 @@ qx.Class.define("callbackery.ui.Card", { if (field.setModelSelection) { // SelectBox if (fieldCfg.items) { for (let item of fieldCfg.items) { - field.add(new qx.ui.form.ListItem(this.xtr(item[1]), null, item[0])); + field.add(new qx.ui.form.ListItem(this.xtr(item[1]).toString(), null, item[0])); } } event = 'changeSelection'; @@ -222,7 +222,7 @@ qx.Class.define("callbackery.ui.Card", { // add action buttons this.__actions.forEach(action => { - var btn = this.__createButton(this.xtr(action.label), action.buttonSet.icon); + var btn = this.__createButton(this.xtr(action.label).toString(), action.buttonSet.icon); btn.addListener('execute', function() { this.__parentForm.setSelection(this.__dataCache); this.__buttonMap[action.key].execute(); 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 ce10578..3956936 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 @@ -187,9 +187,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; } } this.add(button);