diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 51b22cad..8503b2fd 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -236,7 +236,7 @@ module.GLOBAL_KEYBOARD = { alt: 'browseActions: "/Bookmark/"', }, C: 'browseActions: "/Crop/"', - O: 'pathListerTest', + O: 'pathBrowse', // XXX for debug... G: function(){ $('.viewer').toggleClass('visible-gid') }, diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 12cbd940..262ed1a2 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -2721,8 +2721,8 @@ var ActionTreeActions = actions.Actions({ // XXX make this nw only... // XXX BUG: for some reason this when run from .browseActions(..) loads // incorrectly while when called directly is OK... - pathListerTest: ['Interface|Test/Path lister test (floating)...', - function(base){ + pathBrowse: ['Interface|Test/Path lister test (floating)...', + function(base, callback){ var that = this var parent = this.preventClosing ? this.preventClosing() : null base = base || '/' @@ -2738,11 +2738,19 @@ var ActionTreeActions = actions.Actions({ && parent.close && parent.close() - console.log('PATH:', path.slice(1)) + + // XXX need to strip the leading '/' in a more cross-platform way... + path = path.strip(1) // XXX use logger... - // XXX need to strip the leading '/' in a more cross-platform way... - that.loadPath && that.loadPath(path.slice(1)) + console.log('PATH:', path) + + if(callback){ + callback(path) + + } else { + that.loadPath && that.loadPath(path) + } })) .close(function(){ parent