minor cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-11-28 17:30:06 +03:00
parent f0ef98db9d
commit df145fd5e1
2 changed files with 14 additions and 6 deletions

View File

@ -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') },

View File

@ -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