From 5e5caa04928885b4cd864dec5bde7d7b9991cc28 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 17 Nov 2015 04:32:59 +0300 Subject: [PATCH] started work on load/open gui... Signed-off-by: Alex A. Naanou --- ui (gen4)/file.js | 6 +++--- ui (gen4)/viewer.js | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/file.js b/ui (gen4)/file.js index 2539d792..fceca4a2 100755 --- a/ui (gen4)/file.js +++ b/ui (gen4)/file.js @@ -161,11 +161,11 @@ function loadJSON(path){ // ...see if this can be split into more generic // sections... // XXX change path handling: -// 1) explicit index -- ends with INDEX_DIR +// 1) explicit index -- ends with INDEX_DIR (works) // -> load directly... -// 2) implicit index -- path contains INDEX_DIR +// 2) implicit index -- path contains INDEX_DIR (works) // -> append INDEX_DIR and (1)... -// 3) path is a pattern (contains glob wildcards) +// 3) path is a pattern (contains glob wildcards) (works) // -> search + load // 4) non of the above... // a) error diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 4e0bc8a0..63a0fe6f 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -2524,7 +2524,13 @@ var ActionTreeActions = actions.Actions({ // we got an argument and can exit... if(path){ - console.log('PATH:', path) + console.log('PATH:', path.slice(1)) + + // XXX use logger... + // XXX this does not work because in the last path + // element ' ' is replaced with a '\\ '... + this.loadPath && this.loadPath(path.slice(1)) + return } @@ -2533,6 +2539,7 @@ var ActionTreeActions = actions.Actions({ var o = overlay.Overlay($('body'), require('./lib/widget/browse-walk').makeWalk(null, '/') .open(function(evt, path){ + o.close() // close the parent ui... @@ -2540,6 +2547,7 @@ var ActionTreeActions = actions.Actions({ && parent.close && parent.close() + // do the actual opening... that.pathListerTest(path) })) .close(function(){