From 10f6cbf65183dd4a553537b5fcd7654cf13bd07a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 26 Jun 2019 19:41:42 +0300 Subject: [PATCH] tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse2.html | 12 ++++++++++-- ui (gen4)/lib/widget/browse2.js | 21 +++++++++++++-------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/ui (gen4)/lib/widget/browse2.html b/ui (gen4)/lib/widget/browse2.html index 744f9a73..aa2d74b7 100755 --- a/ui (gen4)/lib/widget/browse2.html +++ b/ui (gen4)/lib/widget/browse2.html @@ -58,6 +58,11 @@ body { 0 -50px 10px -50px gray inset; } +.item.path .text:before { + content: "/"; +} + + /* .browse-widget .list .item .button.toggle-collapse { float: left; @@ -159,7 +164,10 @@ requirejs([ // XXX split this into several dialogues, show each and then combine... dialog = browser.Browser(function(make){ - make('path', {id:'selected_path'}) + make('path', { + id:'selected_path', + cls: 'path', + }) make.Separator() make(['list', 'of', 'text']) @@ -243,7 +251,7 @@ requirejs([ // XXX EXPEREMENT -- need to wrap this into partial .update(..) .focus(function(){ var e = this.get({id: 'selected_path'}) - e.value = this.path + e.value = this.pathArray this.renderItem(e) }) dialog.container = $('.container').first()[0] diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index 696743d0..5053ceee 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -977,14 +977,17 @@ var BaseBrowserPrototype = { // XXX need to normalizePath(..) // ...array .value is not compliant with POLS get path(){ - return this.__items != null ? - this.get('focused', - function(e, i, p){ return p.join('/') }) - // XXX do we use .options.path??? - : (this.options || {}).path }, + return (this.pathArray || []).join('/') }, set path(value){ this.load(value) }, - + // XXX + get pathArray(){ + return this.__items != null ? + this.get('focused', + function(e, i, p){ return p }) + // XXX do we use .options.path??? + // XXX is this an array??? + : (this.options || {}).path }, // Length... // @@ -3168,8 +3171,9 @@ var HTMLItemPrototype = { // the new .dom value is replaced correctly but it is detached, // thus we see no change... set elem(value){ - this.dom - && this.elem.replaceWith(value) }, + this.dom ? + this.elem.replaceWith(value) + : (this.dom = value)}, } var HTMLItem = @@ -4099,6 +4103,7 @@ var HTMLBrowserPrototype = { button_keys[k].click() } }) item.dom = elem + //item.elem = elem return elem },