diff --git a/ui (gen4)/Makefile b/ui (gen4)/Makefile index 68c5a2fb..d6623224 100755 --- a/ui (gen4)/Makefile +++ b/ui (gen4)/Makefile @@ -97,7 +97,7 @@ # - rpm # - ... # - cross-compiling support (???) -# - cross-package with pre-build libs... +# - cross-package with pre-built libs... # - nwjs??? # # diff --git a/ui (gen4)/lib/widget/browse2.html b/ui (gen4)/lib/widget/browse2.html index f36720d0..9a7c7056 100755 --- a/ui (gen4)/lib/widget/browse2.html +++ b/ui (gen4)/lib/widget/browse2.html @@ -103,10 +103,10 @@ requirejs([ // XXX split this into several dialogues, show each and then combine... dialog_1 = browser.Browser(function(make){ - make([321, 321, 123]) + make(['list', 'of', 'text']) make.group( - make('a'), - 'b') + make('group item 0'), + 'group item 1 (bare)') // XXX Q: should we show only one if multiple lines are in sequence??? make('---') //make('---') @@ -115,19 +115,19 @@ requirejs([ //make('e') // embeded browser... make(browser.Browser(function(make){ + make('nested browser item 0') make(1) - make(2) })) // basic nested list... - make.nest('A', [ + make.nest('nested', [ make('moo', {disabled: true}), 2, // XXX this is not supported by .map(..)... - make.nest('AB', browser.Browser(function(make){ + make.nest('nested', browser.Browser(function(make){ make('ab') })), ]) - make('in between...') + make('in between two subtrees...') // nested browser... make.nest('B', browser.Browser(function(make){ diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index ed22cdbd..46818557 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -136,7 +136,7 @@ Items.group = function(...items){ items[0] : items // replace the items with the group... - this.items.splice(this.items.length, 0, ...collectItems(this, items)) + this.items.splice(this.items.length, 0, collectItems(this, items)) return this } @@ -1194,6 +1194,9 @@ var BaseBrowserPrototype = { // item not iterable -> skip... (!iterateNonIterable && elem.noniterable) ? [] + // group... + : elem instanceof Array ? + walk(path, elem) // value is Browser (inline)... : elem.value instanceof Browser ? elem.value.map(func, @@ -1223,6 +1226,13 @@ var BaseBrowserPrototype = { return walk(path, this.items) }, + + + walk: function(func, options){ + }, + + + // Sublist map functions... // NOTE: there are different from .map(..) in that instead of paths // func(..) will get indexes in the current browser...