From b2c97162f2eb9a54e5243298d576dffadd2f1a91 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 9 Mar 2020 17:24:13 +0300 Subject: [PATCH] minor tweaks... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-widgets.js | 1 + ui (gen4)/lib/widget/browse2.js | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index ca500471..0212b171 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -983,6 +983,7 @@ module.Dialogs = core.ImageGridFeatures.Feature({ // ...there seems to be no way to make this generic... // XXX think of a better name... (???) // XXX should the client be able to override shorthands??? +// XXX is there a way to access the parent context??? browse.items.makeSubContext = function(name, obj){ // arse args... var args = [...arguments].slice(1) diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index 0c109e5b..f0e9e4c5 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -362,6 +362,7 @@ object.mixinFlat(function(){}, { return this(value, options) }, Action: function(value, options){}, ConfirmAction: function(value){}, + // XXX how do we handle list values -- edit only the last element as default??? Editable: function(value){}, // lists... @@ -559,11 +560,14 @@ Items.makeSubContext('field', : options.value ], options) }, { - // XXX + // Editable field value... + // + // NOTE: this is a shorthand to: + // make.Editable([title, value], ..) Editable: function(title, value, options){ - }, + return this.__proto__.Editable([title, value], options) }, - // Value toggle field... + // Togglable field value... // // XXX Toggle: function(title, options){